wlroots/types/scene
Simon Ser 128cd07e91 scene/surface: use source buffer to signal release timeline point
We were signaling the release timeline point when the
wlr_client_buffer was released. However, the wlr_client_buffer isn't
necessarily released at the same time as the underlying source
wlr_buffer. For instance, with wl_shm the source buffer is released
before the wlr_client_buffer, and with linux-dmabuf-v1 the source
buffer is released after the wlr_client_buffer. However, we want
to signal the release timeline point exactly at the same time we
send the wl_buffer.release event to the client.

Use surface->buffer->source instead of &surface->buffer->base to
fix this.

linux-drm-syncobj-v1 can only be used with DMA-BUFs, and
wlr_client_buffer.texture will keep the source locked, so
surface->buffer->source is guaranteed to be non-NULL and unreleased.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3940
Fixes: 9e71c88467 ("scene: unwrap wlr_client_buffer for direct scan-out")
2025-03-22 23:55:24 +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: use source buffer to signal release timeline point 2025-03-22 23:55:24 +00:00
wlr_scene.c scene: don't mention damage in region-scaling functions 2025-03-03 17:57:48 +03:00
xdg_shell.c xdg-surface: fix window geometry handling 2024-08-14 18:52:13 +00:00