Skip to content

protocol: allow immediate wl_buffer.destroy if not re-used

Simon Ser requested to merge emersion/wayland:destroy-buffer-without-reuse into main

Allow wl_buffer objects to be destroyed without having to wait for wl_buffer.release if the underlying storage isn't going to be re-used.

The main motivation for this is to avoid glitches when a client is torn down. When a client disconnects, all of its objects are destroyed in arbitrary order. However some compositors will still need to access the destroyed buffer's underlying storage afterwards, e.g. for visual effects (fade-out) or for atomic layout updates (wait for other clients to commit a new buffer before hiding the buffer).

It's still incorrect for clients to destroy a wl_buffer and mutate the underlying storage without waiting for wl_buffer.release.

Signed-off-by: Simon Ser contact@emersion.fr Closes: #185 (closed)

Merge request reports