[PATCH spice-gtk 4/5] widget: call gl-draw when skipping draw

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

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

It's a bad idea to hold the GL scanout for a long time, especially in
error cases. (fwiw, qemu has 1s tolerance before complaining, and the
guest is most likely going to hang meanwhile, stuck on the GPU)

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
 src/spice-widget.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/spice-widget.c b/src/spice-widget.c
index 319d867..c7c48f1 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -2893,7 +2893,11 @@ static void gl_draw(SpiceDisplay *display,
 
     set_egl_enabled(display, true);
 
-    g_return_if_fail(d->egl.context_ready);
+    if (!d->egl.context_ready) {
+        DISPLAY_DEBUG(display, "Draw without GL context, skipping");
+        spice_display_gl_draw_done(SPICE_DISPLAY_CHANNEL(d->display));
+        return;
+    }
 
 #if GTK_CHECK_VERSION(3,16,0)
     GtkWidget *gl = gtk_stack_get_child_by_name(d->stack, "gl-area");
-- 
2.13.0.91.g00982b8dd

_______________________________________________
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]