]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ui/gtk: Draw guest frame at refresh cycle
authorDongwon Kim <dongwon.kim@intel.com>
Fri, 26 Apr 2024 22:50:59 +0000 (15:50 -0700)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 14 May 2024 13:14:12 +0000 (17:14 +0400)
Draw routine needs to be manually invoked in the next refresh
if there is a scanout blob from the guest. This is to prevent
a situation where there is a scheduled draw event but it won't
happen bacause the window is currently in inactive state
(minimized or tabified). If draw is not done for a long time,
gl_block timeout and/or fence timeout (on the guest) will happen
eventually.

v2: Use gd_gl_area_draw(vc) in gtk-gl-area.c

Suggested-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20240426225059.3871283-1-dongwon.kim@intel.com>

ui/gtk-egl.c
ui/gtk-gl-area.c

index 3af5ac5bcf336244efbdb42ef08d5754364d0927..75f6b9011a5caf049dee4cafe15f0b1d3f8c6adf 100644 (file)
@@ -150,6 +150,7 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
             vc, vc->window ? vc->window : vc->gfx.drawing_area);
 
     if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) {
+        gd_egl_draw(vc);
         return;
     }
 
index 52dcac161e25759e06460109430f4a8ce993895e..4fff957c3f08028337a7db4e43531fad9eefe10c 100644 (file)
@@ -126,6 +126,7 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
     gd_update_monitor_refresh_rate(vc, vc->window ? vc->window : vc->gfx.drawing_area);
 
     if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) {
+        gd_gl_area_draw(vc);
         return;
     }