diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2019-02-05 14:01:29 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2019-02-05 14:01:29 +0000 |
| commit | 01a9a51ffaf4699827ea6425cb2b834a356e159d (patch) | |
| tree | 9e068156b4102402649fcbceb8c3a2e462cfae25 /ui/egl-helpers.c | |
| parent | 1c3d45df5e94042d5fb2bb31416072563ab30e49 (diff) | |
| parent | 19c1b9fd3dd5955893c0d3c187a4180313e9a0f1 (diff) | |
| download | focaccia-qemu-01a9a51ffaf4699827ea6425cb2b834a356e159d.tar.gz focaccia-qemu-01a9a51ffaf4699827ea6425cb2b834a356e159d.zip | |
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190205-pull-request' into staging
ui: add kbd stats tracker. ui: gtk scroll fixes. ui: egl cursor scale fix. ui: more sdl1 cleanup. # gpg: Signature made Tue 05 Feb 2019 10:57:42 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20190205-pull-request: keymap: fix keyup mappings keymap: pass full keyboard state to keysym2scancode kbd-state: use state tracker for vnc kbd-state: use state tracker for gtk sdl2: use only QKeyCode in sdl2_process_key() kbd-state: use state tracker for sdl2 sdl2: remove sdl2_reset_keys() function kbd-state: add keyboard state tracker ui/egl-helpers: Augment parameter list of egl_texture_blend() to convey scales of viewport ui/cocoa.m: Fix macOS 10.14 deprecation warnings ui/sdl_keysym: Remove obsolete SDL1.2 related code ui: listen for GDK_SMOOTH_SCROLL events ui: don't send any event if delta_y == 0 Remove deprecated -no-frame option Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/egl-helpers.c')
| -rw-r--r-- | ui/egl-helpers.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 5e115b3fb4..e90eef8c9c 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -120,14 +120,15 @@ void egl_texture_blit(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip) } void egl_texture_blend(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip, - int x, int y) + int x, int y, double scale_x, double scale_y) { glBindFramebuffer(GL_FRAMEBUFFER_EXT, dst->framebuffer); + int w = scale_x * src->width; + int h = scale_y * src->height; if (flip) { - glViewport(x, y, src->width, src->height); + glViewport(x, y, w, h); } else { - glViewport(x, dst->height - src->height - y, - src->width, src->height); + glViewport(x, dst->height - h - y, w, h); } glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, src->texture); |