Refactor image integration with WebRender
Categories
(Core :: Graphics: WebRender, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 1 open bug)
Details
Attachments
(13 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
We use ImageContainers and SourceSurface's to integrate Raster/VectorImage with the WebRender display list generation. There is lots of indirection here we could probably avoid, e.g. ImageContainer will always contain just one SourceSurface, which is always SourceSurfaceSharedData or SourceSurfaceBlobImage. Maybe we can do better here and avoid the overhead as well as make the code look better.
Assignee | ||
Comment 1•3 years ago
|
||
We no longer use SourceSurfaceMappedData because we only support
SourceSurfaceSharedData-backed imgFrame in the SurfaceCache now.
Assignee | ||
Comment 2•3 years ago
|
||
In later parts in this series, GetImageProvider will replace
GetImageContainerAtSize. This will be a more specialized and lower
overhead means to get a wr::ImageKey for a particular surface.
Assignee | ||
Comment 3•3 years ago
|
||
This provides the framework to allow ISurfaceProvider objects to
implement WebRenderImageProvider. It is straightforward for rasterized
providers (DecodedSurfaceProvider, SimpleSurfaceProvider and
AnimationSurfaceProvider). Later parts in this series will provide the
necessary changes for blob recordings.
Assignee | ||
Comment 4•3 years ago
|
||
This will be used by layers as a replacement for ImageContainer's
ContainerProducerID for tracking if the same imgIRequest/imgIContainer
own the cached WebRenderImageProvider.
Assignee | ||
Comment 5•3 years ago
|
||
Assignee | ||
Comment 6•3 years ago
|
||
This will be replaced by a WebRenderImageProvider-based implementation
in a later part in this series.
Assignee | ||
Comment 7•3 years ago
|
||
Rename the file in preparation for the switch over to
WebRenderImageProvider.
Assignee | ||
Comment 8•3 years ago
|
||
This WebRenderImageProvider/ISurfaceProvider subclass provides the
implementation for blob recordings. This is mostly just taking the
functionality that was previously in SourceSurfaceBlobImage.
Assignee | ||
Comment 9•3 years ago
|
||
Now that we no longer have the extra layer of ImageContainers providing
a superficial level of caching/reuse of existing blob recordings, we
need some way to share recordings. This part adds support to
SurfaceCache to store BlobSurfaceProvider objects.
This includes the specialized code for invalidating SVG images. In
particular this is useful for animated SVG images. In general we want to
avoid changing the image key whenever possible so that we avoid
reallocating the underlying buffers in the compositor process for the
rasterized blob images.
We also need to track the ImageIntRegion used by the recording. If a
caller only wants a slice of the SVG image, then we need to track this
differentiation in our cache entries. At this time, we don't allow
substitutes for entries with a region exclusion.
Assignee | ||
Comment 10•3 years ago
|
||
Assignee | ||
Comment 11•3 years ago
|
||
Assignee | ||
Comment 12•3 years ago
|
||
Assignee | ||
Comment 13•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 14•3 years ago
|
||
try (with blob recording pref set): https://treeherder.mozilla.org/jobs?repo=try&revision=08a4852ebc98c5371935c10ab5611b39cbf5afde
try (without blob recording pref set): https://treeherder.mozilla.org/jobs?repo=try&revision=b3c9b7460d78996a398e9f8f369ed7eafa1a6fed
Comment 15•3 years ago
|
||
Comment 16•3 years ago
|
||
Backed out for causing browser-chrome failures in test/performance/browser_startup_images
Assignee | ||
Comment 17•3 years ago
|
||
I think this is because I didn't add a NotifyDrawingObservers
call in GetImageProvider
Comment 18•3 years ago
|
||
Comment 19•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/41ba2e2a2d13
https://hg.mozilla.org/mozilla-central/rev/0145b538175b
https://hg.mozilla.org/mozilla-central/rev/d453c5219255
https://hg.mozilla.org/mozilla-central/rev/b964576ae53d
https://hg.mozilla.org/mozilla-central/rev/be73004c0850
https://hg.mozilla.org/mozilla-central/rev/38890cc266fb
https://hg.mozilla.org/mozilla-central/rev/96a0ef35881b
https://hg.mozilla.org/mozilla-central/rev/a37b3091281d
https://hg.mozilla.org/mozilla-central/rev/1014a95f540e
https://hg.mozilla.org/mozilla-central/rev/7b471990ea86
https://hg.mozilla.org/mozilla-central/rev/3687e798f665
https://hg.mozilla.org/mozilla-central/rev/aced4b672fb4
https://hg.mozilla.org/mozilla-central/rev/c4f073f7e3a3
Comment 20•3 years ago
|
||
Backed out on @aosmond's request
Backout link: https://hg.mozilla.org/integration/autoland/rev/a02c0af6e80cc31fe0d9a8572b2ddac8d564ed35
Comment 21•3 years ago
|
||
Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/a02c0af6e80c
Comment 22•3 years ago
|
||
(In reply to Sandor Molnar from comment #20)
Backed out on @aosmond's request
Backout link: https://hg.mozilla.org/integration/autoland/rev/a02c0af6e80cc31fe0d9a8572b2ddac8d564ed35
== Change summary for alert #32251 (as of Thu, 04 Nov 2021 11:07:36 GMT) ==
Improvements:
Ratio | Test | Platform | Options | Absolute values (old vs new) |
---|---|---|---|---|
6% | instagram SpeedIndex | android-hw-g5-7-0-arm7-shippable-qr | warm webrender | 454.31 -> 428.83 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=32251
Comment 23•3 years ago
|
||
There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:aosmond, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 24•3 years ago
|
||
Patches aren't relanded because of regressions they cause that need to be fixed.
Assignee | ||
Comment 25•3 years ago
|
||
It appears the cause of the regressions is because of this bail out condition:
We return false
to indicate we should invalidate but we don't schedule a paint like the other paths. With the old ImageContainer code, we would always return an ImageContainer
from GetImageContainerAtSize
, even if it was empty because we haven't decoded a surface yet. This would ensure we have a WebRenderImageData
object attached to the nsImageFrame
and we would reach this line instead:
since we WebRenderImageData::mKey
is Nothing()
.
Comment 26•3 years ago
|
||
Comment 27•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a7c6389a767f
https://hg.mozilla.org/mozilla-central/rev/41590355b534
https://hg.mozilla.org/mozilla-central/rev/de019933be1f
https://hg.mozilla.org/mozilla-central/rev/d6a41b6555bb
https://hg.mozilla.org/mozilla-central/rev/43278d9a5da0
https://hg.mozilla.org/mozilla-central/rev/3b3078df854d
https://hg.mozilla.org/mozilla-central/rev/7d2c3c3a5339
https://hg.mozilla.org/mozilla-central/rev/889fcfb23434
https://hg.mozilla.org/mozilla-central/rev/7503e1289b92
https://hg.mozilla.org/mozilla-central/rev/d7f9835a65e8
https://hg.mozilla.org/mozilla-central/rev/466af290693c
https://hg.mozilla.org/mozilla-central/rev/2eef1762a4e8
https://hg.mozilla.org/mozilla-central/rev/3fe9e1643aaf
Updated•3 years ago
|
Description
•