summary refs log tree commit diff stats
path: root/include/hw/virtio/virtio-gpu.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2024-10-08 16:50:27 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-10-14 17:34:09 +0400
commit1ff788db9781615be745671ebdb2eb82c137c5b8 (patch)
tree85b092cc9ac20e344f99259a81bc2741740317f3 /include/hw/virtio/virtio-gpu.h
parent5f899c34af1dbb0f621287faf9bcfb60fa237543 (diff)
downloadfocaccia-qemu-1ff788db9781615be745671ebdb2eb82c137c5b8.tar.gz
focaccia-qemu-1ff788db9781615be745671ebdb2eb82c137c5b8.zip
ui: refactor using a common qemu_pixman_shareable
Use a common shareable type for win32 & unix, and helper functions.
This simplify the code as it avoids a lot of #ifdef'ery.

Note: if it helps review, commits could be reordered to introduce the
common type before introducing shareable memory for unix.

Suggested-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-ID: <20241008125028.1177932-19-marcandre.lureau@redhat.com>
Diffstat (limited to 'include/hw/virtio/virtio-gpu.h')
-rw-r--r--include/hw/virtio/virtio-gpu.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 7509d13265..e343110e23 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -51,11 +51,7 @@ struct virtio_gpu_simple_resource {
     unsigned int iov_cnt;
     uint32_t scanout_bitmask;
     pixman_image_t *image;
-#ifdef WIN32
-    HANDLE handle;
-#else
-    int shmfd;
-#endif
+    qemu_pixman_shareable share_handle;
     uint64_t hostmem;
 
     uint64_t blob_size;