2012-11-13 09:38:06 +01:00
|
|
|
/*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*/
|
|
|
|
|
2012-09-25 16:23:24 +02:00
|
|
|
#ifndef QEMU_PIXMAN_H
|
|
|
|
#define QEMU_PIXMAN_H
|
|
|
|
|
2013-01-09 10:17:08 +01:00
|
|
|
/* pixman-0.16.0 headers have a redundant declaration */
|
|
|
|
#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
|
|
|
|
#pragma GCC diagnostic ignored "-Wredundant-decls"
|
|
|
|
#endif
|
2012-09-25 16:23:24 +02:00
|
|
|
#include <pixman.h>
|
2013-01-09 10:17:08 +01:00
|
|
|
#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
|
|
|
|
#pragma GCC diagnostic error "-Wredundant-decls"
|
|
|
|
#endif
|
2012-09-25 16:23:24 +02:00
|
|
|
|
2013-01-21 13:03:47 +01:00
|
|
|
#include "qemu/typedefs.h"
|
2012-09-25 16:23:24 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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,
|
2012-12-14 08:54:24 +01:00
|
|
|
int width, int x, int y);
|
2012-11-02 09:12:49 +01:00
|
|
|
pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format,
|
|
|
|
pixman_image_t *image);
|
2012-09-25 16:23:24 +02:00
|
|
|
void qemu_pixman_image_unref(pixman_image_t *image);
|
|
|
|
|
|
|
|
#endif /* QEMU_PIXMAN_H */
|