Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ui/gtk: skip refresh if new dmabuf has been submitted
Skip refresh if a new dmabuf (guest scanout frame) has already been
submitted and ready to be drawn because the scanout will be updated
with new frame anyway.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20230706183355.29361-2-dongwon.kim@intel.com>
  • Loading branch information
downor authored and elmarco committed Jul 17, 2023
1 parent 92b5815 commit 1be878e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/gtk-egl.c
Expand Up @@ -148,6 +148,10 @@ void gd_egl_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) {
return;
}

if (!vc->gfx.esurface) {
gd_egl_init(vc);
if (!vc->gfx.esurface) {
Expand Down
4 changes: 4 additions & 0 deletions ui/gtk-gl-area.c
Expand Up @@ -125,6 +125,10 @@ 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) {
return;
}

if (!vc->gfx.gls) {
if (!gtk_widget_get_realized(vc->gfx.drawing_area)) {
return;
Expand Down

0 comments on commit 1be878e

Please sign in to comment.