src/video/SDL_blit_N.c
changeset 10616 d17dd08640a4
parent 10559 fbf9b0e3589a
child 10737 3406a0f8b041
     1.1 --- a/src/video/SDL_blit_N.c	Tue Nov 15 01:24:58 2016 -0800
     1.2 +++ b/src/video/SDL_blit_N.c	Tue Nov 15 01:30:08 2016 -0800
     1.3 @@ -1113,6 +1113,7 @@
     1.4                                  (((*src)&0x0000F800)>>6)| \
     1.5                                  (((*src)&0x000000F8)>>3)); \
     1.6  }
     1.7 +#ifndef USE_DUFFS_LOOP
     1.8  #define RGB888_RGB555_TWO(dst, src) { \
     1.9      *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>9)| \
    1.10                           (((src[HI])&0x0000F800)>>6)| \
    1.11 @@ -1121,6 +1122,7 @@
    1.12                           (((src[LO])&0x0000F800)>>6)| \
    1.13                           (((src[LO])&0x000000F8)>>3); \
    1.14  }
    1.15 +#endif
    1.16  static void
    1.17  Blit_RGB888_RGB555(SDL_BlitInfo * info)
    1.18  {
    1.19 @@ -1237,6 +1239,7 @@
    1.20                                  (((*src)&0x0000FC00)>>5)| \
    1.21                                  (((*src)&0x000000F8)>>3)); \
    1.22  }
    1.23 +#ifndef USE_DUFFS_LOOP
    1.24  #define RGB888_RGB565_TWO(dst, src) { \
    1.25      *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>8)| \
    1.26                           (((src[HI])&0x0000FC00)>>5)| \
    1.27 @@ -1245,6 +1248,7 @@
    1.28                           (((src[LO])&0x0000FC00)>>5)| \
    1.29                           (((src[LO])&0x000000F8)>>3); \
    1.30  }
    1.31 +#endif
    1.32  static void
    1.33  Blit_RGB888_RGB565(SDL_BlitInfo * info)
    1.34  {
    1.35 @@ -2459,6 +2463,9 @@
    1.36  }
    1.37  
    1.38  /* Normal N to N optimized blitters */
    1.39 +#define NO_ALPHA   1
    1.40 +#define SET_ALPHA  2
    1.41 +#define COPY_ALPHA 4
    1.42  struct blit_table
    1.43  {
    1.44      Uint32 srcR, srcG, srcB;
    1.45 @@ -2466,8 +2473,7 @@
    1.46      Uint32 dstR, dstG, dstB;
    1.47      Uint32 blit_features;
    1.48      SDL_BlitFunc blitfunc;
    1.49 -    enum
    1.50 -    { NO_ALPHA = 1, SET_ALPHA = 2, COPY_ALPHA = 4 } alpha;
    1.51 +    Uint32 alpha; // bitwise NO_ALPHA, SET_ALPHA, COPY_ALPHA
    1.52  };
    1.53  static const struct blit_table normal_blit_1[] = {
    1.54      /* Default for 8-bit RGB source, never optimized */