[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/13] virtio-gpu: replace PIXMAN_* by PIXMAN_BE_*
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 03/13] virtio-gpu: replace PIXMAN_* by PIXMAN_BE_* |
Date: |
Mon, 24 Apr 2017 14:16:58 +0200 |
From: Laurent Vivier <address@hidden>
This avoids a "#ifdef HOST_WORDS_BIGENDIAN" and this is the purpose
of PIXMAN_BE_* macros.
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Sahid Orentino Ferdjaoui <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/display/virtio-gpu.c | 35 ++++++++---------------------------
1 file changed, 8 insertions(+), 27 deletions(-)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 9b530ab5b0..7befcef8d0 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -258,41 +258,22 @@ void virtio_gpu_get_display_info(VirtIOGPU *g,
static pixman_format_code_t get_pixman_format(uint32_t virtio_gpu_format)
{
switch (virtio_gpu_format) {
-#ifdef HOST_WORDS_BIGENDIAN
case VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM:
- return PIXMAN_b8g8r8x8;
+ return PIXMAN_BE_b8g8r8x8;
case VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM:
- return PIXMAN_b8g8r8a8;
+ return PIXMAN_BE_b8g8r8a8;
case VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM:
- return PIXMAN_x8r8g8b8;
+ return PIXMAN_BE_x8r8g8b8;
case VIRTIO_GPU_FORMAT_A8R8G8B8_UNORM:
- return PIXMAN_a8r8g8b8;
+ return PIXMAN_BE_a8r8g8b8;
case VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM:
- return PIXMAN_r8g8b8x8;
+ return PIXMAN_BE_r8g8b8x8;
case VIRTIO_GPU_FORMAT_R8G8B8A8_UNORM:
- return PIXMAN_r8g8b8a8;
+ return PIXMAN_BE_r8g8b8a8;
case VIRTIO_GPU_FORMAT_X8B8G8R8_UNORM:
- return PIXMAN_x8b8g8r8;
+ return PIXMAN_BE_x8b8g8r8;
case VIRTIO_GPU_FORMAT_A8B8G8R8_UNORM:
- return PIXMAN_a8b8g8r8;
-#else
- case VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM:
- return PIXMAN_x8r8g8b8;
- case VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM:
- return PIXMAN_a8r8g8b8;
- case VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM:
- return PIXMAN_b8g8r8x8;
- case VIRTIO_GPU_FORMAT_A8R8G8B8_UNORM:
- return PIXMAN_b8g8r8a8;
- case VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM:
- return PIXMAN_x8b8g8r8;
- case VIRTIO_GPU_FORMAT_R8G8B8A8_UNORM:
- return PIXMAN_a8b8g8r8;
- case VIRTIO_GPU_FORMAT_X8B8G8R8_UNORM:
- return PIXMAN_r8g8b8x8;
- case VIRTIO_GPU_FORMAT_A8B8G8R8_UNORM:
- return PIXMAN_r8g8b8a8;
-#endif
+ return PIXMAN_BE_a8b8g8r8;
default:
return 0;
}
--
2.9.3
- [Qemu-devel] [PULL 00/13] vga patch queue, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 11/13] vmsvga: fix vmsvga_update_display, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 01/13] console: add same surface replace pre-condition, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 03/13] virtio-gpu: replace PIXMAN_* by PIXMAN_BE_*,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 12/13] qxl: add xres and yres properties, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 06/13] vga: add vga_scanline_invalidated helper, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 13/13] virtio-gpu: add xres and yres properties, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 10/13] g364fb: make display updates thread safe, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 08/13] framebuffer: make display updates thread safe, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 04/13] bitmap: add bitmap_copy_and_clear_atomic, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 02/13] console: add same displaychangelistener registration pre-condition, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 05/13] memory: add support getting and using a dirty bitmap copy., Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 07/13] vga: make display updates thread safe., Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 09/13] exynos: make display updates thread safe, Gerd Hoffmann, 2017/04/24