mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06: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:
parent
8c6381d846
commit
1ece6777fe
2 changed files with 24 additions and 21 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue