Gerd Hoffmann | daa8e5a | 2012-11-13 09:38:06 +0100 | [diff] [blame] | 1 | /* |
| 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. |
| 4 | */ |
| 5 | |
Gerd Hoffmann | d2ec7e2 | 2012-09-25 16:23:24 +0200 | [diff] [blame] | 6 | #ifndef QEMU_PIXMAN_H |
| 7 | #define QEMU_PIXMAN_H |
| 8 | |
| 9 | #include <pixman.h> |
| 10 | |
| 11 | #include "console.h" |
| 12 | |
| 13 | /* |
| 14 | * pixman image formats are defined to be native endian, |
| 15 | * that means host byte order on qemu. So we go define |
| 16 | * fixed formats here for cases where it is needed, like |
| 17 | * feeding libjpeg / libpng and writing screenshots. |
| 18 | */ |
| 19 | |
| 20 | #ifdef HOST_WORDS_BIGENDIAN |
| 21 | # define PIXMAN_BE_r8g8b8 PIXMAN_r8g8b8 |
| 22 | #else |
| 23 | # define PIXMAN_BE_r8g8b8 PIXMAN_b8g8r8 |
| 24 | #endif |
| 25 | |
| 26 | /* -------------------------------------------------------------------- */ |
| 27 | |
| 28 | int qemu_pixman_get_type(int rshift, int gshift, int bshift); |
| 29 | pixman_format_code_t qemu_pixman_get_format(PixelFormat *pf); |
| 30 | |
| 31 | pixman_image_t *qemu_pixman_linebuf_create(pixman_format_code_t format, |
| 32 | int width); |
| 33 | void qemu_pixman_linebuf_fill(pixman_image_t *linebuf, pixman_image_t *fb, |
| 34 | int width, int y); |
Gerd Hoffmann | d9a8656 | 2012-11-02 09:12:49 +0100 | [diff] [blame] | 35 | pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format, |
| 36 | pixman_image_t *image); |
Gerd Hoffmann | d2ec7e2 | 2012-09-25 16:23:24 +0200 | [diff] [blame] | 37 | void qemu_pixman_image_unref(pixman_image_t *image); |
| 38 | |
| 39 | #endif /* QEMU_PIXMAN_H */ |