mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
ui/sdl2: Support shared surface for more pixman formats
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
7dd93291ca
commit
877417d9ae
3 changed files with 22 additions and 6 deletions
13
ui/sdl2-2d.c
13
ui/sdl2-2d.c
|
@ -120,3 +120,16 @@ void sdl2_2d_redraw(struct sdl2_console *scon)
|
|||
surface_width(scon->surface),
|
||||
surface_height(scon->surface));
|
||||
}
|
||||
|
||||
bool sdl2_2d_check_format(DisplayChangeListener *dcl,
|
||||
pixman_format_code_t format)
|
||||
{
|
||||
/*
|
||||
* We let SDL convert for us a few more formats than,
|
||||
* the native ones. Thes are the ones I have tested.
|
||||
*/
|
||||
return (format == PIXMAN_x8r8g8b8 ||
|
||||
format == PIXMAN_b8g8r8x8 ||
|
||||
format == PIXMAN_x1r5g5b5 ||
|
||||
format == PIXMAN_r5g6b5);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue