diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2015-01-09 09:27:09 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-01-19 13:33:26 +0100 |
commit | 877417d9ae6846bea4744b198131a5fe5117d7a5 (patch) | |
tree | fc448d083e2ae57d7d3b7d8e361a2b052fabd2f3 /ui/sdl2-2d.c | |
parent | 7dd93291cad743e83e972a323a5775ff5a954bd5 (diff) |
ui/sdl2: Support shared surface for more pixman formats
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/sdl2-2d.c')
-rw-r--r-- | ui/sdl2-2d.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c index 9264817e76..f907c21895 100644 --- a/ui/sdl2-2d.c +++ b/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); +} |