mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-25 12:40:08 +00:00
bc210eb163
This patch adds an x argument to qemu_pixman_linebuf_fill so it can also be used to convert a partial scanline. Then fix tight + png/jpeg encoding by passing in the x+y offset, so the data is read from the correct screen location instead of the upper left corner. Cc: 1087974@bugs.launchpad.net Cc: qemu-stable@nongnu.org Reported-by: Tim Hardeneck <thardeck@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
40 lines
1.2 KiB
C
40 lines
1.2 KiB
C
/*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#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 x, int y);
|
|
pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format,
|
|
pixman_image_t *image);
|
|
void qemu_pixman_image_unref(pixman_image_t *image);
|
|
|
|
#endif /* QEMU_PIXMAN_H */
|