Simplify the raster/picture space distinction
Categories
(Core :: Graphics: WebRender, task, P3)
Tracking
()
People
(Reporter: nical, Unassigned)
References
(Blocks 1 open bug)
Details
Right now there is a distinction between a picture's positional node and raster node.
It is quite hard to explain, and almost impossible to understand from just reading the code.
Two things make it complicated:
The difference between the two is only a scale+offset to account for snapping
It could probably be expressed as a "snapping scale + offset" transform in the picture itself. which would be more self-explanatory.
We only have a separate raster node when relative to the root
If a transform is animated or non-axis aligned, we give up on attempting to separate the positional and raster node for its children. This means that we don't snap correctly if a picture is rotated, and it manifests in the code in lots of places where we deal directly in the coordinate space of the root (because we assume that the raster node can only be the root).
This system should be more recursive. When we establish a new raster root, pictures downstream of it should be able to use it as raster space so that their content is snapped correctly. In addition the code would make more sense because we wouldn't be hard-coding root coordinates.
Description
•