diff options
author | Peter Maydell | 2019-01-23 18:57:47 +0100 |
---|---|---|
committer | Peter Maydell | 2019-01-23 18:57:47 +0100 |
commit | f6b06fcceef465de0cf2514c9f76fe0192896781 (patch) | |
tree | 9454c773ed95151b361c9402533925039e277daa /ui/vnc.c | |
parent | Merge remote-tracking branch 'remotes/edgar/tags/edgar/xilinx-next-2019-01-22... (diff) | |
parent | egl-helpers.h: do not depend on X11 Window type, use EGLNativeWindowType (diff) | |
download | qemu-f6b06fcceef465de0cf2514c9f76fe0192896781.tar.gz qemu-f6b06fcceef465de0cf2514c9f76fe0192896781.tar.xz qemu-f6b06fcceef465de0cf2514c9f76fe0192896781.zip |
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190121-pull-request' into staging
ui: highres logo for sdl and gtk, bugfixes for vnc and egl.
# gpg: Signature made Mon 21 Jan 2019 14:11:39 GMT
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/ui-20190121-pull-request:
egl-helpers.h: do not depend on X11 Window type, use EGLNativeWindowType
vnc: detect and optimize pageflips
sdl: add support for high resolution window icon
ui: fix icon display for GTK frontend under GNOME Shell with Wayland
ui: install logo icons to $prefix/share/icons
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r-- | ui/vnc.c | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -742,6 +742,17 @@ static void vnc_update_server_surface(VncDisplay *vd) width, height); } +static bool vnc_check_pageflip(DisplaySurface *s1, + DisplaySurface *s2) +{ + return (s1 != NULL && + s2 != NULL && + surface_width(s1) == surface_width(s2) && + surface_height(s1) == surface_height(s2) && + surface_format(s1) == surface_format(s2)); + +} + static void vnc_dpy_switch(DisplayChangeListener *dcl, DisplaySurface *surface) { @@ -749,6 +760,7 @@ static void vnc_dpy_switch(DisplayChangeListener *dcl, "Display output is not active."; static DisplaySurface *placeholder; VncDisplay *vd = container_of(dcl, VncDisplay, dcl); + bool pageflip = vnc_check_pageflip(vd->ds, surface); VncState *vs; if (surface == NULL) { @@ -761,14 +773,21 @@ static void vnc_dpy_switch(DisplayChangeListener *dcl, vnc_abort_display_jobs(vd); vd->ds = surface; - /* server surface */ - vnc_update_server_surface(vd); - /* guest surface */ qemu_pixman_image_unref(vd->guest.fb); vd->guest.fb = pixman_image_ref(surface->image); vd->guest.format = surface->format; + if (pageflip) { + vnc_set_area_dirty(vd->guest.dirty, vd, 0, 0, + surface_width(surface), + surface_height(surface)); + return; + } + + /* server surface */ + vnc_update_server_surface(vd); + QTAILQ_FOREACH(vs, &vd->clients, next) { vnc_colordepth(vs); vnc_desktop_resize(vs); |