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)
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•6 years ago
|
| Assignee | ||
Comment 1•6 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•6 years ago
|
Comment 3•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Description
•