I skipped a newsletter again (I’m trying to put publish one every two weeks or so), sorry! As usual a lot of fixes and a few performance improvement, and sometimes both the same time. For example the changes around image and gradient repetition were primarily motivated by bugs we were encountering when dealing with repeated backgrounds containing very large amounts of repetitions, and we decided to solve these issues by moving all images to the “brush” infrastructure (bringing better batching, faster fragment shader and the ability to move more pixels out of the alpha pass), and optimize the common cases by letting the CPU generate a single primitive that is repeated in the shader. I don’t always properly highlight fixes that benefit performance but they are here.

The most exciting (in my humble opinion) advancement lately is Kats’ work on integrating of asynchronous panning and zooming (which we refer to as APZ) with WebRender’s asynchronous scene building infrastructure. This lets us perform some potentially expensive operations (such as scene building) asynchronously and allow the critical path to prioritize scrolling, animations and video playback. It is a lot more complicated than it might sound (in part due to how it works on the Gecko side) and I am very impressed with how quickly it is taking shape.

Enough with my ramblings, let’s have a look at the highlight of the last two weeks month.

Notable WebRender changes

Kats integrated APZ with async scene building (spread over many pull requests).

Nical implemented and enabled repeating images and gradients directly in the shader when there is no tile spacing.

Nical implemented decomposing repeated linear and radial gradients during frame building when it can’t be done in the shader.

Nical and Jeff implemented decomposing tiled images during frame building when it can’t be done in the shader.

Nical implemented baking repeated image spacing into a texture to allow repeating them in the shader in more cases.

Gankro fixed serialization of gradient stops for the frame capture tool.

Kvark implemented clipping against the near plane for bounds calculus (fixes a few correctness bugs and improves performance in some cases).

Jeff fixed blob images incorrectly marked as opaque.

Martin implemented scrolling using the hit tester.

fschutt fixed some build issues with pathfinder, and some other build issues.

Martin prevented unnecessary clipping computations in some cases.

Jeff simplified the way we clip blob image tiles.

Gankro fixed an infinite loop.

Martin fixed another infinite loop.

Martin made the border image API more general.

Kvark reduced the size of the aColorTexCoord shader vertex attribute.

Kvark implemented taking the clip chains clip rect into account for local_rect computation.

Glenn added the initial implementation for brush border primitives.

Kvark gracefully handled invalid gradient stops.

Glenn implemented sub-pixel aa with specified background color in off-screen targets.

Martin fixed an issue with optimized away clip segments.

Gankro worked around a rustc bug.

Glenn implemented storing non-rectangular UVs in texture cache entries.

Glenn implemented non-square slab allocations in the texture cache.

Martin improved the performance of rendering dotted/dashed borders.

Glenn implemented collapsing opacity filters when they contain a single item.

Glenn fixed the clipping of elements which bounds depend on an animated property.

Glenn made various chnages in preparation for text run caching.

Kvark fixed a GPU cache invalidation bug.

Gankro fixed an issue with sub-pixel aa and masks.

Notable Gecko changes

Kats made a ton of progress on integrating APZ with async scene building (spread over many bugzilla entries).

Kats implemented paint skipping with WebRender.

Jeff enabled blob image invalidation by default.

Jeff fixed a ton of blob image related bugs (spread over many bugzilla entries).

Kats enabled some linux64-qr mochitests in the CI.

Hiro fixed tab throbbers that weren’t throbbing.

Hiro fixed another animation related bug.

Hiro fixed yet another animation issue.

Hiro fixed more animation stuff.

Jeff fixed a blob image assertion, and another one.

Kats fixed a bug with scrollbar not being rendered properly in some cases.

Gankro fixed some complicated text decoration cases.

Gankro fixed a bug with table and border-collapse.

Gankro fixed janky animations of text caused by pixel-snapping under certain types of transforms.

Gankro implemented proper hit-testing support within blob images.

Andrew reduced the amount of copying happening with blob images.

Andrew fixed an assertion in the image sharing code.

Kats fixed a crash.

Kats batched the removal of async pipelines which were causing the scene to be rebuilt a lot on some sites.

Kats reduced the amount of allocations happening when updating animated properties.

Sotaro improved the way logging is integrated with WebRender (2), (3).

Kats avoided the use of static initializers for APZ.

Hiro fixed the way we sample time stamps for tests.

Hiro enabled some animation tests with WebRender.

Lee fixed an issue with the lifetime of blob image resources.

Lee fixed emoji transparency.

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.

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.