[RFC PATCH 0/3] ui/gtk: no render event when vc is invisible

Dongwon Kim posted 3 patches 1 year, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221026190421.16922-1-dongwon.kim@intel.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
include/ui/gtk.h |  1 +
ui/gtk-egl.c     |  8 ++++++++
ui/gtk-gl-area.c |  8 ++++++++
ui/gtk.c         | 51 +++++++++++++++++++++++++++++++++++++++++++++---
4 files changed, 65 insertions(+), 3 deletions(-)
[RFC PATCH 0/3] ui/gtk: no render event when vc is invisible
Posted by Dongwon Kim 1 year, 6 months ago
This patchset adds a new mechanism in gtk/ui that makes it stop
scheduling a render event if VC is invisible and also change the status
of guest display to disconnected so that the guest stop further
submission of new frames.

This prevents the guest (using  blob scanout w/ egl fence sync) from being
locked up when the submitted frame is in pending state for too long when
the VC is hidden behind a inactivated tab or detached window for it is
minimized, where a render event is scheduled but doesn't get a chance to be
executed until the VC is visible again.

A flag "visible" under vc->gfx was added to indicate the visibilty
status of VC for the mechanism. And resizing VC to 0 was used to
inactivate the scanout , which eventually makes the guest display
shown as disconnected on the guest's side.

Dongwon Kim (3):
  ui/gtk: skip drawing guest scanout when associated VC is invisible
  ui/gtk: set the ui size to 0 when invisible
  ui/gtk: reset visible flag when window is minimized

 include/ui/gtk.h |  1 +
 ui/gtk-egl.c     |  8 ++++++++
 ui/gtk-gl-area.c |  8 ++++++++
 ui/gtk.c         | 51 +++++++++++++++++++++++++++++++++++++++++++++---
 4 files changed, 65 insertions(+), 3 deletions(-)

-- 
2.30.2