surface: fix damage transformation
Closes #3194 (closed)
This MR fixes surface-to-buffer and vice versa damage transformation, making it equal with Weston and KWin behavior.
-
weston-simple-damage
now works correctly with and without--use-viewport
, with any transform and scale. -
weston-simple-damage --rotating-transform
, however, doesn't work correctly. Removingwlr_client_buffer_apply_damage()
call fixes the problem. Not sure what causes this; Mutter seems to have a similar issue. - Firefox 92+ with WebRender compositor enabled still has minor damage issues, related to subsurface position changing. This is caused by modifying
buffer_damage
on subsurface motion and then transforming the resulting damage inwlr_surface_get_effective_damage()
(Firefox subsurfaces haveWL_OUTPUT_TRANSFORM_FLIPPED_180
buffer transform).