Skip to content

libweston/compositor: Cache buffer damage for synced subsurfaces

Robert Mader requested to merge rmader/weston:issue446 into main

The spec states:

Because buffer transformation changes and damage requests may be interleaved in the protocol stream, it is impossible to determine the actual mapping between surface and buffer damage until wl_surface.commit time. Therefore, compositors wishing to take both kinds of damage into account will have to accumulate damage from the two requests separately and only transform from one to the other after receiving the wl_surface.commit.

For subsurfaces in sync mode, arguably the same is the case until the cached state gets applied eventually. Thus, in order to keep complexity to a sane level, just accumulate buffer damage and convert it only when the cached state gets applied.

This mirrors how other compositors like Mutter implement cached damage and what the spec arguably should demand.

Closes #446 (closed)

Signed-off-by: Robert Mader robert.mader@collabora.com

Merge request reports