39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
|
From 214b3396de62ace3e93ba14e5cff015244a52aff Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
||
|
Date: Thu, 8 Jun 2017 00:41:49 +0400
|
||
|
Subject: [PATCH spice-gtk 2/2] widget: call gl-draw when skipping draw
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
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@redhat.com>
|
||
|
Acked-by: Victor Toso <victortoso@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 1e09389..979e5fb 100644
|
||
|
--- a/src/spice-widget.c
|
||
|
+++ b/src/spice-widget.c
|
||
|
@@ -2891,7 +2891,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) {
|
||
|
+ SPICE_DEBUG("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.1.395.gf7b71de06
|
||
|
|