[PATCH] Revert "compositor: Queue buffer.release instead of sending immediately"

Neil Roberts neil at linux.intel.com
Wed Sep 11 11:31:09 PDT 2013

This reverts commit eccef6aadd142103ed151883e61c0e7a2fd98639.

Queuing the buffer release event instead of posting it immediately
causes problems if the client is not installing a frame callback and
instead is waiting for the buffer release events to throttle its
rendering. This will happen in Mesa when eglSwapInterval is set to
zero so that the client will try to render faster than the compositor
can display the buffers. The client will still want to throttle itself
to the buffer release events in that case so that it doesn't end up
allocating endless amounts of buffers while waiting for the release
events. Without this patch nothing will cause the connection to be
flushed so the client will just block forever.

 src/compositor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 74f0aab..3eb97e0 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1113,8 +1113,8 @@ weston_buffer_reference(struct weston_buffer_reference *ref,
 		if (ref->buffer->busy_count == 0) {
-			wl_resource_queue_event(ref->buffer->resource,
+			wl_resource_post_event(ref->buffer->resource,
+					       WL_BUFFER_RELEASE);

More information about the wayland-devel mailing list