Open Bug 1673653 (deferrable-blobs) Opened 4 years ago Updated 4 months ago

Support for rasterizing SVG images on WR worker threads

Categories

(Core :: Graphics: WebRender, enhancement, P3)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: aosmond, Assigned: aosmond)

References

(Depends on 1 open bug, Blocks 17 open bugs)

Details

Today SVG images are rasterized on the main thread in the content process during display list building. The cost to rasterize can be quite high depending on the image, and the responsiveness and load time may suffer as a result.

Blob images today are able to rasterize SVG images if we take a recording. This moves the work to WR worker threads, but requires them to be rasterized before completing scene building and won't necessarily be an improvement. Because SVG images are more analogous to raster images, we don't need or want to wait for the rasterization to complete, and prefer to display them as they become available.

There are additional complications in that we would like substitutes like we do today for raster images. If display list building decides it wants a different size, we want to keep using what we have already rasterized to avoid flickering while we wait for the new size/recording to be rasterized. Today there is no equivalent of this, because raster images will use a different image key entirely, and WR doesn't need to know the relationship between these resources.

Blocks: 1665518
Blocks: 1674837
Blocks: 1673070
Blocks: 1675635
Blocks: 1676909
Blocks: 1658282
Blocks: 1680999
Alias: deferrable-blobs
Blocks: 1688765
Blocks: 1682722
Blocks: 1683354

I'm adding a whole bunch of android bugs as blocked on this, rather than as dupes. Mainly so that I remember to profile them again after this is fixed

Blocks: 1699261
Blocks: 1702132
Depends on: 1704792

Another really bad case svg spritesheet reported on Fenix github: https://github.com/mozilla-mobile/fenix/issues/19461

Let's make sure we test that site again once we have a fix.

Depends on: 1711059
Depends on: 1711061
Depends on: 1712855
Blocks: 1712702
Depends on: 1723741
Depends on: 1724727
See Also: → 1680999
Blocks: 1702266
See Also: → 1398697
Depends on: 1737891
See Also: → 1763643
Blocks: 1660504
Blocks: 1773355

Based on bug 1773355 comment 7, I think this bug is (at least partially) about setting image.svg.blob-image to true and letting that ride the trains.

Before we let that ride the trains, we should be sure to triage & ideally fix the bugs that were flagged as regressions from the first pref-enabling (bug 1763643), as well as the bugs that were marked as fixed by the pref-disabling in bug 1766333 (note, this might just be the same set of bugs).

(Probably goes without saying; just noting since those bugs aren't explicitly flagged as dependencies here at this point.)

Blocks: 1663570
Depends on: 1811212
Blocks: 1887129
You need to log in before you can comment on or make changes to this bug.