diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2025-05-25 09:50:54 -0400 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2025-05-25 09:50:54 -0400 |
| commit | 6f388a37e6dc2df4457692afe6adb5448b7db31d (patch) | |
| tree | c7e8dbc79b70b26d3da2ce03f4092dcd93c0e838 /ui/egl-helpers.c | |
| parent | 668df86ee8076152320345d8e36be7c95ec0a09a (diff) | |
| parent | f05e1a93f48729b568fdf86a12d56ee142cee5e1 (diff) | |
| download | focaccia-qemu-6f388a37e6dc2df4457692afe6adb5448b7db31d.tar.gz focaccia-qemu-6f388a37e6dc2df4457692afe6adb5448b7db31d.zip | |
Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging
UI-related - vdagent migration support - gtk: improve scale handling # -----BEGIN PGP SIGNATURE----- # # iQJQBAABCgA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmgyAywcHG1hcmNhbmRy # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5TbTD/4/3da55xtH0yVSol+G # T6S7F1GKUbSCi0y/t+PiG2usiE17euZ+m1mKBAOT2kObehS3gWybIreNBZ3IAPZg # Hm8RoIU6yStui2RZ/rKx2d1P2nq3mMmaB7uToHwPl6KsO2hYm75zmXCGH6oBI+ah # muNkxzsIky9qnOaKeZRODPkPiG1LXfte0IYV6wkpBcXUqE595rQfD9WDuOJ7WKJe # T1GiwxdClZGBM6SahDhfwdoFx1yTk8rTtTdYM0K3W7xMQGvCKLGQHDmS7JeQ1lm3 # 42H3kh760UwNqSyk4L0TWZiGrsEWCsbU7heiRLeVL/FBA8N2TWL6xKB/xSO4duJ3 # v63652/rNh18AFnSRu0CaIBwf/hXfLpU/cKv/Sqmm2X8FjD7dLMyaAHCz1BC0acU # +VA8JKRu7F5GbsisaYyG4lY6u8IBw9sq/FhyNBflBy3MQl0v4PV5x1eqDbGT1560 # k2bQbIChumn8U4TmEA1IHDFX45cdxZmlgnt7yq+SUn5/CmRJrXAlacPRje4A4omL # YS3Y1Qn4X7sXyIdoHvxofng2NU0nfZX9az27aXsGkRNtzjibZzjl8rJKcaCx0LGQ # uFJwA+ArCJjTJ3EB09373iGixW0Vuv4dM4IkNp+QGoCOVH0jeER6bs9cNROG6WmS # e1nWuW0hZgmdusw1S0ncxFc+YA== # =SjRP # -----END PGP SIGNATURE----- # gpg: Signature made Sat 24 May 2025 13:34:36 EDT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu: ui/gtk-egl: Render guest content with padding in fixed-scale mode ui/gtk-gl-area: Render guest content with padding in fixed-scale mode ui/gtk: Consider scaling when propagating ui info ui/gtk: Don't update scale in fixed scale mode in gtk-egl.c ui/sdl: Consider scaling in mouse event handling ui/gtk: Update scales in fixed-scale mode when rendering GL area gtk/ui: Introduce helper gd_update_scale ui/gtk: Use consistent naming for variables in different coordinates ui/gtk: Document scale and coordinate handling ui/vdagent: remove migration blocker ui/vdagent: add migration support ui/vdagent: factor out clipboard peer registration ui/vdagent: keep "connected" state ui/vdagent: replace Buffer with GByteArray ui/clipboard: delay clipboard update when not running ui/clipboard: add vmstate_cbinfo ui/clipboard: split out QemuClipboardContent ui/clipboard: use int for selection field ui/gtk: warn if setting the clipboard failed Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'ui/egl-helpers.c')
| -rw-r--r-- | ui/egl-helpers.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 9cda2bbbee..5503a795e4 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -93,14 +93,18 @@ void egl_fb_destroy(egl_fb *fb) fb->width = 0; fb->height = 0; + fb->x = 0; + fb->y = 0; fb->texture = 0; fb->framebuffer = 0; } -void egl_fb_setup_default(egl_fb *fb, int width, int height) +void egl_fb_setup_default(egl_fb *fb, int width, int height, int x, int y) { fb->width = width; fb->height = height; + fb->x = x; + fb->y = y; fb->framebuffer = 0; /* default framebuffer */ } @@ -145,6 +149,7 @@ void egl_fb_blit(egl_fb *dst, egl_fb *src, bool flip) glBindFramebuffer(GL_READ_FRAMEBUFFER, src->framebuffer); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, dst->framebuffer); glViewport(0, 0, dst->width, dst->height); + glClear(GL_COLOR_BUFFER_BIT); if (src->dmabuf) { x1 = qemu_dmabuf_get_x(src->dmabuf); @@ -161,7 +166,8 @@ void egl_fb_blit(egl_fb *dst, egl_fb *src, bool flip) x2 = x1 + w; glBlitFramebuffer(x1, y1, x2, y2, - 0, 0, dst->width, dst->height, + dst->x, dst->y, + dst->x + dst->width, dst->y + dst->height, GL_COLOR_BUFFER_BIT, GL_LINEAR); } |