wlroots/types/scene
Kenny Levinsen f57e7e40d3 scene/surface: Do not use buffer dimensions for clip
The surface's buffer dimensions were used to scale the clip's x/y
offset. If a surface had a larger buffer than src_box, the calculations
to scale the x/y portion of the clip would be incorrect, yielding
graphical glitches.

This was noticed with Chromium in sway, which during resize uses a
viewport with a src_box to avoid immediate buffer reallocation. While
the viewport was in use, the surface would be shifted so that too much
content was cropped in the upper left, and damage glitching was visible
in the lower right.

Use the buffer source box dimensions instead.

(cherry picked from commit dc7dba8b1f)
2025-10-21 22:25:46 +00:00
..
drag_icon.c wlr_scene: Don't disable scene nodes at creation time 2024-07-04 14:35:52 -04:00
layer_shell_v1.c wlr_scene: Don't disable scene nodes at creation time 2024-07-04 14:35:52 -04:00
output_layout.c scene: ignore duplicate wlr_scene_output_layout_add_output() calls 2024-02-20 11:04:46 +01:00
subsurface_tree.c scene: constify subsurface_tree_set_clip() 2024-03-20 12:56:28 +01:00
surface.c scene/surface: Do not use buffer dimensions for clip 2025-10-21 22:25:46 +00:00
wlr_scene.c scene: resize damage ring on geometry update 2024-08-23 09:30:19 -04:00
xdg_shell.c wlr_scene: Don't disable scene nodes at creation time 2024-07-04 14:35:52 -04:00