Skip to content

Commit 77bf310

Browse files
downorelmarco
authored andcommitted
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 <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Marc-André Lureau <[email protected]> Cc: Daniel P. Berrangé <[email protected]> Signed-off-by: Dongwon Kim <[email protected]> Acked-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]>
1 parent 4158263 commit 77bf310

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ui/gtk-egl.c

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
150150
vc, vc->window ? vc->window : vc->gfx.drawing_area);
151151

152152
if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) {
153+
gd_egl_draw(vc);
153154
return;
154155
}
155156

ui/gtk-gl-area.c

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
126126
gd_update_monitor_refresh_rate(vc, vc->window ? vc->window : vc->gfx.drawing_area);
127127

128128
if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) {
129+
gd_gl_area_draw(vc);
129130
return;
130131
}
131132

0 commit comments

Comments
 (0)