[PATCH v3 3/9] widget: enable egl before updating scanout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Acked-by: Pavel Grunt <pgrunt@xxxxxxxxxx>
---
 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 f8bc160..03c7cd8 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -2500,14 +2500,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.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]