aboutsummaryrefslogtreecommitdiff
path: root/ui/sdl2-2d.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/sdl2-2d.c')
-rw-r--r--ui/sdl2-2d.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c
index 8548440..091ecfc 100644
--- a/ui/sdl2-2d.c
+++ b/ui/sdl2-2d.c
@@ -101,15 +101,24 @@ void sdl2_2d_switch(DisplayChangeListener *dcl,
case PIXMAN_r5g6b5:
format = SDL_PIXELFORMAT_RGB565;
break;
+ case PIXMAN_a8r8g8b8:
case PIXMAN_x8r8g8b8:
format = SDL_PIXELFORMAT_ARGB8888;
break;
+ case PIXMAN_a8b8g8r8:
+ case PIXMAN_x8b8g8r8:
+ format = SDL_PIXELFORMAT_ABGR8888;
+ break;
+ case PIXMAN_r8g8b8a8:
case PIXMAN_r8g8b8x8:
format = SDL_PIXELFORMAT_RGBA8888;
break;
case PIXMAN_b8g8r8x8:
format = SDL_PIXELFORMAT_BGRX8888;
break;
+ case PIXMAN_b8g8r8a8:
+ format = SDL_PIXELFORMAT_BGRA8888;
+ break;
default:
g_assert_not_reached();
}
@@ -149,7 +158,13 @@ bool sdl2_2d_check_format(DisplayChangeListener *dcl,
* the native ones. Thes are the ones I have tested.
*/
return (format == PIXMAN_x8r8g8b8 ||
+ format == PIXMAN_a8r8g8b8 ||
+ format == PIXMAN_a8b8g8r8 ||
+ format == PIXMAN_x8b8g8r8 ||
format == PIXMAN_b8g8r8x8 ||
+ format == PIXMAN_b8g8r8a8 ||
+ format == PIXMAN_r8g8b8x8 ||
+ format == PIXMAN_r8g8b8a8 ||
format == PIXMAN_x1r5g5b5 ||
format == PIXMAN_r5g6b5);
}