]> git.proxmox.com Git - mirror_qemu.git/commit - ui/gtk-gl-area.c
ui: Deliver refresh rate via QemuUIInfo
authorAkihiko Odaki <akihiko.odaki@gmail.com>
Sat, 26 Feb 2022 11:55:15 +0000 (20:55 +0900)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 14 Jun 2022 08:34:37 +0000 (10:34 +0200)
commitaeffd071ed818fa83c723fe8e2715144ee8385c7
treeb06d72863abc92d4625754855ee9aab6c73587f7
parent362239c05f28e8185d00d66884729a726ec4d226
ui: Deliver refresh rate via QemuUIInfo

This change adds a new member, refresh_rate to QemuUIInfo in
include/ui/console.h. It represents the refresh rate of the
physical display backend, and it is more appropriate than
GUI update interval as the refresh rate which the emulated device
reports:
- sdl may set GUI update interval shorter than the refresh rate
  of the physical display to respond to user-generated events.
- sdl and vnc aggressively changes GUI update interval, but
  a guests is typically not designed to respond to frequent
  refresh rate changes, or frequent "display mode" changes in
  general. The frequency of refresh rate changes of the physical
  display backend matches better to the guest's expectation.

QemuUIInfo also has other members representing "display mode",
which makes it suitable for refresh rate representation. It has
a throttling of update notifications, and prevents frequent changes
of the display mode.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20220226115516.59830-3-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/xenfb.c
include/ui/console.h
include/ui/gtk.h
ui/console.c
ui/gtk-egl.c
ui/gtk-gl-area.c
ui/gtk.c