Improve handling of preserve-3d layers in WebRenderContainerLayer

RESOLVED INCOMPLETE

Status

()

Core
Graphics: WebRender
RESOLVED INCOMPLETE
7 months ago
a month ago

People

(Reporter: kats, Assigned: mrobinson)

Tracking

(Blocks: 2 bugs, {stale-bug})

Other Branch
mozilla57
stale-bug
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 unaffected, firefox57 unaffected)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

Right now WebRenderContainerLayer does the thing where it sorts its leaf nodes by z-order [1] before pushing them to webrender. That will need to change to just iterating through the children and calling RenderLayer on them, since WR will want stacking contexts for the intermediate container layer nodes as well.

The other related thing is that right now in wr_dp_push_stacking_context we are passing TransformStyle::Flat unconditionally [2], but we'll need to propagate the preserve-3d state from the container layer to there.

[1] http://searchfox.org/mozilla-central/rev/abe68d5dad139e376d5521ca1d4b7892e1e7f1ba/gfx/layers/wr/WebRenderContainerLayer.cpp#21
[2] http://searchfox.org/mozilla-central/rev/abe68d5dad139e376d5521ca1d4b7892e1e7f1ba/gfx/webrender_bindings/src/bindings.rs#1273
It's probably worth waiting for kvark to get the servo tests passing before trying this out.
(Reporter)

Updated

7 months ago
Assignee: nobody → mrobinson
Created attachment 8864818 [details] [diff] [review]
Fix processing of transformed WebRenderContainerLayers

Also limit clips to layers that have masks.
This patch needs to run through the try bots (which I don't have access to yet) in order to figure out how many other tests are newly passing / failing. There are about 4 tests that are now failing, mainly because the newly working functionality here exposes existing bugs. A couple more are now fuzzy for the same reason. Additionally, about 16 tests in this transform-3d directory are now passing for me. I think it might make sense to try to land this before kvark's patch, because it doesn't just affect preserve3d.
Kicked off a try push for you: https://treeherder.mozilla.org/#/jobs?repo=try&revision=77938513ad8411efc324bb4f1894257e2e8b635e
Based on the R5 failure I suspect the change you made to clip-pushing is wrong.
It does seem that way. I'm testing now if the first change alone causes any progression. If so maybe we can split this out, because it looks like the clipping change is going to be a bit trickier.
I'm working on Servo integration and tests for the WR's preserve-3d support, and there is quite a few bugs discovered. Let me finish that first, submit a PR for WR, before integrating it into Gecko.
(Reporter)

Updated

6 months ago
(Reporter)

Updated

5 months ago
Blocks: 1339474
Blocks: 1386669

Updated

3 months ago
Status: NEW → ASSIGNED
Priority: P3 → P1
Whiteboard: [gfx-noted] → [wr-mvp] [gfx-noted]
Target Milestone: --- → mozilla57
status-firefox56: --- → unaffected
status-firefox57: --- → unaffected
Keywords: stale-bug
WebRenderContainerLayer is no more, and this bug seems obsolete now.
Status: ASSIGNED → RESOLVED
Last Resolved: a month ago
Resolution: --- → INCOMPLETE

Updated

a month ago
Priority: P1 → --
Whiteboard: [wr-mvp] [gfx-noted] → [gfx-noted]
You need to log in before you can comment on or make changes to this bug.