[Spice-devel] [PATCH spice-gtk 4/5] widget: call gl-draw when skipping draw
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Wed Jun 7 20:55:40 UTC 2017
From: Marc-André Lureau <marcandre.lureau at redhat.com>
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 at redhat.com>
---
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
More information about the Spice-devel
mailing list