summaryrefslogtreecommitdiffstats
path: root/qemu-pixman.h
diff options
context:
space:
mode:
authorAnthony Liguori2012-11-01 17:14:39 +0100
committerAnthony Liguori2012-11-01 17:14:39 +0100
commit4ba79505f43bd0ace35c3fe42197eb02e7e0478e (patch)
treeeb1ecd216c1134a88ac0e2d3bc7185319c82fb95 /qemu-pixman.h
parentMerge remote-tracking branch 'stefanha/net' into staging (diff)
parentpixman: drop obsolete fields from DisplaySurface (diff)
downloadqemu-4ba79505f43bd0ace35c3fe42197eb02e7e0478e.tar.gz
qemu-4ba79505f43bd0ace35c3fe42197eb02e7e0478e.tar.xz
qemu-4ba79505f43bd0ace35c3fe42197eb02e7e0478e.zip
Merge remote-tracking branch 'kraxel/pixman.v3' into staging
* kraxel/pixman.v3: (22 commits) pixman: drop obsolete fields from DisplaySurface pixman/vnc: remove dead code. pixman/vnc: remove rgb_prepare_row* functions pixman/vnc: use pixman images in vnc. pixman: switch screendump function. vga: stop direct access to DisplaySurface fields. qxl: stop direct access to DisplaySurface fields. console: don't set PixelFormat alpha fields for 32bpp console: make qemu_alloc_display static pixman: add pixman image to DisplaySurface pixman: helper functions pixman: windup in configure & makefiles pixman: add submodule console: remove DisplayAllocator console: remove dpy_gfx_fill vga: fix text mode updating console: init displaychangelisteners on register console: untangle gfx & txt updates console: s/TextConsole/QemuConsole/ console: move set_mouse + cursor_define callbacks ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-pixman.h')
-rw-r--r--qemu-pixman.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/qemu-pixman.h b/qemu-pixman.h
new file mode 100644
index 0000000000..7652c41277
--- /dev/null
+++ b/qemu-pixman.h
@@ -0,0 +1,32 @@
+#ifndef QEMU_PIXMAN_H
+#define QEMU_PIXMAN_H
+
+#include <pixman.h>
+
+#include "console.h"
+
+/*
+ * pixman image formats are defined to be native endian,
+ * that means host byte order on qemu. So we go define
+ * fixed formats here for cases where it is needed, like
+ * feeding libjpeg / libpng and writing screenshots.
+ */
+
+#ifdef HOST_WORDS_BIGENDIAN
+# define PIXMAN_BE_r8g8b8 PIXMAN_r8g8b8
+#else
+# define PIXMAN_BE_r8g8b8 PIXMAN_b8g8r8
+#endif
+
+/* -------------------------------------------------------------------- */
+
+int qemu_pixman_get_type(int rshift, int gshift, int bshift);
+pixman_format_code_t qemu_pixman_get_format(PixelFormat *pf);
+
+pixman_image_t *qemu_pixman_linebuf_create(pixman_format_code_t format,
+ int width);
+void qemu_pixman_linebuf_fill(pixman_image_t *linebuf, pixman_image_t *fb,
+ int width, int y);
+void qemu_pixman_image_unref(pixman_image_t *image);
+
+#endif /* QEMU_PIXMAN_H */