2 * This work is licensed under the terms of the GNU GPL, version 2 or later.
3 * See the COPYING file in the top-level directory.
9 /* pixman-0.16.0 headers have a redundant declaration */
10 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
11 #pragma GCC diagnostic push
12 #pragma GCC diagnostic ignored "-Wredundant-decls"
15 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
16 #pragma GCC diagnostic pop
19 #include "qemu/typedefs.h"
22 * pixman image formats are defined to be native endian,
23 * that means host byte order on qemu. So we go define
24 * fixed formats here for cases where it is needed, like
25 * feeding libjpeg / libpng and writing screenshots.
28 #ifdef HOST_WORDS_BIGENDIAN
29 # define PIXMAN_BE_r8g8b8 PIXMAN_r8g8b8
31 # define PIXMAN_BE_r8g8b8 PIXMAN_b8g8r8
34 /* -------------------------------------------------------------------- */
36 PixelFormat
qemu_pixelformat_from_pixman(pixman_format_code_t format
);
37 pixman_format_code_t
qemu_default_pixman_format(int bpp
, bool native_endian
);
38 int qemu_pixman_get_type(int rshift
, int gshift
, int bshift
);
39 pixman_format_code_t
qemu_pixman_get_format(PixelFormat
*pf
);
40 bool qemu_pixman_check_format(DisplayChangeListener
*dcl
,
41 pixman_format_code_t format
);
43 pixman_image_t
*qemu_pixman_linebuf_create(pixman_format_code_t format
,
45 void qemu_pixman_linebuf_fill(pixman_image_t
*linebuf
, pixman_image_t
*fb
,
46 int width
, int x
, int y
);
47 void qemu_pixman_linebuf_copy(pixman_image_t
*fb
, int width
, int x
, int y
,
48 pixman_image_t
*linebuf
);
49 pixman_image_t
*qemu_pixman_mirror_create(pixman_format_code_t format
,
50 pixman_image_t
*image
);
51 void qemu_pixman_image_unref(pixman_image_t
*image
);
53 pixman_color_t
qemu_pixman_color(PixelFormat
*pf
, uint32_t color
);
54 pixman_image_t
*qemu_pixman_glyph_from_vgafont(int height
, const uint8_t *font
,
56 void qemu_pixman_glyph_render(pixman_image_t
*glyph
,
57 pixman_image_t
*surface
,
58 pixman_color_t
*fgcol
,
59 pixman_color_t
*bgcol
,
60 int x
, int y
, int cw
, int ch
);
62 #endif /* QEMU_PIXMAN_H */