wayland/buffer: Do not get latest sync_fd if there are no release points

It's pointless busy work in that case.

Fixes: e8b890ab53a6 ("wayland: Implement linux-drm-syncobj-v1")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4208>
This commit is contained in:
Michel Dänzer 2025-01-09 18:59:04 +01:00 committed by Marge Bot
parent 6d9f0a5489
commit 82398945ea

View File

@ -731,6 +731,9 @@ meta_wayland_buffer_dec_use_count (MetaWaylandBuffer *buffer)
if (buffer->resource)
wl_buffer_send_release (buffer->resource);
if (!buffer->release_points->len)
return;
sync_fd = cogl_context_get_latest_sync_fd (cogl_context);
if (sync_fd < 0)
{