mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
ui/pixman: generalize shared_image_destroy
Learn to free memfd-allocated shared memory. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-ID: <20241008125028.1177932-10-marcandre.lureau@redhat.com>
This commit is contained in:
parent
c90204b654
commit
1bfb726112
4 changed files with 16 additions and 12 deletions
|
@ -298,7 +298,7 @@ static void virtio_gpu_resource_create_2d(VirtIOGPU *g,
|
|||
bits, c2d.height ? res->hostmem / c2d.height : 0);
|
||||
#ifdef WIN32
|
||||
if (res->image) {
|
||||
pixman_image_set_destroy_function(res->image, qemu_pixman_win32_image_destroy, res->handle);
|
||||
pixman_image_set_destroy_function(res->image, qemu_pixman_shared_image_destroy, res->handle);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1317,7 +1317,7 @@ static int virtio_gpu_load(QEMUFile *f, void *opaque, size_t size,
|
|||
return -EINVAL;
|
||||
}
|
||||
#ifdef WIN32
|
||||
pixman_image_set_destroy_function(res->image, qemu_pixman_win32_image_destroy, res->handle);
|
||||
pixman_image_set_destroy_function(res->image, qemu_pixman_shared_image_destroy, res->handle);
|
||||
#endif
|
||||
|
||||
res->addrs = g_new(uint64_t, res->iov_cnt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue