[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/14] console: add qemu_pixman_linebuf_copy
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 07/14] console: add qemu_pixman_linebuf_copy |
Date: |
Tue, 2 Sep 2014 10:00:20 +0200 |
Helper function for copying data from linebuf to framebuffer using
pixman, possibly converting in case src and dst formats differ.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
include/ui/qemu-pixman.h | 2 ++
ui/qemu-pixman.c | 9 +++++++++
2 files changed, 11 insertions(+)
diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
index 80ed94a..381969d 100644
--- a/include/ui/qemu-pixman.h
+++ b/include/ui/qemu-pixman.h
@@ -42,6 +42,8 @@ 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);
+void qemu_pixman_linebuf_copy(pixman_image_t *fb, int width, int x, int y,
+ pixman_image_t *linebuf);
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);
diff --git a/ui/qemu-pixman.c b/ui/qemu-pixman.c
index 5d8bd46..30c7fdd 100644
--- a/ui/qemu-pixman.c
+++ b/ui/qemu-pixman.c
@@ -133,6 +133,7 @@ pixman_image_t
*qemu_pixman_linebuf_create(pixman_format_code_t format,
return image;
}
+/* fill linebuf from framebuffer */
void qemu_pixman_linebuf_fill(pixman_image_t *linebuf, pixman_image_t *fb,
int width, int x, int y)
{
@@ -140,6 +141,14 @@ void qemu_pixman_linebuf_fill(pixman_image_t *linebuf,
pixman_image_t *fb,
x, y, 0, 0, 0, 0, width, 1);
}
+/* copy linebuf to framebuffer */
+void qemu_pixman_linebuf_copy(pixman_image_t *fb, int width, int x, int y,
+ pixman_image_t *linebuf)
+{
+ pixman_image_composite(PIXMAN_OP_SRC, linebuf, NULL, fb,
+ 0, 0, 0, 0, x, y, width, 1);
+}
+
pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format,
pixman_image_t *image)
{
--
1.8.3.1
- [Qemu-devel] [PATCH 00/14] console/pl110: pixman conversion continued, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 09/14] pl110: add framebuffer_update_display_swap_pixman, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 11/14] pl110: move resize, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 07/14] console: add qemu_pixman_linebuf_copy,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 14/14] [wip] pl110: start handling paletted images via pixman, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 12/14] [wip] pl110: start using pixman, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 01/14] console: add qemu_pixelformat_from_pixman, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 03/14] console: reimplement qemu_default_pixelformat, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 10/14] pl100: Drop support for depths other than 32bpp., Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 05/14] console: add qemu_create_displaysurface_guestmem, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 06/14] console: add dpy_gfx_update_dirty, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 02/14] console: add qemu_default_pixman_format, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 13/14] [wip] pl110: switch some conversions to swap+pixman mode, Gerd Hoffmann, 2014/09/02
- [Qemu-devel] [PATCH 08/14] console: Remove unused QEMU_BIG_ENDIAN_FLAG, Gerd Hoffmann, 2014/09/02