pixman supports 24bpp directly, let's share surfaces
For both endians even !

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
---
 hw/display/vga.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/display/vga.c b/hw/display/vga.c
index e4cd206..4674576 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1692,7 +1692,8 @@ static void vga_draw_graphic(VGACommonState *s, int 
full_update)
         disp_width != s->last_width ||
         height != s->last_height ||
         s->last_depth != depth) {
-        if (depth == 32 || ((depth == 16 || depth == 15) && !byteswap)) {
+       if (depth == 32 || depth == 24 ||
+           ((depth == 16 || depth == 15) && !byteswap)) {
             pixman_format_code_t format =
                 qemu_default_pixman_format(depth, !byteswap);
             surface = qemu_create_displaysurface_from(disp_width,
-- 
1.9.1


Reply via email to