[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Removed support for depth!=32
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH] Removed support for depth!=32 |
Date: |
Mon, 27 Feb 2017 12:54:24 +0100 |
Hi,
> (Gerd: can you remind me of the reason why we can assume that
> depth is always 32 here? IIRC it's because the UI layer always
> uses 32 bit depth now but I couldn't convince myself of that
> with a quick look through the ui code...)
qemu-allocated display surfaces (backed by host memory) are always
32bpp. Display emulation will get such surfaces in case it uses
qemu_create_displaysurface() or qemu_console_resize(). So the display
emulation only needs to be able to generate 32bpp output
(PIXMAN_x8r8g8b8 to be exact) from whatever the guest creates.
There is also the option to create display surfaces which are backed by
guest ram or vga device memory, using qemu_create_displaysurface_from(),
those can have a different format (any pixman supported format is
allowed here, because the ui code will use pixman to convert those
surfaces if needed).
sm501 uses qemu_console_resize (see line 1320), so yes, the code will
never see a display surface with a depth != 32 and a whole bunch of code
can be dropped. The need for the include template goes away too.
cheers,
Gerd