WebRender newsletter #33

Hi! The newsletter skipped a week because of Mozilla’s bi-annual allhands which took place in Orlando last week. We’ll probably skip a few others in December as a lot of the gfx folks are taking some time off. Before I get to the usual change list, I’ll continue answering the questions nic4r asked in the 31st newsletter’s comment section:

Is the interning work Glenn is doing related to picture caching?

Yes indeed. In order for picture caching to work across displaylists we must be able to detect what did not change after a new displaylist arrives. The interning mechanism introduced by Glenn in #3075 gives us this ability in addition to other goodies such as de-duplication of interned resources and less CPU-GPU data transfer.

What is blob tiling and what does it offer above normal blob rendering?

Tiling blobs means splitting blobs into square tiles. For very large blobs this means we can lazily rasterize tiles as they come into the viewport without throwing away the rest instead of either rasterizing excessively large blob images in one go or having to clip the blob against the viewport and re-rasterize everything during scrolling as the bounds of the blob change. It also lets us rasterize tiles in parallel.

Is there a bug to watch some of the document splitting work going on? My understanding is that document splitting will make the chrome more resilient against slow scene builds in the content frame? Is this right? How does this compare to push_iframe in the DL.

You can look at bug 1441308 although it doesn’t contain a lot of updates. In a nutshell, the bulk of the Gecko side work is done and there are WebRender side adjustments and some debugging to do. Currently WebRender can nest displaylists from different sources (content, UI, etc) by nesting iframes into a single document. Any change to the document more or less causes it to be re-rendered entirely (modulo caching optimizations).

Separating the UI and web content into separate documents mostly means we will update them independently and updating one won’t cause the other to be re-built and re-rendered. It will also let us render the the two in separate OS compositor windows.

One of the most complicated aspect of this is probably due to the way the browser is structured to nest the web content within the UI (there is both a background behind the web content and elements on top of it that belong to the UI). A lot of the work that went into this was to be able to split without introducing a lot of overdraw (needlessly allocating texture space for the background behind the web content and drawing it).

OMTA for color, gradients, etc? How much more of CSS can be feasibly calculated off thread and fed to WR using its Property Binding infra?

Anything is possible given enough time and motivation but with WebRender’s current architecture, any of the data that is fed directly to the shaders is a good candidate for animated property bindings. Colors are particularly appealing because it is the most commonly animated CSS property that we don’t already run as an off-main-thread animation (I don’t have the data handy though). We’ll likely tackle these nice perf optimizations after WebRender is shipped and stable.

Notable WebRender and Gecko changes

  • Bobby overhauled WebRender shader cache.
  • Bobby switched non-WebRender’s AWSY test to VMs with GPUs.
  • Kats made some Android improvements.
  • Kats made some progress on the Windows CI work.
  • Kvark removed some memcpys leading to a 5% improvement on dl_mutate.
  • Kvark improved the render target allocation scheme, improving GPU times and VRAM consumption on a lot of sites.
  • Matt added new telemetry.
  • Andrew fixed a few regressions from animated image recycling.
  • Andrew Kvark and Nical chased a crash caused by two race conditions and landed two fixes.
  • Emilio fixed transform flattening.
  • Emilio enabled warning-as-errors for rust code in CI.
  • Glenn fixed the way we track frame ids.
  • Glenn fixed eager texture cache eviction.
  • Glenn added support for picture caching.
  • Glenn started a series of changes removing clips expressed in local space which cause over-invalidation of interned primitives and prevent picture caching to work effectively across displaylist changes. See also (1), (2), (3), (4), (5).
  • Glenn added memory profile counters for interning.
  • Glenn moved the picture caching tiles to the opaque pass.
  • Sotaro removed some dead code.
  • Sotaro fixed a shutdown crash on Linux.
  • Timothy hooked up proper scale selection.

Ongoing work

  • Bobby is adding lazy initialization to D3D11 and D2D outside the GPU process to save memory.
  • Jeff and Nical are working on blob recoordination.
  • Matt is working on avoiding to render on changes within zero-opacity elements.
  • Matt is making WebRender’s behavior more similar to non-WebRender’s during catch-up compositing to make comparison easier.
  • Lee continues tracking down font related crashes and rendering issues with very large text
  • Emilio is dreaming of 3d transforms (I believe he actually used the term “nightmare”).
  • Sotaro is investigating SVG rendering bugs.

Enabling WebRender in Firefox Nightly

In about:config, set the pref “gfx.webrender.all” to true and restart the browser.

Reporting bugs

The best place to report bugs related to WebRender in Firefox is the Graphics :: WebRender component in bugzilla.
Note that it is possible to log in with a github account.

6 thoughts on “WebRender newsletter #33

  1. How can I test webrender with firefox beta (Linux + Intel HD4600)?
    “gfx.webrender.all” is set to “true”
    env is set to MOZ_ACCELERATED=1 MOZ_WEBRENDER=1
    yet I get: WEBRENDER_QUALIFIED – “blocked by env: No qualified hardware”

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