mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
ui/console: use QEMU_PIXMAN_COLOR helpers
QEMU_RGB macro is actually defining a pixman color. Make this explicit in the macro name. Move it to qemu-pixman.h so it can be used elsewhere, as done in the following patch. Finally, define QEMU_PIXMAN_COLOR_{BLACK,GRAY}, to avoid need to look up the VGA color table from the QemuConsole placeholder surface rendering. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230830093843.3531473-37-marcandre.lureau@redhat.com>
This commit is contained in:
@ -47,6 +47,12 @@
|
||||
# define PIXMAN_LE_x8r8g8b8 PIXMAN_x8r8g8b8
|
||||
#endif
|
||||
|
||||
#define QEMU_PIXMAN_COLOR(r, g, b) \
|
||||
{ .red = r << 8, .green = g << 8, .blue = b << 8, .alpha = 0xffff }
|
||||
|
||||
#define QEMU_PIXMAN_COLOR_BLACK QEMU_PIXMAN_COLOR(0x00, 0x00, 0x00)
|
||||
#define QEMU_PIXMAN_COLOR_GRAY QEMU_PIXMAN_COLOR(0xaa, 0xaa, 0xaa)
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
typedef struct PixelFormat {
|
||||
|
Reference in New Issue
Block a user