[PATCH] compositor: page flip away from a client buffer if it's destroyed

Kristian Høgsberg krh at bitplanet.net
Fri Oct 28 09:50:51 PDT 2011


On Wed, Oct 26, 2011 at 9:48 AM, Ander Conselvan de Oliveira
<ander.conselvan.de.oliveira at intel.com> wrote:
> If the current or pending scanout buffer is destroyed, the client frame
> will remain being displayed until something else causes a repaint to be
> scheduled.

Ah, yes, true.  In the case of destroying the scanout buffer, we might
just repainted and have a pageflip pending to one of the compositors
buffers.  In other words, pending_scanout_buffer is NULL, but we don't
need to schedule a repaint.  We could optimize that away with yet
another flag to track this state, but I don't think that's worth the
trouble.

Thanks, committed.
Kristian

> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> ---
>  compositor/compositor.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/compositor/compositor.c b/compositor/compositor.c
> index 772b0bb..e4b8d92 100644
> --- a/compositor/compositor.c
> +++ b/compositor/compositor.c
> @@ -220,6 +220,9 @@ output_handle_scanout_buffer_destroy(struct wl_listener *listener,
>                             scanout_buffer_destroy_listener);
>
>        output->scanout_buffer = NULL;
> +
> +       if (!output->pending_scanout_buffer)
> +               wlsc_compositor_schedule_repaint(output->compositor);
>  }
>
>  static void
> @@ -232,6 +235,8 @@ output_handle_pending_scanout_buffer_destroy(struct wl_listener *listener,
>                             pending_scanout_buffer_destroy_listener);
>
>        output->pending_scanout_buffer = NULL;
> +
> +       wlsc_compositor_schedule_repaint(output->compositor);
>  }
>
>
> --
> 1.7.4.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