WebRender newsletter #18

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.

Reporting bugs

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.

7 thoughts on “WebRender newsletter #18

  1. > Kvark reoganized some of the shader code to help with the gfx-rs porting effort.

    Is there more info on gfx-rs in WebRender? What does it do, what will it improve, that kind of thing?

    1. There is no detailed info on this work yet, consider it experimental. We’ll talk more where there is something to show. If highly interested, you can see the progress on https://github.com/szeged/webrender.

      In short, gfx-hal integration will allow us to run natively on D312, Metal, and Vulkan, taking the advantage of lower CPU overhead for work submission, better GPU memory management, and more. It also opens us a way to run the future WebGPU tasks on the same context.

      1. I don’t think so. There’s always the of risk having bugs in gfx-rs, but those would at least be under our control. If anything, drivers for lower level APIs like vulkan and DX12 tend to be less buggy than GL drivers (or, DX11 drivers on top of ANGLE).

    1. SVG isn’t handled by WebRender yet and goes through the “blob image” fall-back. SVG perf isn’t part of the WebRender work for now, but we don’t want to regress it so if it’s slower with than without WebRender it’s definitely worth filing bugs for.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s