aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/console.c9
-rw-r--r--ui/gtk-egl.c3
-rw-r--r--ui/gtk-gl-area.c3
-rw-r--r--ui/sdl2-gl.c2
-rw-r--r--ui/spice-display.c1
5 files changed, 18 insertions, 0 deletions
diff --git a/ui/console.c b/ui/console.c
index d8cc640c28..c5d11bc701 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -294,6 +294,15 @@ void graphic_hw_gl_block(QemuConsole *con, bool block)
}
}
+void graphic_hw_gl_flushed(QemuConsole *con)
+{
+ assert(con != NULL);
+
+ if (con->hw_ops->gl_flushed) {
+ con->hw_ops->gl_flushed(con->hw);
+ }
+}
+
int qemu_console_get_window_id(QemuConsole *con)
{
return con->window_id;
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index 71c3d698b4..588e7b1bb1 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -92,6 +92,9 @@ void gd_egl_draw(VirtualConsole *vc)
vc->gfx.scale_x = (double)ww / surface_width(vc->gfx.ds);
vc->gfx.scale_y = (double)wh / surface_height(vc->gfx.ds);
}
+
+ glFlush();
+ graphic_hw_gl_flushed(vc->gfx.dcl.con);
}
void gd_egl_update(DisplayChangeListener *dcl,
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 72bcd94918..e7ca73c7b1 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -70,6 +70,9 @@ void gd_gl_area_draw(VirtualConsole *vc)
surface_gl_setup_viewport(vc->gfx.gls, vc->gfx.ds, ww, wh);
surface_gl_render_texture(vc->gfx.gls, vc->gfx.ds);
}
+
+ glFlush();
+ graphic_hw_gl_flushed(vc->gfx.dcl.con);
}
void gd_gl_area_update(DisplayChangeListener *dcl,
diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c
index 82139ba49e..fd594d7461 100644
--- a/ui/sdl2-gl.c
+++ b/ui/sdl2-gl.c
@@ -58,6 +58,7 @@ static void sdl2_gl_render_surface(struct sdl2_console *scon)
surface_gl_render_texture(scon->gls, scon->surface);
SDL_GL_SwapWindow(scon->real_window);
+ graphic_hw_gl_flushed(scon->dcl.con);
}
void sdl2_gl_update(DisplayChangeListener *dcl,
@@ -240,4 +241,5 @@ void sdl2_gl_scanout_flush(DisplayChangeListener *dcl,
egl_fb_blit(&scon->win_fb, &scon->guest_fb, !scon->y0_top);
SDL_GL_SwapWindow(scon->real_window);
+ graphic_hw_gl_flushed(dcl->con);
}
diff --git a/ui/spice-display.c b/ui/spice-display.c
index dccac4710a..6f32b66a6e 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -826,6 +826,7 @@ static void qemu_spice_gl_unblock_bh(void *opaque)
SimpleSpiceDisplay *ssd = opaque;
qemu_spice_gl_block(ssd, false);
+ graphic_hw_gl_flushed(ssd->dcl.con);
}
static void qemu_spice_gl_block_timer(void *opaque)