Transform animation from bug 1915230 causes WebRender debug assertion failures
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: emilio, Unassigned)
References
Details
Attachments
(2 files)
STR (on a debug build):
- Apply https://phabricator.services.mozilla.com/D220846
./mach run --setpref sidebar.revamp=true
- Click the sidebar button next to the reload button.
ER:
- A smooth animation (we're transforming the container of the tabs using scaleX + translate).
AR:
- On an opt build, depending on the page it seems, there are some artifacts, it looks like the scaling happens per-tile or something?
- On a debug build it causes:
Hit MOZ_CRASH(assertion failed: (content_origin_f.x - content_origin.x).abs() < 0.15) at gfx/wr/webrender/src/picture.rs:5472
Nical / Glenn, any chance you could take a poke (blame seems to indicate you are familiar with this code)? I don't think we're doing anything too crazy?
It feels like WR is not accounting for the parent scale somehow, or is incorrectly accounting for it, which causes the tiles to overlap.
Updated•6 months ago
|
Comment 2•6 months ago
|
||
Comment 3•6 months ago
|
||
As pointed out by Emilio on matrix, the issue only happens when the animation uses non-uniform scaling.
Emilio tried to reproduce with a similar setup (transform applied on iframe) but with only web content instead of chrome + web content here: https://crisal.io/tmp/iframe-scalex-anim.html and the bug does not reproduce in this case.
In that test case, the content in the iframe is not layerized, whereas when the issue happens with the new side bar, the scaled content has picture cache slices.
Wild speculations round #1, I suspect that the issue is something along the lines of:
- we don't handle non-uniform scaling on picture cache slices (we can do it on content in the picture cache slice but not on the picture itself)
- we enforce that the web page goes into its own picture cache slice
Myabe the fix will involve detecting this situation, and shuffling things so that the transform is applied under rather than above the picture.
Comment 4•6 months ago
|
||
The scene building code indeed enforces a picture cache slice for root iframes (which are classified as such when their size is empty).
Updated•6 months ago
|
Reporter | ||
Comment 5•6 months ago
|
||
Fwiw we ended up working around this in https://hg.mozilla.org/integration/autoland/rev/749011ce7a8a, so it's probably not so prioritary now
Description
•