summaryrefslogtreecommitdiffstats
path: root/include/ui/console.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-04-01 10:27:20 +0200
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 20:03:49 -0600
commit3da6ee87debb12f37711370a1b831e7dd2d30b69 (patch)
tree6ba7aff9c13378baaf5c8b10c3aa640619473f76 /include/ui/console.h
parent02b27b3928ce733d1d306376a4bab87b69cba6a6 (diff)
downloadhqemu-3da6ee87debb12f37711370a1b831e7dd2d30b69.zip
hqemu-3da6ee87debb12f37711370a1b831e7dd2d30b69.tar.gz
ui/virtio-gpu: add and use qemu_create_displaysurface_pixman
Add a the new qemu_create_displaysurface_pixman function, to create a DisplaySurface backed by an existing pixman image. In that case there is no need to create a new pixman image pointing to the same backing storage. We can just use the existing image directly. This does not only simplify things a bit, but most importantly it gets the reference counting right, so the backing storage for the pixman image wouldn't be released underneath us. Use new function in virtio-gpu, where using it actually fixes use-after-free crashes. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1459499240-742-1-git-send-email-kraxel@redhat.com
Diffstat (limited to 'include/ui/console.h')
-rw-r--r--include/ui/console.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ui/console.h b/include/ui/console.h
index eb9419d..d5a88d9 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -234,6 +234,7 @@ DisplayState *init_displaystate(void);
DisplaySurface *qemu_create_displaysurface_from(int width, int height,
pixman_format_code_t format,
int linesize, uint8_t *data);
+DisplaySurface *qemu_create_displaysurface_pixman(pixman_image_t *image);
DisplaySurface *qemu_create_displaysurface_guestmem(int width, int height,
pixman_format_code_t format,
int linesize,
OpenPOWER on IntegriCloud