Commit 55afc281fadaed9b8cdfb47f9e607aea120e39d2

Sylvain Becker 2020-01-21T22:06:09

Add #define SDL_HAVE_BLIT_N_RGB565 to compile out RGB565 LUT

diff --git a/src/SDL_internal.h b/src/SDL_internal.h
index 3ced9bc..55602ef 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 c859f96..419dc67 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}