virtio-gpu/win32: allocate shareable 2d resources/images

Allocate pixman bits for scanouts with qemu_win32_map_alloc() so we can
set a shareable handle on the associated display surface.

Note: when bits are provided to pixman_image_create_bits(), you must also give
the rowstride (the argument is ignored when bits is NULL)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230606115658.677673-11-marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2023-06-06 15:56:47 +04:00
parent 09b4c198b8
commit 9462ff4695
2 changed files with 46 additions and 3 deletions

View file

@ -48,6 +48,9 @@ struct virtio_gpu_simple_resource {
unsigned int iov_cnt;
uint32_t scanout_bitmask;
pixman_image_t *image;
#ifdef WIN32
HANDLE handle;
#endif
uint64_t hostmem;
uint64_t blob_size;