WebRender’s 18th newsletter is here, with its usual share of bug fixes and a few performance improvements. Just after the previous newsletter was published, Patrick Walton landed an experimental integration of pathfinder’s text renderer in WebRender, that can draw native-looking text on Mac using the GPU. The pathfinder integration is taking shape although it is behind a compile time flag for now and there’s some work left to support native-looking text on Windows and Linux.
Another exciting update is a long standing issue in WebRender’s integration that was causing Gecko to continuously re-build the display list at 60 frames per second during off-main-thread animations, even though these don’t need to affect the display list. Thanks to Hiro and Kats we are no longer doing a ton of extra work on the CPU for no reason during animations.
Notable WebRender changes
- Glenn implemented the infrastructure for retaining more things between frame, and enabled it for some blurs.
- Jeff made various improvement to the blob image invalidation logic.
- mbrubeck fixed y-inverted images in servo in some cases.
- Glenn made drop shadows be drawn as a single primitive.
- Martin improved border dot handling for small radii.
- Kvark added logging for driver debug messages.
- Glenn stored render task cache entries into a freelist to avoid some hash map lookups.
- Jeff switched reftests to a serial osmesa build to fix Mac CI issues.
- Eijebong updated the serde dependency.
- Kvark prevented zero-sized border edges from being generated.
- Glenn made opaque solid borders use a solid color shadow with clip instead of the border shader. This improves batching and paves the way for future other future optimizations.
- Kvark reoganized some of the shader code to help with the gfx-rs porting effort.
- waywardmonkeys fixed some clippy lints and typos.
- waywardmonkeys updated the glutin and winit dependencies in wrench.
- Glenn implemented support for snapping clip masks.
- Kvark made shader compilation errors much easier to understand.
- Nical implemented sampling from render tasks in brush images.
- Kats implemented various parts required for hooking Gecko’s APZ in WebRender’s threads.
- Martin made stacking context clipping explicit.
- Glenn fixed the anti-aliasing of ellipses in some edge cases.
- jonleighton made serialization use serde_bytes to speed up servo’s display list serialization.
- pcwalton started integrating pathfinder‘s text renderer in WebRender behind a feature flag.
- Gankro added some reftests.
- Glenn fixed fast shadow clips.
Notable Gecko changes
- Huge thanks to Hiro for filing bugs and fixing many latent issues with the reftest harness and animation throttling, which unblocked us on refresh driver throttling.
- Kats then throttled the main thread’s refresh driver during off-main-thread animations.
- Kats audited and enabled WebRender reftests on Windows.
- Gankro fixed a bug with masks on groups of items.
- Sotaro relaxed an assertion that was too strict and reenabled some tests.
- Miko avoided re-building WebRender display lists when the Gecko display list hasn’t changed.
- Sotaro improved the scheduling of video frames.
- Sotaro fixed a race condition when recreating canvases and images.
- Sotaro fixed a blinking issue when resizing the browser window.
- Kats did a ton of work towards integrating APZ with async scene building.
- Jeff fixed a blob image invalidation related crash.
- Jeff did something related to blob image invalidation, which I assume fixed a bug (only he knows).
- Ryan worked around a crash.
- Jeff hooked up paint flashing (a debugging tool to visualize how much is invalidated) to blob image invalidation.
- Gankro fixed a blob image pixel snapping issue.
- Jeff avoided painting outside the ivnalidated region.
- Kats added some fuzzing to a few intermittent tests.
- Sotaro hooked up the ForcePresent IPDL message.
- Jeff fixed a bug caused by clips being pushed and popped on different draw targets with blob images.
Enabling WebRender in Firefox Nightly
In about:config, just set “gfx.webrender.all” to true and restart the browser. No need to toggle any other pref.
Note that WebRender can only be enabled in Firefox Nightly. We will make it possible to enable it on other release channels as soon as we consider it stable enough to reach a broader audience.
The best place to report bugs related to WebRender in Gecko is the Graphics :: WebRender component in bugzilla.
Note that it is possible to log in with a github account.