[Spice-devel] [PATCH spice-server 2/2] red-qxl: Reuse red_qxl_async_complete

Christophe Fergeau cfergeau at redhat.com
Mon Sep 18 10:10:55 UTC 2017


On Mon, Sep 11, 2017 at 09:08:55AM +0100, Frediano Ziglio wrote:
> Now that the function is a wrapper reuse it.

Acked-by: Christophe Fergeau <cfergeau at redhat.com>

> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/red-qxl.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/server/red-qxl.c b/server/red-qxl.c
> index 5815e4406..ef1f662df 100644
> --- a/server/red-qxl.c
> +++ b/server/red-qxl.c
> @@ -861,10 +861,8 @@ void spice_qxl_gl_draw_async(QXLInstance *qxl,
>      spice_return_if_fail(qxl != NULL);
>      qxl_state = qxl->st;
>      if (qxl_state->scanout.drm_dma_buf_fd == -1) {
> -        QXLInterface *interface = qxl_get_interface(qxl);
> -
>          spice_warning("called spice_qxl_gl_draw_async without a buffer");
> -        interface->async_complete(qxl, cookie);
> +        red_qxl_async_complete(qxl, cookie);
>          return;
>      }
>      spice_return_if_fail(qxl_state->gl_draw_cookie == GL_DRAW_COOKIE_INVALID);
> @@ -875,11 +873,10 @@ void spice_qxl_gl_draw_async(QXLInstance *qxl,
>  
>  void red_qxl_gl_draw_async_complete(QXLInstance *qxl)
>  {
> -    QXLInterface *interface = qxl_get_interface(qxl);
>      /* this reset before usage prevent a possible race condition */
>      uint64_t cookie = qxl->st->gl_draw_cookie;
>      qxl->st->gl_draw_cookie = GL_DRAW_COOKIE_INVALID;
> -    interface->async_complete(qxl, cookie);
> +    red_qxl_async_complete(qxl, cookie);
>  }
>  
>  void red_qxl_init(RedsState *reds, QXLInstance *qxl)
> -- 
> 2.13.5
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list