WebRender newsletter #21

Hi there, WebRender’s newsletter is here, delayed again by some vacation time sprinkled with a fair amount of the traditional “I’m busy” excuse. It’s been a while so there is a lot below (without counting the items I probably missed in the overwhelming amount of stuff that went into WebRender and Gecko since the last newsletter.

One of the highlights this time is something I have been focusing on for a while, building on the async scene building infrastructure to move blob image rasterization off of the render backend thread. Instead of lazily rasterizing blob images in the critical path we now eager rasterize a subset of the blobs asynchronously during scene building. This makes sure expensive blob rasterization never prevent us from producing 60 frames per second during scrolling.
The other highlight is that we started gathering telemetry numbers on the nightly population that opted into WebRender, and these numbers are very positive, even in areas that we haven’t spent any time optimizing yet.

Notable WebRender changes

  • Kvark prevented segmentation of tiled images.
  • Glenn reduced the size of scroll nodes in memory and introduced transform palettes.
  • Lee added configurable angles for synthetic italics.
  • Martin added vertical scrolling in wrench.
  • Glenn refactored the clip scroll tree to reduce the amount of transforms sent to teh GPU.
  • Andrew fixed a panic in the texture cache.
  • Andrew fixed the tiling and dirty rect information for external images.
  • Martin implemented nine-patch support for border gradients.
  • Nical moved the rasterization of blob images off of the critical path.
  • Glenn reduced the size of the per-instance data in GPU memory.
  • Glenn cached the font instance in text runs primitives to avoid querying it during batching.
  • Zakor Gyula moved the device module into a folder in preparation for supporting more backends and fixed various issues with the portability of the shaders.
  • Kvark fixed an issue with forced texture uploads and dirty rects.
  • Nical fixed the scene building debug indicator to work with async scene building.
  • Lee snapped text run offsets and glyph offsets separately.
  • Glenn changed the data structure used to store clip sources.
  • Kvark improved the chasing infrastructure to debug batches.
  • Glenn avoided building frames when not necessary, improving CPU and power usage.
  • Jeff fixed a bug causing blob images to be transferred to the GPU every frame.
  • Nical avoided a crash if the debug shaders fail to build.
  • Kvark improved the way we handle non-inertible transforms in some cases.
  • s-panferov fixed the framebuffer size of the examples on hidpi screens.
  • Glenn decoupled batching from the clip-scroll-tree.
  • Glenn removed a redundant matrix transformation per primitive per frame.
  • Glenn decoupled some of the primitive code from spacial nodes.
  • Martin worked around a bug with out-of-sequence clip ids.
  • Lee added custom gamma and contrast for DWrite fonts.
  • Kvark reduced the glyph key size to 32 bits.
  • Sotaro fixed a bug in the FPS counter.
  • ekicyou made some tweaks to the direct composition exmaple.
  • Kvark fixed a bug with the clipping of iframes.
  • Kvark worked around an OSX Intel shader compiler bug (again).
  • Martin prevented segmenting clips with different positioning nodes.
  • Andrew improved the way we track dirty rects for images.

Notable Gecko changes

  • Sotaro fixed an issue with the display list generation in some cases.
  • Kats added some telemetry probes.
  • Sotaro fixed a crash in the memory management of textures during real device resets and during simulated ones.
  • Sotaro removed extraneous WebRender threads created when the GPU process is enabled on Windows.
  • Sotaro adjusted DXGI texture synchronization timeouts on Windows.
  • Lee added scaled font hooks on Android.
  • Sotaro added a check that an EGL extension is supported before using it.
  • Gankro fixed a crash in the displaylist building code.
  • Kats added telemetry probes to gather some number on the performance of webrender in the small population of nightly users currently using it.
  • Kats fixed a crash in the blob image recording code.
  • Kats made QR test jobs tier-1 by default.
  • Kats fixed a bug in the way rendering commands are flushed.
  • Lee cached DWrite rendering params (yielding a nice perf boost).
  • Lee fixed a font-related crash
  • Nical removed the possibility to disable async scene building.
  • Sotaro fixed a resource tracking issue when moving tabs between windows.
  • Sotaro fixed the redundant scheduling of frames that caused 30fps videos to refresh the window at 60fps.
  • Sotaro reused the external image ids across video frames.
  • Kats better handled invalid clip-path URIs.
  • Kats fixed a crash in the blob image layerization code.
  • Kats fixed a bug in the displaylist building code.
  • Nical implemented the new async blob rendering hooks on the gecko side.
  • Sotaro implemented a WebRender code path for when the pres shell has no frame avoiding a very costly fallback.
  • Gankro optimized away fully transparent blob images.
  • Andrew prevented slow things from happening when an image takes a long time to decode.
  • Sotaro avoided re-building the scene in more video playback cases.

Enabling WebRender in Firefox Nightly

In about:config:
– just set “gfx.webrender.all” to true
– restart Firefox

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.

10 thoughts on “WebRender newsletter #21

  1. Nice!! Seriously, don’t even worry if you don’t do a newsletter every week because the most important thing to me is the development work on WebRender. I’m personally excited to see WebRender make progress and eventually come out (even if it’s later next year), this is unprecedented stuff.

    That said, do you have an idea what the go-live target configuration(s) will be for WebRender in terms of hardware/software/firmware? Thanks, keep it up!

  2. The work so far has been fantastic and I’m really glad to help you by using my Nightly with WebRender enabled.

  3. WebRender on Nightly looks very good. Linux + amdgpu + Mesa.
    One strange thing, however: on site https://www.windy.com/ “perf top” utility show active swrast_dri.so instead of HW accelerated driver.
    Firefox about:support shows “X.Org — AMD Radeon Pro WX2100 (POLARIS12, DRM 3.26.0, 4.18.0-041800rc6-generic, LLVM 6.0.1)”

    1. Which distribution are you running? I ask because I can’t get linux-tools-generic for anything above 4.15 on Bionic Beaver (Ubuntu 18.04). Also, do you know if there is a way to get that package for anything above 4.15?

  4. Opening the WebRender Moire demo leads to nearly immediate 3+Go of RAM use then starts eating my swap on Linux. It was working with slow FPS before but now it just slows down all of my machine.

  5. hi don’t worry if there is not a newsletter every week or even every other week. Because development and work on Webrender is still going on and…. Webrender is progressing witch is good. Also you are only human so you time off to. So keep up the good work because… without the development of Webrender there would be no webrender and no webrender newsletter. So in short the development of Webrender is the most important thing Looking forward to the next newsletter whenever.

  6. I have noticed quite an improvement in the performance, just as noted in this newsletter. You guys are doing great work, so don’t sweat the small stuff like making this newsletter very often (I don’t really have the time to check it that often, so it’s actually better to have all of this as a big bite when I have the time), just keep up the good work!

  7. Hi Webrender is progressing witch is good but… I tried if could please there needs to be away to Enable and or disable WebRender in Firefox Nightly without having to restart. Because there is no restart button and… at least for me opening and closing Firefox Nightly dose not work to turn Webrender back on. Thank you

  8. I have an Intel Core M with a hdpi screen. Using WebRender doesn’t really make a lot of change in terms of smoothness when I scroll for instance. Does WebRender only improves perf on discrete GPUs and not integrated ones ?

Leave a Reply to D3D11 Cancel 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