Open Bug 1916599 Opened 1 month ago Updated 29 days ago

Transform animation from bug 1915230 causes WebRender debug assertion failures

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

People

(Reporter: emilio, Unassigned)

References

Details

Attachments

(2 files)

STR (on a debug build):

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.

Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(gwatson)
See Also: → 1915230
Severity: -- → S3

Looks like Nical has started investigating this.

Flags: needinfo?(gwatson)

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.

The scene building code indeed enforces a picture cache slice for root iframes (which are classified as such when their size is empty).

Flags: needinfo?(nical.bugzilla)

Fwiw we ended up working around this in https://hg.mozilla.org/integration/autoland/rev/749011ce7a8a, so it's probably not so prioritary now

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: