diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-09-11 11:44:16 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-09-11 11:44:17 +0100 |
commit | 0dfa7e30126364c434a48cb37a1a41119e536c2a (patch) | |
tree | e3f10541a2c2ab6fe43b65dbe6943b8e2c05e347 /include | |
parent | fc3b9aa876901ab2317923ce1ab09043eee7f2a4 (diff) | |
parent | 77bfcf28f1ee92bbc9e077abb9a494b12406846f (diff) |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-console-20140905-2' into staging
console: pixman switchover continued, add some infrastructure to make it
easier using pixman in display device emulation.
# gpg: Signature made Fri 05 Sep 2014 14:38:57 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-console-20140905-2:
console: Remove unused QEMU_BIG_ENDIAN_FLAG
console: add qemu_pixman_linebuf_copy
console: add dpy_gfx_update_dirty
console: add qemu_create_displaysurface_guestmem
console: stop using PixelFormat
console: reimplement qemu_default_pixelformat
console: add qemu_default_pixman_format
console: add qemu_pixelformat_from_pixman
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ui/console.h | 25 | ||||
-rw-r--r-- | include/ui/qemu-pixman.h | 4 |
2 files changed, 20 insertions, 9 deletions
diff --git a/include/ui/console.h b/include/ui/console.h index 845526ed01..cde0faf6e5 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -102,8 +102,7 @@ struct QemuConsoleClass { ObjectClass parent_class; }; -#define QEMU_BIG_ENDIAN_FLAG 0x01 -#define QEMU_ALLOCATED_FLAG 0x02 +#define QEMU_ALLOCATED_FLAG 0x01 struct PixelFormat { uint8_t bits_per_pixel; @@ -119,8 +118,6 @@ struct DisplaySurface { pixman_format_code_t format; pixman_image_t *image; uint8_t flags; - - struct PixelFormat pf; }; typedef struct QemuUIInfo { @@ -188,9 +185,13 @@ struct DisplayChangeListener { }; DisplayState *init_displaystate(void); -DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp, - int linesize, uint8_t *data, - bool byteswap); +DisplaySurface *qemu_create_displaysurface_from(int width, int height, + pixman_format_code_t format, + int linesize, uint8_t *data); +DisplaySurface *qemu_create_displaysurface_guestmem(int width, int height, + pixman_format_code_t format, + int linesize, + uint64_t addr); PixelFormat qemu_different_endianness_pixelformat(int bpp); PixelFormat qemu_default_pixelformat(int bpp); @@ -199,10 +200,12 @@ void qemu_free_displaysurface(DisplaySurface *surface); static inline int is_surface_bgr(DisplaySurface *surface) { - if (surface->pf.bits_per_pixel == 32 && surface->pf.rshift == 0) + if (PIXMAN_FORMAT_BPP(surface->format) == 32 && + PIXMAN_FORMAT_TYPE(surface->format) == PIXMAN_TYPE_ABGR) { return 1; - else + } else { return 0; + } } static inline int is_buffer_shared(DisplaySurface *surface) @@ -228,6 +231,10 @@ void dpy_text_resize(QemuConsole *con, int w, int h); void dpy_mouse_set(QemuConsole *con, int x, int y, int on); void dpy_cursor_define(QemuConsole *con, QEMUCursor *cursor); bool dpy_cursor_define_supported(QemuConsole *con); +void dpy_gfx_update_dirty(QemuConsole *con, + MemoryRegion *address_space, + uint64_t base, + bool invalidate); static inline int surface_stride(DisplaySurface *s) { diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index ba970f813b..381969d97b 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -33,6 +33,8 @@ /* -------------------------------------------------------------------- */ +PixelFormat qemu_pixelformat_from_pixman(pixman_format_code_t format); +pixman_format_code_t qemu_default_pixman_format(int bpp, bool native_endian); int qemu_pixman_get_type(int rshift, int gshift, int bshift); pixman_format_code_t qemu_pixman_get_format(PixelFormat *pf); @@ -40,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); |