http://impress.js.org/ text is in the wrong spots (3d transforms)
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: kvark)
References
Details
Attachments
(4 files, 1 obsolete file)
Reporter | ||
Comment 1•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
Dzmitry, any guesses as to what's going wrong here?
Assignee | ||
Comment 4•6 years ago
|
||
I'll take a look
Assignee | ||
Comment 5•6 years ago
|
||
Reduced scene RON. You can see how the preserve-3d gets mixed with Flat (with some filters) on the way to the root.
Assignee | ||
Comment 6•6 years ago
|
||
The problem here appears to be rather wide, and its related to flattening of stacking contexts. Flattening is when we drop the Z coordinate of the transformed primitive along the way to the root. It's supposed to be done at the root of each preserve-3D sub-hierarchy as well as for each stacking context outside of a preserve-3D hierarchy. We do the latter, and it's fairly straightforward, but we aren't doing the former properly. As a result, the transform from root to surface (that we compute for every surface!) is incorrect if there is any flatten root on the way. In fact, a transform would only make sense in either within the context of a flatten root (i.e. within preserve-3d hierarchy), or out of flatten roots if we compute it by evaluating the flattened transforms (as a whole) on the way to the actual root of the tree... We aren't doing this now, and implementing this appears to be a complex engineering task.
Comment 7•6 years ago
•
|
||
Hmm, why aren't we doing the former? I think this should work, Gecko wraps content with transform separators already when this happens:
I guess we're incorrectly avoiding creating a reference frame for the separators. Does changing this condition:
To:
if (newTransformMatrix.IsIdentity() && !mIsTransformSeparator) {
Fix this?
Assignee | ||
Comment 8•6 years ago
|
||
Thanks for chiming in, Emilio!
That suggested change doesn't fix the issue. In general, I don't think inserting any transform separators into the tree would address this. Whenever WR code does this (and we do this in many places), we (theoretically) fail:
let map_surface_to_world = SpaceMapper::new_with_target(
ROOT_SPATIAL_NODE_INDEX,
surface.surface_spatial_node_index,
frame_context.screen_world_rect,
frame_context.clip_scroll_tree,
);
We fail because the clip-scroll tree doesn't know about those preserve-3d enclaves that need to be flattened. It appears to me that we'll have to change (read: re-design) the very concept of the clip-scroll tree in order to handle that.
Comment 9•6 years ago
|
||
Ah, so this is the "clip-scroll-tree not being aware of flattening" issue I was discussing with Glenn not that long ago:
https://mozilla.logbot.info/gfx/20190121#c15861304
Seems like introducing a new coordinate space for the children of a node when we flatten something (that produces a different transform) and keeping track of that on the parent spatial node should be possible? But ICBW.
Assignee | ||
Comment 10•6 years ago
|
||
This change rewords get_relative_transform and assotiated pieces of logic,
so that we flatten the transforms at preserve-3d context boundaries.
It addresses a problem found by 1524797 but doesn't resolve the bug yet (!).
There is another issue likely contributing here, and we can treat this PR
as WIP and not merge until the case is completely resolved.
Assignee | ||
Comment 11•6 years ago
|
||
We used to hard-code the raster spatial node of plane splits to the root.
Now we are using the actual root during batching.
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
bugherder |
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
bugherder |
Description
•