blob: Make the recording use absolute coordinates
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: jrmuizel)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Currently items are painted with a context that has a transform of -TopLeft(). This means that if TopLeft() changes the commands will be in the wrong place because the -TopLeft() offset is baked into the recording.
I don't think we've ever needed to support painting without this transformed baked in so there were some infrastructure changes that needed to be made to make this possible. Most of the problems come from the use of gfxContext::GetClipExtents which expose the bounds of the underlying surface. The biggest of these was fixed by the CreateClippedDrawTarget rewrite. The rest should be handled by ensuring that the DrawTarget has bounds that are at least as big as the union of the individual item bounds. i.e. GetClipExtents should never intersect with bounds of the item.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Currently items are painted with a context that has a transform of
-mLayerBounds.TopLeft(). This means that if TopLeft() changes the commands
will be in the wrong place because the -TopLeft() offset is baked into the
recording.
I don't think we've ever needed to support painting without this transformed
baked in so there were some infrastructure changes that needed to be made to
make this possible. Most of the problems come from the use of
gfxContext::GetClipExtents which expose the bounds of the underlying surface.
The biggest of these was fixed by the CreateClippedDrawTarget rewrite. The rest
should be handled by ensuring that the DrawTarget has bounds that are at least
as big as the union of the individual item bounds. i.e. GetClipExtents should
never intersect with bounds of the item.
This change has a couple of parts:
-
Store mLayerBounds.TopLeft() in the recording so that it will be subtracted
during replay -
Use mLayerBounds as the Rect of the RecordingDrawTarget
-
Don't include mLayerBounds.TopLeft() in the transform during recording.
-
Adjust the dirty rect by recordingOrigin before we use it as a clip so that
it stays in the right place. -
In PaintContainerItem the bounds parameter of PushLayer is in device space
so we need to account for the shift in the location of device space in the
DrawTargetRecording.
Updated•5 years ago
|
Pushed by jmuizelaar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5fde2c3df608 blob: Make the recording use absolute coordinates. r=nical
Comment 3•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•