[Spice-devel] [PATCH v3 6/9] egl: check and update scanout after egl init

Pavel Grunt pgrunt at redhat.com
Thu Mar 24 12:19:43 UTC 2016


On Thu, 2016-03-24 at 12:32 +0100, Marc-André Lureau wrote:
> Once the egl/GL context are initialized, check if there is a scanout
> to
> associate to display widget. This solves races when scanout update is
> happening before the egl/GL context is ready.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
> ---
>  src/spice-widget-egl.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
> index 151970c..b9bec68 100644
> --- a/src/spice-widget-egl.c
> +++ b/src/spice-widget-egl.c
> @@ -272,6 +272,12 @@ end:
>  
>      d->egl.context_ready = TRUE;
>  
> +    if (spice_display_get_gl_scanout(SPICE_DISPLAY_CHANNEL(d-
> >display)) != NULL) {
> +        SPICE_DEBUG("scanout present during egl init, updating
> widget");
> +        spice_display_widget_gl_scanout(display);
> +        spice_display_widget_update_monitor_area(display);
> +    }
> +
>      return TRUE;
>  }
>  


More information about the Spice-devel mailing list