[Spice-devel] [PATCH spice-gtk 5/7] egl: check and update scanout after egl init

Marc-André Lureau marcandre.lureau at gmail.com
Mon Mar 21 18:14:47 UTC 2016


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>
---
 src/spice-widget-egl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index 338bb3d..05fce85 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -272,6 +272,11 @@ gboolean spice_egl_init(SpiceDisplay *display, GError **err)
 
     d->egl.context_ready = TRUE;
 
+    if (spice_display_get_gl_scanout(SPICE_DISPLAY_CHANNEL(d->display))) {
+        spice_display_widget_gl_scanout(display);
+        spice_display_widget_update_monitor_area(display);
+    }
+
     return TRUE;
 }
 
-- 
2.5.0



More information about the Spice-devel mailing list