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

Daniel Stone daniel at fooishbar.org
Wed Sep 11 11:54:47 PDT 2013


Hi,

On 11 September 2013 14:31, Neil Roberts <neil at linux.intel.com> wrote:
> 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.

Yeah, this is good to me.  Media pipelines also really want release
events ASAP, so they can reuse hardware-decoder buffers.

Cheers,
Daniel

> ---
>  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,
>                 ref->buffer->busy_count--;
>                 if (ref->buffer->busy_count == 0) {
>                         assert(wl_resource_get_client(ref->buffer->resource));
> -                       wl_resource_queue_event(ref->buffer->resource,
> -                                               WL_BUFFER_RELEASE);
> +                       wl_resource_post_event(ref->buffer->resource,
> +                                              WL_BUFFER_RELEASE);
>                 }
>                 wl_list_remove(&ref->destroy_listener.link);
>         }
> --
> 1.8.3.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list