mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
display/ui: add a callback to indicate GL state is flushed
Displaying rendered resources requires blocking qemu GPU to avoid extra framebuffer copies. For an external display, via Spice currently, there is a callback to block/unblock the rendering in the same thread. But with the vhost-user-gpu backend, the qemu process doesn't handle the rendering itself, and the blocking callback isn't effective. Instead, the backend must be notified when the display code is done. Fix this by adding a new GraphicHwOps callback to indicate the GL state is flushed, and we are done manipulating the shared GL resources. Call it from gtk and spice display. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210204105232.834642-19-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
committed by
Gerd Hoffmann
parent
f8f3c2719e
commit
3cddb8b9e0
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user