2012-11-13 12:38:06 +04: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 18:23:24 +04:00
|
|
|
#ifndef QEMU_PIXMAN_H
|
|
|
|
#define QEMU_PIXMAN_H
|
|
|
|
|
2013-01-09 13:17:08 +04:00
|
|
|
/* pixman-0.16.0 headers have a redundant declaration */
|
|
|
|
#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
|
2013-04-16 15:51:06 +04:00
|
|
|
#pragma GCC diagnostic push
|
2013-01-09 13:17:08 +04:00
|
|
|
#pragma GCC diagnostic ignored "-Wredundant-decls"
|
|
|
|
#endif
|
2012-09-25 18:23:24 +04:00
|
|
|
#include <pixman.h>
|
2013-01-09 13:17:08 +04:00
|
|
|
#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
|
2013-04-16 15:51:06 +04:00
|
|
|
#pragma GCC diagnostic pop
|
2013-01-09 13:17:08 +04:00
|
|
|
#endif
|
2012-09-25 18:23:24 +04:00
|
|
|
|
2013-01-21 16:03:47 +04:00
|
|
|
#include "qemu/typedefs.h"
|
2012-09-25 18:23:24 +04: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
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
|
|
|
2014-06-18 11:00:00 +04:00
|
|
|
PixelFormat qemu_pixelformat_from_pixman(pixman_format_code_t format);
|
2014-06-18 13:31:42 +04:00
|
|
|
pixman_format_code_t qemu_default_pixman_format(int bpp, bool native_endian);
|
2012-09-25 18:23:24 +04:00
|
|
|
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 11:54:24 +04:00
|
|
|
int width, int x, int y);
|
2014-06-19 15:19:01 +04:00
|
|
|
void qemu_pixman_linebuf_copy(pixman_image_t *fb, int width, int x, int y,
|
|
|
|
pixman_image_t *linebuf);
|
2012-11-02 12:12:49 +04:00
|
|
|
pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format,
|
|
|
|
pixman_image_t *image);
|
2012-09-25 18:23:24 +04:00
|
|
|
void qemu_pixman_image_unref(pixman_image_t *image);
|
|
|
|
|
2013-03-06 17:14:17 +04:00
|
|
|
pixman_color_t qemu_pixman_color(PixelFormat *pf, uint32_t color);
|
2013-03-07 18:23:48 +04:00
|
|
|
pixman_image_t *qemu_pixman_glyph_from_vgafont(int height, const uint8_t *font,
|
|
|
|
unsigned int ch);
|
|
|
|
void qemu_pixman_glyph_render(pixman_image_t *glyph,
|
|
|
|
pixman_image_t *surface,
|
|
|
|
pixman_color_t *fgcol,
|
|
|
|
pixman_color_t *bgcol,
|
|
|
|
int x, int y, int cw, int ch);
|
2013-03-06 17:14:17 +04:00
|
|
|
|
2012-09-25 18:23:24 +04:00
|
|
|
#endif /* QEMU_PIXMAN_H */
|