From bc210eb163b162ff2e94e5c8f4307715731257f8 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann <1087974@bugs.launchpad.net> Date: Fri, 14 Dec 2012 07:54:24 +0000 Subject: pixman: fix vnc tight png/jpeg support 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 Signed-off-by: Gerd Hoffmann Signed-off-by: Blue Swirl --- qemu-pixman.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qemu-pixman.c') diff --git a/qemu-pixman.c b/qemu-pixman.c index 79e175b8d0..e7263fb2bf 100644 --- a/qemu-pixman.c +++ b/qemu-pixman.c @@ -52,10 +52,10 @@ pixman_image_t *qemu_pixman_linebuf_create(pixman_format_code_t format, } void qemu_pixman_linebuf_fill(pixman_image_t *linebuf, pixman_image_t *fb, - int width, int y) + int width, int x, int y) { pixman_image_composite(PIXMAN_OP_SRC, fb, NULL, linebuf, - 0, y, 0, 0, 0, 0, width, 1); + x, y, 0, 0, 0, 0, width, 1); } pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format, -- cgit v1.2.3