diff options
author | Peter Maydell | 2017-02-27 20:19:46 +0100 |
---|---|---|
committer | Peter Maydell | 2017-02-27 20:19:46 +0100 |
commit | 9b9fbe8a4e9eec9072ee2697a6af59144442785f (patch) | |
tree | b6a571c3043a91769fec5e22f616d4b306063f01 /ui/gtk-egl.c | |
parent | Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-02-27-1... (diff) | |
parent | vnc: fix double free issues (diff) | |
download | qemu-9b9fbe8a4e9eec9072ee2697a6af59144442785f.tar.gz qemu-9b9fbe8a4e9eec9072ee2697a6af59144442785f.tar.xz qemu-9b9fbe8a4e9eec9072ee2697a6af59144442785f.zip |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20170227-1' into staging
gtk: fix kbd on xwayland
vnc: fix double free issues
opengl improvements
# gpg: Signature made Mon 27 Feb 2017 16:11:30 GMT
# gpg: using RSA key 0x4CB6D8EED3E87138
# 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/pull-ui-20170227-1:
vnc: fix double free issues
spice: add display & head options
ui: Use XkbGetMap and XkbGetNames instead of XkbGetKeyboard
gtk-egl: add scanout_disable support
sdl2: add scanout_disable support
spice: add scanout_disable support
virtio-gpu: use dpy_gl_scanout_disable
console: add dpy_gl_scanout_disable
console: rename dpy_gl_scanout to dpy_gl_scanout_texture
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/gtk-egl.c')
-rw-r--r-- | ui/gtk-egl.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 3f5d328c7b..d53288f027 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -170,11 +170,21 @@ QEMUGLContext gd_egl_create_context(DisplayChangeListener *dcl, return qemu_egl_create_context(dcl, params); } -void gd_egl_scanout(DisplayChangeListener *dcl, - uint32_t backing_id, bool backing_y_0_top, - uint32_t backing_width, uint32_t backing_height, - uint32_t x, uint32_t y, - uint32_t w, uint32_t h) +void gd_egl_scanout_disable(DisplayChangeListener *dcl) +{ + VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl); + + vc->gfx.w = 0; + vc->gfx.h = 0; + vc->gfx.tex_id = 0; + gtk_egl_set_scanout_mode(vc, false); +} + +void gd_egl_scanout_texture(DisplayChangeListener *dcl, + uint32_t backing_id, bool backing_y_0_top, + uint32_t backing_width, uint32_t backing_height, + uint32_t x, uint32_t y, + uint32_t w, uint32_t h) { VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl); @@ -188,11 +198,6 @@ void gd_egl_scanout(DisplayChangeListener *dcl, eglMakeCurrent(qemu_egl_display, vc->gfx.esurface, vc->gfx.esurface, vc->gfx.ectx); - if (vc->gfx.tex_id == 0 || vc->gfx.w == 0 || vc->gfx.h == 0) { - gtk_egl_set_scanout_mode(vc, false); - return; - } - gtk_egl_set_scanout_mode(vc, true); if (!vc->gfx.fbo_id) { glGenFramebuffers(1, &vc->gfx.fbo_id); |