aboutsummaryrefslogtreecommitdiff
path: root/ui/gtk-gl-area.c
diff options
context:
space:
mode:
authorDongwon Kim <dongwon.kim@intel.com>2024-04-26 15:50:59 -0700
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-05-14 17:14:12 +0400
commit77bf310084dad38b3a2badf01766c659056f1cf2 (patch)
treeb217b79129b386e71054c68f667df68348c4590d /ui/gtk-gl-area.c
parent41582637b1577c261f19634bdd1bb5e7ed6e258d (diff)
ui/gtk: Draw guest frame at refresh cycle
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>
Diffstat (limited to 'ui/gtk-gl-area.c')
-rw-r--r--ui/gtk-gl-area.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 52dcac161e..4fff957c3f 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -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;
}