[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 3/6] hw/display/virtio-gpu: fix pixel ordering from BGRA8888 to RGB
From: |
Daniel P . Berrangé |
Subject: |
[RFC 3/6] hw/display/virtio-gpu: fix pixel ordering from BGRA8888 to RGBA8888 |
Date: |
Thu, 23 Jan 2025 19:15:33 +0000 |
Currently both the VNC and GTK displays are rendering coloured cursors
with RGB components reversed. This originates with the data received
from the guest, so virtio-gpu must reverse this again to get it back
to the natural RGBA8888 order expected by backends.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/display/virtio-gpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 156d4e0b9b..9952658df2 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -103,6 +103,7 @@ static void update_cursor(VirtIOGPU *g, struct
virtio_gpu_update_cursor *cursor)
if (cursor->resource_id > 0) {
vgc->update_cursor_data(g, s, cursor->resource_id);
cursor_unmultiply_alpha(s->current_cursor);
+ cursor_swap_rgb(s->current_cursor);
}
dpy_cursor_define(s->con, s->current_cursor);
--
2.47.1
- [RFC 0/6] RFC: hw/display/virtio-gpu: problems with coloured cursors, Daniel P . Berrangé, 2025/01/23
- [RFC 1/6] ui: add more cursor helper methods, Daniel P . Berrangé, 2025/01/23
- [RFC 2/6] hw/display/virtio-gpu.c: reverse alpha pre-multiplication, Daniel P . Berrangé, 2025/01/23
- [RFC 5/6] ui/sdl: load cursor in RGBA8888 format not BGRA8888, Daniel P . Berrangé, 2025/01/23
- [RFC 3/6] hw/display/virtio-gpu: fix pixel ordering from BGRA8888 to RGBA8888,
Daniel P . Berrangé <=
- [RFC 4/6] ui/vnc: pre-multiply alpha with alpha cursor, Daniel P . Berrangé, 2025/01/23
- [RFC 6/6] ui: add ability to dump the raw cursor bytes, Daniel P . Berrangé, 2025/01/23
- Re: [RFC 0/6] RFC: hw/display/virtio-gpu: problems with coloured cursors, Gerd Hoffmann, 2025/01/24