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

Marc-André Lureau marcandre.lureau at gmail.com
Tue Mar 22 12:57:10 UTC 2016


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);
-- 
2.5.0



More information about the Spice-devel mailing list