Closed Bug 1345577 Opened 8 years ago Closed 7 years ago

Don't give every stacking context a Some(identity) transform

Categories

(Core :: Graphics: WebRender, enhancement, P3)

Other Branch
enhancement

Tracking

()

RESOLVED FIXED
Tracking Status
firefox56 --- unaffected
firefox57 --- unaffected

People

(Reporter: kats, Assigned: kats)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

At https://github.com/servo/webrender/pull/959#issuecomment-284712721, mrobinson said: === Additionally, I detected an issue with the way that Gecko is building the WebRender display list. It seems to be giving every stacking context a Some(identity) transformation, which will not result in proper behavior for fixed position content as well as leading to a lot of extra work in WebRender. Maybe we can chat discuss later about how to fix this. === Filing this bug so we don't lose track of this.
I think once we fix this, we're going to end up having ContainerLayers that don't necessarily push a stacking context. Which breaks assumptions littered throughout the code right now (e.g. any layer that uses RelativeToParent to compute a rect to pass to WR is assuming that the parent layer pushed a stacking context). The good news is that the StackingContextHelper I added in bug 1359842 starts to separate the notions of stacking contexts in WR from the container layers in the layer tree. I have plans to continue this in bug 1360246, and hopefully will be able to completely separate the two, which will then unblock this bug.
Depends on: 1360246
I think in the fullness of time we'll need to update FrameLayerBuilder and friends so that transforms that are coming from CSS are separated from the synthetic transforms (such as the scrolling translation amount) that FLB generates. That way we can pass the CSS transforms through to WR and skip the rest. This is important because if we set a transform on a stacking context in WR, it treats the stacking context as a reference frame and positions things differently. See also servo/webrender#1304. For the time being I will land a patch in bug 1368551 that strips away the identity transforms which should be an incremental improvement.
We stopped doing this a while ago, probably around when we switched to layers-free and stopped pushing so many stacking contexts.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Assign to kats because of push, push, push bug... :)
Assignee: nobody → bugmail
Resolution: WORKSFORME → FIXED
You need to log in before you can comment on or make changes to this bug.