diff options
author | Dongwon Kim <dongwon.kim@intel.com> | 2023-06-21 14:31:50 -0700 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-07-02 07:49:18 +0300 |
commit | 5cc60b67d32d4353e1fef74ba4f31f687094e24f (patch) | |
tree | 028a2d9849f5dec77c35a91095931d1b40703612 | |
parent | 3b1b9aa4d53678c9f96067fb60f94ab28bb15d75 (diff) | |
download | qemu-5cc60b67d32d4353e1fef74ba4f31f687094e24f.zip qemu-5cc60b67d32d4353e1fef74ba4f31f687094e24f.tar.gz qemu-5cc60b67d32d4353e1fef74ba4f31f687094e24f.tar.bz2 |
ui/gtk: set the area of the scanout texture correctly
x and y offsets and width and height of the scanout texture
is not correctly configured in case guest scanout frame is
dmabuf.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-ID: <20230621213150.29573-1-dongwon.kim@intel.com>
(cherry picked from commit 37802a24eb4e535d96d6fe0273505d2b5c6528c2)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | ui/gtk-egl.c | 3 | ||||
-rw-r--r-- | ui/gtk-gl-area.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 1913004..e99e3b0 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -257,7 +257,8 @@ void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl, gd_egl_scanout_texture(dcl, dmabuf->texture, dmabuf->y0_top, dmabuf->width, dmabuf->height, - 0, 0, dmabuf->width, dmabuf->height); + dmabuf->x, dmabuf->y, dmabuf->scanout_width, + dmabuf->scanout_height); if (dmabuf->allow_fences) { vc->gfx.guest_fb.dmabuf = dmabuf; diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c index c384a15..1605818 100644 --- a/ui/gtk-gl-area.c +++ b/ui/gtk-gl-area.c @@ -299,7 +299,8 @@ void gd_gl_area_scanout_dmabuf(DisplayChangeListener *dcl, gd_gl_area_scanout_texture(dcl, dmabuf->texture, dmabuf->y0_top, dmabuf->width, dmabuf->height, - 0, 0, dmabuf->width, dmabuf->height); + dmabuf->x, dmabuf->y, dmabuf->scanout_width, + dmabuf->scanout_height); if (dmabuf->allow_fences) { vc->gfx.guest_fb.dmabuf = dmabuf; |