mbox series

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

Message ID 20221026190421.16922-1-dongwon.kim@intel.com (mailing list archive)
Headers show
Series ui/gtk: no render event when vc is invisible | expand

Message

Kim, Dongwon Oct. 26, 2022, 7:04 p.m. UTC
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(-)