From 55afc281fadaed9b8cdfb47f9e607aea120e39d2 Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Tue, 21 Jan 2020 22:06:09 +0100 Subject: [PATCH] Add #define SDL_HAVE_BLIT_N_RGB565 to compile out RGB565 LUT --- src/SDL_internal.h | 1 + src/video/SDL_blit_N.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/SDL_internal.h b/src/SDL_internal.h index 3ced9bc9e..55602efd2 100644 --- a/src/SDL_internal.h +++ b/src/SDL_internal.h @@ -57,6 +57,7 @@ #define SDL_HAVE_BLIT_1 1 #define SDL_HAVE_BLIT_A 1 #define SDL_HAVE_BLIT_N 1 +#define SDL_HAVE_BLIT_N_RGB565 1 #define SDL_HAVE_BLIT_AUTO 1 #define SDL_HAVE_RLE 1 #define SDL_VIDEO_RENDER_SW 1 diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c index c859f9609..419dc6736 100644 --- a/src/video/SDL_blit_N.c +++ b/src/video/SDL_blit_N.c @@ -3244,6 +3244,7 @@ static const struct blit_table normal_blit_2[] = { {0x00000F00, 0x000000F0, 0x0000000F, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, BLIT_FEATURE_HAS_ARM_SIMD, Blit_RGB444_RGB888ARMSIMD, NO_ALPHA | COPY_ALPHA}, #endif +#if SDL_HAVE_BLIT_N_RGB565 {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, 0, Blit_RGB565_ARGB8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x000000FF, 0x0000FF00, 0x00FF0000, @@ -3252,6 +3253,7 @@ static const struct blit_table normal_blit_2[] = { 0, Blit_RGB565_RGBA8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x0000FF00, 0x00FF0000, 0xFF000000, 0, Blit_RGB565_BGRA8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, +#endif /* Default for 16-bit RGB source, used if no other blitter matches */ {0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0}