Skip to content

backends/wayland: Avoid rendering to buffers held by the compositor

Vlad Zahorodnii requested to merge work/zzag/wayland-backend-glitches into master

Currently, the wayland backend does not monitor when its buffers are released by the host compositor, which can potentially result in glitches.

This change refactors the wayland backend so the swapchain buffers are released upon receiving wl_buffer.release event.

wl_buffer.release event handling lives in the WaylandBackend. This allows us to share some code, it might also be useful for implementing direct scanout as any GraphicsBuffer providing dmabuf or shm attributes can be wrapped in a wl_buffer.

Merge request reports