qemu-cr16/ui
Juraj Marcin 0310d594d9 ui/vnc: Update display update interval when VM state changes to RUNNING
If a virtual machine is paused for an extended period time, for example,
due to an incoming migration, there are also no changes on the screen.
VNC in such case increases the display update interval by
VNC_REFRESH_INTERVAL_INC (50 ms). The update interval can then grow up
to VNC_REFRESH_INTERVAL_MAX (3000 ms).

When the machine resumes, it can then take up to 3 seconds for the first
display update. Furthermore, the update interval is then halved with
each display update with changes on the screen. If there are moving
elements on the screen, such as a video, this can be perceived as
freezing and stuttering for few seconds before the movement is smooth
again.

This patch resolves this issue, by adding a listener to VM state changes
and changing the update interval when the VM state changes to RUNNING.
The update_displaychangelistener() function updates the internal timer,
and the display is refreshed immediately if the timer is expired.

Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Link: https://lore.kernel.org/r/20250521151616.3951178-1-jmarcin@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
2025-06-23 16:03:59 -04:00
..
icons
shader
clipboard.c ui/clipboard: delay clipboard update when not running 2025-05-24 16:33:18 +02:00
cocoa.m
console-gl.c
console-priv.h
console-vc-stubs.c
console-vc.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
console.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
curses.c
curses_keys.h
cursor.c
cursor_hidden.xpm
cursor_left_ptr.xpm
dbus-chardev.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
dbus-clipboard.c
dbus-console.c
dbus-display1.xml ui/dbus: change dbus ScanoutDMABUF interface 2025-05-06 13:39:47 +04:00
dbus-error.c
dbus-listener.c ui/dbus: change dbus ScanoutDMABUF interface 2025-05-06 13:39:47 +04:00
dbus-module.c
dbus.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
dbus.h
dmabuf.c ui/dmabuf: extend QemuDmaBuf to support multi-plane 2025-05-06 11:57:03 +04:00
egl-context.c
egl-headless.c
egl-helpers.c ui/gtk-egl: Render guest content with padding in fixed-scale mode 2025-05-24 17:04:09 +02:00
gtk-clipboard.c ui/gtk: warn if setting the clipboard failed 2025-05-24 16:33:17 +02:00
gtk-egl.c ui/gtk-egl: Render guest content with padding in fixed-scale mode 2025-05-24 17:04:09 +02:00
gtk-gl-area.c ui/gtk-gl-area: Render guest content with padding in fixed-scale mode 2025-05-24 17:04:00 +02:00
gtk.c ui/gtk: Consider scaling when propagating ui info 2025-05-24 17:03:50 +02:00
input-barrier.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
input-barrier.h
input-keymap.c
input-legacy.c
input-linux.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
input.c
kbd-state.c
keymaps.c
keymaps.h
meson.build meson: remove unnecessary dependencies from specific_ss 2025-05-12 16:08:24 +02:00
qemu-pixman.c ui/vnc: take account of client byte order in pixman format 2025-05-21 19:28:01 +01:00
qemu-x509.h
qemu.desktop
sdl2-2d.c
sdl2-gl.c ui/gtk-egl: Render guest content with padding in fixed-scale mode 2025-05-24 17:04:09 +02:00
sdl2-input.c
sdl2.c ui/sdl: Consider scaling in mouse event handling 2025-05-24 17:03:31 +02:00
shader.c
spice-app.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spice-core.c
spice-display.c ui/spice: support multi plane dmabuf scanout 2025-05-06 13:40:09 +04:00
spice-input.c
spice-module.c
trace-events
trace.h
udmabuf.c
ui-hmp-cmds.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
ui-qmp-cmds.c
util.c
vdagent.c ui/vdagent: remove migration blocker 2025-05-24 16:33:18 +02:00
vgafont.h
vnc-auth-sasl.c
vnc-auth-sasl.h
vnc-auth-vencrypt.c
vnc-auth-vencrypt.h
vnc-clipboard.c
vnc-enc-hextile-template.h
vnc-enc-hextile.c
vnc-enc-tight.c ui/vnc: fix tight palette pixel encoding for 8/16-bpp formats 2025-05-21 19:36:15 +01:00
vnc-enc-tight.h
vnc-enc-zlib.c
vnc-enc-zrle.c ui/vnc.c: replace big endian flag with byte order value 2025-05-21 19:28:01 +01:00
vnc-enc-zrle.c.inc
vnc-enc-zrle.h
vnc-enc-zywrle-template.c
vnc-enc-zywrle.h
vnc-jobs.c ui/vnc.c: replace big endian flag with byte order value 2025-05-21 19:28:01 +01:00
vnc-jobs.h
vnc-palette.c
vnc-palette.h
vnc-stubs.c
vnc-ws.c
vnc-ws.h
vnc.c ui/vnc: Update display update interval when VM state changes to RUNNING 2025-06-23 16:03:59 -04:00
vnc.h ui/vnc: Update display update interval when VM state changes to RUNNING 2025-06-23 16:03:59 -04:00
vnc_keysym.h
win32-kbd-hook.c
x_keymap.c
x_keymap.h