Closed Bug 1361720 Opened 7 years ago Closed 7 years ago

Improve handling of preserve-3d layers in WebRenderContainerLayer

Categories

(Core :: Graphics: WebRender, enhancement)

Other Branch
enhancement
Not set
normal

Tracking

()

RESOLVED INCOMPLETE
mozilla57
Tracking Status
firefox56 --- unaffected
firefox57 --- unaffected

People

(Reporter: kats, Assigned: mrobinson)

References

Details

(Keywords: stale-bug, Whiteboard: [gfx-noted])

Attachments

(1 file)

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.
Assignee: nobody → mrobinson
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.
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.
Status: NEW → ASSIGNED
Priority: P3 → P1
Whiteboard: [gfx-noted] → [wr-mvp] [gfx-noted]
Target Milestone: --- → mozilla57
WebRenderContainerLayer is no more, and this bug seems obsolete now.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
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.

Attachment

General

Created:
Updated:
Size: