[Spice-devel] [PATCH spice-gtk v2 3/8] widget: enable egl before updating scanout

Pavel Grunt pgrunt at redhat.com
Wed Mar 23 19:39:03 UTC 2016


Acked-by: Pavel Grunt <pgrunt at redhat.com>

On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote:
> The GLArea is realized lazily, when it is made visible in
> set_egl_enabled(). The egl context is initialized once the GLArea is
> realized. Enable egl before updating the scanout.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
> ---
>  src/spice-widget.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/spice-widget.c b/src/spice-widget.c
> index 8518ec6..198d0cd 100644
> --- a/src/spice-widget.c
> +++ b/src/spice-widget.c
> @@ -2486,14 +2486,14 @@ static void gl_scanout(SpiceDisplay *display)
>      const SpiceGlScanout *scanout;
>      GError *err = NULL;
>  
> +    SPICE_DEBUG("%s: got scanout",  __FUNCTION__);
> +    set_egl_enabled(display, true);
> +
>      g_return_if_fail(d->egl.context_ready);
>  
>      scanout = spice_display_get_gl_scanout(SPICE_DISPLAY_CHANNEL(d-
> >display));
>      g_return_if_fail(scanout != NULL);
>  
> -    SPICE_DEBUG("%s: got scanout",  __FUNCTION__);
> -    set_egl_enabled(display, true);
> -
>      if (!spice_egl_update_scanout(display, scanout, &err)) {
>          g_critical("update scanout failed: %s", err->message);
>          g_clear_error(&err);


More information about the Spice-devel mailing list