Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix z-ordering of transformed content inside preserve-3d context. #2369
Conversation
|
Gecko try has 2 unexpected FAILs: https://hg.mozilla.org/try/rev/3fa54312cc0c33f14a9cbbc8bb0ab181e3e66bf1 I'll investigate these in the morning. |
|
I looked at the mask-layer-3.html failure, and that one at least is a gecko bug. The gecko DL for the |
|
I investigated the other test failure. Interestingly in this case, the main reftest draws correctly, it is the So I think that points to a Gecko DL bug, but ideally @staktrace could verify that. If that's the case, then both the unexpected FAILs here are Gecko DL bugs, and this should be ready for review and merge. r? @kvark
|
|
(The clip and scroll here for the inner element looks wrong too, I think - similarly to the other test failure?) |
|
@glennw Yeah that seems like a Gecko bug |
|
Thanks, so I think this should be fine to merge once the review is done, and we'll add 2 new failure annotations to the WR update. r? @kvark |
|
Reviewed 4 of 4 files at r1. webrender/src/frame_builder.rs, line 480 at r1 (raw file):
wouldn't this be the same primitive ID as webrender/src/frame_builder.rs, line 561 at r1 (raw file):
let's rename to something like wrench/reftests/split/ordering.yaml, line 5 at r1 (raw file):
how does the original code handle this case? where do things go wrong? Comments from Reviewable |
When a 3d rendering context is established, add an extra picture (that is never composited to an intermediate surface). This extra pictures serves as a 3d rendering context container. Add a normal picture as a child of that container which is marked as using an intermediate surface. Any untransformed content that is included as part of the 3d rendering context will be placed in here, and be rendered in the correct order. If no untransformed content is added, then this picture won't be allocated and will have no effect on intermediate surface allocation. This gets us some ordering and correctness fixes. It still doesn't dynamically avoid plane-splitting when it's not needed. However, with this in place, and the recent changes to add PictureState, adding this optimization will be relatively simple. Fixes #2337.
|
Review status: 3 of 4 files reviewed at latest revision, 3 unresolved discussions. webrender/src/frame_builder.rs, line 480 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
It would be in the first level of a preserve-3d hierarchy, but not if you have a nested preserve-3d (since the primitive ID there is only stored as Some(..) when an establishing 3d context is found). webrender/src/frame_builder.rs, line 561 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done. wrench/reftests/split/ordering.yaml, line 5 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
The original code in batch.rs draws all the un-transformed content first, then the planes that were participating. The spec says that the untransformed content should be drawn on a plane at z=0 and interact with the other plane splits. Comments from Reviewable |
|
@kvark Thanks, comments addressed. |
|
Sounds good, thank you! |
|
|
Fix z-ordering of transformed content inside preserve-3d context. When a 3d rendering context is established, add an extra picture (that is never composited to an intermediate surface). This extra pictures serves as a 3d rendering context container. Add a normal picture as a child of that container which is marked as using an intermediate surface. Any untransformed content that is included as part of the 3d rendering context will be placed in here, and be rendered in the correct order. If no untransformed content is added, then this picture won't be allocated and will have no effect on intermediate surface allocation. This gets us some ordering and correctness fixes. It still doesn't dynamically avoid plane-splitting when it's not needed. However, with this in place, and the recent changes to add PictureState, adding this optimization will be relatively simple. Fixes #2337. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2369) <!-- Reviewable:end -->
|
|
|
@glennw This PR seems to have caused windows debug jobs to start failing in gecko CI - see last part of https://bugzilla.mozilla.org/show_bug.cgi?id=1434723#c6. Not really sure why, there's no obvious root cause in the log. Also FYI I updated https://wiki.mozilla.org/Platform/GFX/Quantum_Render#Try_syntax to include windows in the try push syntax - I neglected to do this when we added the windows jobs, sorry! |
|
Actually it might be a gecko-side problem. See comment 7. |
glennw commentedFeb 1, 2018
•
edited by larsbergstrom
When a 3d rendering context is established, add an extra picture
(that is never composited to an intermediate surface). This extra
pictures serves as a 3d rendering context container.
Add a normal picture as a child of that container which is marked
as using an intermediate surface. Any untransformed content that
is included as part of the 3d rendering context will be placed in
here, and be rendered in the correct order. If no untransformed
content is added, then this picture won't be allocated and will
have no effect on intermediate surface allocation.
This gets us some ordering and correctness fixes. It still doesn't
dynamically avoid plane-splitting when it's not needed. However,
with this in place, and the recent changes to add PictureState,
adding this optimization will be relatively simple.
Fixes #2337.
This change is