SDL  2.0
SDL_blit_A.c File Reference
#include "../SDL_internal.h"
#include "SDL_video.h"
#include "SDL_blit.h"
+ Include dependency graph for SDL_blit_A.c:

Go to the source code of this file.

Macros

#define BLEND16_50(d, s, mask)   ((((s & mask) + (d & mask)) >> 1) + (s & d & (~mask & 0xffff)))
 
#define BLEND2x16_50(d, s, mask)
 

Functions

static void BlitNto1SurfaceAlpha (SDL_BlitInfo *info)
 
static void BlitNto1PixelAlpha (SDL_BlitInfo *info)
 
static void BlitNto1SurfaceAlphaKey (SDL_BlitInfo *info)
 
static void BlitRGBtoRGBSurfaceAlpha128 (SDL_BlitInfo *info)
 
static void BlitRGBtoRGBSurfaceAlpha (SDL_BlitInfo *info)
 
static void BlitRGBtoRGBPixelAlpha (SDL_BlitInfo *info)
 
static void Blit16to16SurfaceAlpha128 (SDL_BlitInfo *info, Uint16 mask)
 
static void Blit565to565SurfaceAlpha (SDL_BlitInfo *info)
 
static void Blit555to555SurfaceAlpha (SDL_BlitInfo *info)
 
static void BlitARGBto565PixelAlpha (SDL_BlitInfo *info)
 
static void BlitARGBto555PixelAlpha (SDL_BlitInfo *info)
 
static void BlitNtoNSurfaceAlpha (SDL_BlitInfo *info)
 
static void BlitNtoNSurfaceAlphaKey (SDL_BlitInfo *info)
 
static void BlitNtoNPixelAlpha (SDL_BlitInfo *info)
 
SDL_BlitFunc SDL_CalculateBlitA (SDL_Surface *surface)
 

Macro Definition Documentation

◆ BLEND16_50

#define BLEND16_50 (   d,
  s,
  mask 
)    ((((s & mask) + (d & mask)) >> 1) + (s & d & (~mask & 0xffff)))

Definition at line 655 of file SDL_blit_A.c.

◆ BLEND2x16_50

#define BLEND2x16_50 (   d,
  s,
  mask 
)
Value:
(((s & (mask | mask << 16)) >> 1) + ((d & (mask | mask << 16)) >> 1) \
+ (s & d & (~(mask | mask << 16))))

Definition at line 659 of file SDL_blit_A.c.

Function Documentation

◆ Blit16to16SurfaceAlpha128()

static void Blit16to16SurfaceAlpha128 ( SDL_BlitInfo info,
Uint16  mask 
)
static

Definition at line 663 of file SDL_blit_A.c.

664 {
665  int width = info->dst_w;
666  int height = info->dst_h;
667  Uint16 *srcp = (Uint16 *) info->src;
668  int srcskip = info->src_skip >> 1;
669  Uint16 *dstp = (Uint16 *) info->dst;
670  int dstskip = info->dst_skip >> 1;
671 
672  while (height--) {
673  if (((uintptr_t) srcp ^ (uintptr_t) dstp) & 2) {
674  /*
675  * Source and destination not aligned, pipeline it.
676  * This is mostly a win for big blits but no loss for
677  * small ones
678  */
679  Uint32 prev_sw;
680  int w = width;
681 
682  /* handle odd destination */
683  if ((uintptr_t) dstp & 2) {
684  Uint16 d = *dstp, s = *srcp;
685  *dstp = BLEND16_50(d, s, mask);
686  dstp++;
687  srcp++;
688  w--;
689  }
690  srcp++; /* srcp is now 32-bit aligned */
691 
692  /* bootstrap pipeline with first halfword */
693  prev_sw = ((Uint32 *) srcp)[-1];
694 
695  while (w > 1) {
696  Uint32 sw, dw, s;
697  sw = *(Uint32 *) srcp;
698  dw = *(Uint32 *) dstp;
699 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
700  s = (prev_sw << 16) + (sw >> 16);
701 #else
702  s = (prev_sw >> 16) + (sw << 16);
703 #endif
704  prev_sw = sw;
705  *(Uint32 *) dstp = BLEND2x16_50(dw, s, mask);
706  dstp += 2;
707  srcp += 2;
708  w -= 2;
709  }
710 
711  /* final pixel if any */
712  if (w) {
713  Uint16 d = *dstp, s;
714 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
715  s = (Uint16) prev_sw;
716 #else
717  s = (Uint16) (prev_sw >> 16);
718 #endif
719  *dstp = BLEND16_50(d, s, mask);
720  srcp++;
721  dstp++;
722  }
723  srcp += srcskip - 1;
724  dstp += dstskip;
725  } else {
726  /* source and destination are aligned */
727  int w = width;
728 
729  /* first odd pixel? */
730  if ((uintptr_t) srcp & 2) {
731  Uint16 d = *dstp, s = *srcp;
732  *dstp = BLEND16_50(d, s, mask);
733  srcp++;
734  dstp++;
735  w--;
736  }
737  /* srcp and dstp are now 32-bit aligned */
738 
739  while (w > 1) {
740  Uint32 sw = *(Uint32 *) srcp;
741  Uint32 dw = *(Uint32 *) dstp;
742  *(Uint32 *) dstp = BLEND2x16_50(dw, sw, mask);
743  srcp += 2;
744  dstp += 2;
745  w -= 2;
746  }
747 
748  /* last odd pixel? */
749  if (w) {
750  Uint16 d = *dstp, s = *srcp;
751  *dstp = BLEND16_50(d, s, mask);
752  srcp++;
753  dstp++;
754  }
755  srcp += srcskip;
756  dstp += dstskip;
757  }
758  }
759 }

References BLEND16_50, BLEND2x16_50, d, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, SDL_BlitInfo::src, and SDL_BlitInfo::src_skip.

Referenced by Blit555to555SurfaceAlpha(), and Blit565to565SurfaceAlpha().

◆ Blit555to555SurfaceAlpha()

static void Blit555to555SurfaceAlpha ( SDL_BlitInfo info)
static

Definition at line 1081 of file SDL_blit_A.c.

1082 {
1083  unsigned alpha = info->a; /* downscale alpha to 5 bits */
1084  if (alpha == 128) {
1085  Blit16to16SurfaceAlpha128(info, 0xfbde);
1086  } else {
1087  int width = info->dst_w;
1088  int height = info->dst_h;
1089  Uint16 *srcp = (Uint16 *) info->src;
1090  int srcskip = info->src_skip >> 1;
1091  Uint16 *dstp = (Uint16 *) info->dst;
1092  int dstskip = info->dst_skip >> 1;
1093  alpha >>= 3; /* downscale alpha to 5 bits */
1094 
1095  while (height--) {
1096  /* *INDENT-OFF* */
1097  DUFFS_LOOP4({
1098  Uint32 s = *srcp++;
1099  Uint32 d = *dstp;
1100  /*
1101  * shift out the middle component (green) to
1102  * the high 16 bits, and process all three RGB
1103  * components at the same time.
1104  */
1105  s = (s | s << 16) & 0x03e07c1f;
1106  d = (d | d << 16) & 0x03e07c1f;
1107  d += (s - d) * alpha >> 5;
1108  d &= 0x03e07c1f;
1109  *dstp++ = (Uint16)(d | d >> 16);
1110  }, width);
1111  /* *INDENT-ON* */
1112  srcp += srcskip;
1113  dstp += dstskip;
1114  }
1115  }
1116 }

References SDL_BlitInfo::a, Blit16to16SurfaceAlpha128(), d, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_BlitInfo::src, and SDL_BlitInfo::src_skip.

Referenced by SDL_CalculateBlitA().

◆ Blit565to565SurfaceAlpha()

static void Blit565to565SurfaceAlpha ( SDL_BlitInfo info)
static

Definition at line 1042 of file SDL_blit_A.c.

1043 {
1044  unsigned alpha = info->a;
1045  if (alpha == 128) {
1046  Blit16to16SurfaceAlpha128(info, 0xf7de);
1047  } else {
1048  int width = info->dst_w;
1049  int height = info->dst_h;
1050  Uint16 *srcp = (Uint16 *) info->src;
1051  int srcskip = info->src_skip >> 1;
1052  Uint16 *dstp = (Uint16 *) info->dst;
1053  int dstskip = info->dst_skip >> 1;
1054  alpha >>= 3; /* downscale alpha to 5 bits */
1055 
1056  while (height--) {
1057  /* *INDENT-OFF* */
1058  DUFFS_LOOP4({
1059  Uint32 s = *srcp++;
1060  Uint32 d = *dstp;
1061  /*
1062  * shift out the middle component (green) to
1063  * the high 16 bits, and process all three RGB
1064  * components at the same time.
1065  */
1066  s = (s | s << 16) & 0x07e0f81f;
1067  d = (d | d << 16) & 0x07e0f81f;
1068  d += (s - d) * alpha >> 5;
1069  d &= 0x07e0f81f;
1070  *dstp++ = (Uint16)(d | d >> 16);
1071  }, width);
1072  /* *INDENT-ON* */
1073  srcp += srcskip;
1074  dstp += dstskip;
1075  }
1076  }
1077 }

References SDL_BlitInfo::a, Blit16to16SurfaceAlpha128(), d, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_BlitInfo::src, and SDL_BlitInfo::src_skip.

Referenced by SDL_CalculateBlitA().

◆ BlitARGBto555PixelAlpha()

static void BlitARGBto555PixelAlpha ( SDL_BlitInfo info)
static

Definition at line 1166 of file SDL_blit_A.c.

1167 {
1168  int width = info->dst_w;
1169  int height = info->dst_h;
1170  Uint32 *srcp = (Uint32 *) info->src;
1171  int srcskip = info->src_skip >> 2;
1172  Uint16 *dstp = (Uint16 *) info->dst;
1173  int dstskip = info->dst_skip >> 1;
1174 
1175  while (height--) {
1176  /* *INDENT-OFF* */
1177  DUFFS_LOOP4({
1178  unsigned alpha;
1179  Uint32 s = *srcp;
1180  alpha = s >> 27; /* downscale alpha to 5 bits */
1181  /* FIXME: Here we special-case opaque alpha since the
1182  compositioning used (>>8 instead of /255) doesn't handle
1183  it correctly. Also special-case alpha=0 for speed?
1184  Benchmark this! */
1185  if(alpha) {
1186  if(alpha == (SDL_ALPHA_OPAQUE >> 3)) {
1187  *dstp = (Uint16)((s >> 9 & 0x7c00) + (s >> 6 & 0x3e0) + (s >> 3 & 0x1f));
1188  } else {
1189  Uint32 d = *dstp;
1190  /*
1191  * convert source and destination to G0RAB65565
1192  * and blend all components at the same time
1193  */
1194  s = ((s & 0xf800) << 10) + (s >> 9 & 0x7c00)
1195  + (s >> 3 & 0x1f);
1196  d = (d | d << 16) & 0x03e07c1f;
1197  d += (s - d) * alpha >> 5;
1198  d &= 0x03e07c1f;
1199  *dstp = (Uint16)(d | d >> 16);
1200  }
1201  }
1202  srcp++;
1203  dstp++;
1204  }, width);
1205  /* *INDENT-ON* */
1206  srcp += srcskip;
1207  dstp += dstskip;
1208  }
1209 }

References d, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_ALPHA_OPAQUE, SDL_BlitInfo::src, and SDL_BlitInfo::src_skip.

Referenced by SDL_CalculateBlitA().

◆ BlitARGBto565PixelAlpha()

static void BlitARGBto565PixelAlpha ( SDL_BlitInfo info)
static

Definition at line 1120 of file SDL_blit_A.c.

1121 {
1122  int width = info->dst_w;
1123  int height = info->dst_h;
1124  Uint32 *srcp = (Uint32 *) info->src;
1125  int srcskip = info->src_skip >> 2;
1126  Uint16 *dstp = (Uint16 *) info->dst;
1127  int dstskip = info->dst_skip >> 1;
1128 
1129  while (height--) {
1130  /* *INDENT-OFF* */
1131  DUFFS_LOOP4({
1132  Uint32 s = *srcp;
1133  unsigned alpha = s >> 27; /* downscale alpha to 5 bits */
1134  /* FIXME: Here we special-case opaque alpha since the
1135  compositioning used (>>8 instead of /255) doesn't handle
1136  it correctly. Also special-case alpha=0 for speed?
1137  Benchmark this! */
1138  if(alpha) {
1139  if(alpha == (SDL_ALPHA_OPAQUE >> 3)) {
1140  *dstp = (Uint16)((s >> 8 & 0xf800) + (s >> 5 & 0x7e0) + (s >> 3 & 0x1f));
1141  } else {
1142  Uint32 d = *dstp;
1143  /*
1144  * convert source and destination to G0RAB65565
1145  * and blend all components at the same time
1146  */
1147  s = ((s & 0xfc00) << 11) + (s >> 8 & 0xf800)
1148  + (s >> 3 & 0x1f);
1149  d = (d | d << 16) & 0x07e0f81f;
1150  d += (s - d) * alpha >> 5;
1151  d &= 0x07e0f81f;
1152  *dstp = (Uint16)(d | d >> 16);
1153  }
1154  }
1155  srcp++;
1156  dstp++;
1157  }, width);
1158  /* *INDENT-ON* */
1159  srcp += srcskip;
1160  dstp += dstskip;
1161  }
1162 }

References d, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_ALPHA_OPAQUE, SDL_BlitInfo::src, and SDL_BlitInfo::src_skip.

Referenced by SDL_CalculateBlitA().

◆ BlitNto1PixelAlpha()

static void BlitNto1PixelAlpha ( SDL_BlitInfo info)
static

Definition at line 79 of file SDL_blit_A.c.

80 {
81  int width = info->dst_w;
82  int height = info->dst_h;
83  Uint8 *src = info->src;
84  int srcskip = info->src_skip;
85  Uint8 *dst = info->dst;
86  int dstskip = info->dst_skip;
87  Uint8 *palmap = info->table;
88  SDL_PixelFormat *srcfmt = info->src_fmt;
89  SDL_PixelFormat *dstfmt = info->dst_fmt;
90  int srcbpp = srcfmt->BytesPerPixel;
91  Uint32 Pixel;
92  unsigned sR, sG, sB, sA;
93  unsigned dR, dG, dB;
94 
95  while (height--) {
96  /* *INDENT-OFF* */
98  {
99  DISEMBLE_RGBA(src,srcbpp,srcfmt,Pixel,sR,sG,sB,sA);
100  dR = dstfmt->palette->colors[*dst].r;
101  dG = dstfmt->palette->colors[*dst].g;
102  dB = dstfmt->palette->colors[*dst].b;
103  ALPHA_BLEND_RGB(sR, sG, sB, sA, dR, dG, dB);
104  dR &= 0xff;
105  dG &= 0xff;
106  dB &= 0xff;
107  /* Pack RGB into 8bit pixel */
108  if ( palmap == NULL ) {
109  *dst =((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0));
110  } else {
111  *dst = palmap[((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0))];
112  }
113  dst++;
114  src += srcbpp;
115  },
116  width);
117  /* *INDENT-ON* */
118  src += srcskip;
119  dst += dstskip;
120  }
121 }

References ALPHA_BLEND_RGB, SDL_Color::b, SDL_PixelFormat::BytesPerPixel, SDL_Palette::colors, DISEMBLE_RGBA, SDL_BlitInfo::dst, SDL_BlitInfo::dst_fmt, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_Color::g, NULL, SDL_PixelFormat::palette, SDL_Color::r, SDL_BlitInfo::src, SDL_BlitInfo::src_fmt, SDL_BlitInfo::src_skip, and SDL_BlitInfo::table.

Referenced by SDL_CalculateBlitA().

◆ BlitNto1SurfaceAlpha()

static void BlitNto1SurfaceAlpha ( SDL_BlitInfo info)
static

Definition at line 32 of file SDL_blit_A.c.

33 {
34  int width = info->dst_w;
35  int height = info->dst_h;
36  Uint8 *src = info->src;
37  int srcskip = info->src_skip;
38  Uint8 *dst = info->dst;
39  int dstskip = info->dst_skip;
40  Uint8 *palmap = info->table;
41  SDL_PixelFormat *srcfmt = info->src_fmt;
42  SDL_PixelFormat *dstfmt = info->dst_fmt;
43  int srcbpp = srcfmt->BytesPerPixel;
44  Uint32 Pixel;
45  unsigned sR, sG, sB;
46  unsigned dR, dG, dB;
47  const unsigned A = info->a;
48 
49  while (height--) {
50  /* *INDENT-OFF* */
52  {
53  DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
54  dR = dstfmt->palette->colors[*dst].r;
55  dG = dstfmt->palette->colors[*dst].g;
56  dB = dstfmt->palette->colors[*dst].b;
57  ALPHA_BLEND_RGB(sR, sG, sB, A, dR, dG, dB);
58  dR &= 0xff;
59  dG &= 0xff;
60  dB &= 0xff;
61  /* Pack RGB into 8bit pixel */
62  if ( palmap == NULL ) {
63  *dst =((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0));
64  } else {
65  *dst = palmap[((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0))];
66  }
67  dst++;
68  src += srcbpp;
69  },
70  width);
71  /* *INDENT-ON* */
72  src += srcskip;
73  dst += dstskip;
74  }
75 }

References SDL_BlitInfo::a, ALPHA_BLEND_RGB, SDL_Color::b, SDL_PixelFormat::BytesPerPixel, SDL_Palette::colors, DISEMBLE_RGB, SDL_BlitInfo::dst, SDL_BlitInfo::dst_fmt, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_Color::g, NULL, SDL_PixelFormat::palette, SDL_Color::r, SDL_BlitInfo::src, SDL_BlitInfo::src_fmt, SDL_BlitInfo::src_skip, and SDL_BlitInfo::table.

Referenced by SDL_CalculateBlitA().

◆ BlitNto1SurfaceAlphaKey()

static void BlitNto1SurfaceAlphaKey ( SDL_BlitInfo info)
static

Definition at line 125 of file SDL_blit_A.c.

126 {
127  int width = info->dst_w;
128  int height = info->dst_h;
129  Uint8 *src = info->src;
130  int srcskip = info->src_skip;
131  Uint8 *dst = info->dst;
132  int dstskip = info->dst_skip;
133  Uint8 *palmap = info->table;
134  SDL_PixelFormat *srcfmt = info->src_fmt;
135  SDL_PixelFormat *dstfmt = info->dst_fmt;
136  int srcbpp = srcfmt->BytesPerPixel;
137  Uint32 ckey = info->colorkey;
138  Uint32 Pixel;
139  unsigned sR, sG, sB;
140  unsigned dR, dG, dB;
141  const unsigned A = info->a;
142 
143  while (height--) {
144  /* *INDENT-OFF* */
145  DUFFS_LOOP(
146  {
147  DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
148  if ( Pixel != ckey ) {
149  dR = dstfmt->palette->colors[*dst].r;
150  dG = dstfmt->palette->colors[*dst].g;
151  dB = dstfmt->palette->colors[*dst].b;
152  ALPHA_BLEND_RGB(sR, sG, sB, A, dR, dG, dB);
153  dR &= 0xff;
154  dG &= 0xff;
155  dB &= 0xff;
156  /* Pack RGB into 8bit pixel */
157  if ( palmap == NULL ) {
158  *dst =((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0));
159  } else {
160  *dst = palmap[((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0))];
161  }
162  }
163  dst++;
164  src += srcbpp;
165  },
166  width);
167  /* *INDENT-ON* */
168  src += srcskip;
169  dst += dstskip;
170  }
171 }

References SDL_BlitInfo::a, ALPHA_BLEND_RGB, SDL_Color::b, SDL_PixelFormat::BytesPerPixel, SDL_BlitInfo::colorkey, SDL_Palette::colors, DISEMBLE_RGB, SDL_BlitInfo::dst, SDL_BlitInfo::dst_fmt, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP, SDL_Color::g, NULL, SDL_PixelFormat::palette, SDL_Color::r, SDL_BlitInfo::src, SDL_BlitInfo::src_fmt, SDL_BlitInfo::src_skip, and SDL_BlitInfo::table.

Referenced by SDL_CalculateBlitA().

◆ BlitNtoNPixelAlpha()

static void BlitNtoNPixelAlpha ( SDL_BlitInfo info)
static

Definition at line 1293 of file SDL_blit_A.c.

1294 {
1295  int width = info->dst_w;
1296  int height = info->dst_h;
1297  Uint8 *src = info->src;
1298  int srcskip = info->src_skip;
1299  Uint8 *dst = info->dst;
1300  int dstskip = info->dst_skip;
1301  SDL_PixelFormat *srcfmt = info->src_fmt;
1302  SDL_PixelFormat *dstfmt = info->dst_fmt;
1303  int srcbpp;
1304  int dstbpp;
1305  Uint32 Pixel;
1306  unsigned sR, sG, sB, sA;
1307  unsigned dR, dG, dB, dA;
1308 
1309  /* Set up some basic variables */
1310  srcbpp = srcfmt->BytesPerPixel;
1311  dstbpp = dstfmt->BytesPerPixel;
1312 
1313  while (height--) {
1314  /* *INDENT-OFF* */
1315  DUFFS_LOOP4(
1316  {
1317  DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA);
1318  if(sA) {
1319  DISEMBLE_RGBA(dst, dstbpp, dstfmt, Pixel, dR, dG, dB, dA);
1320  ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA);
1321  ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
1322  }
1323  src += srcbpp;
1324  dst += dstbpp;
1325  },
1326  width);
1327  /* *INDENT-ON* */
1328  src += srcskip;
1329  dst += dstskip;
1330  }
1331 }

References ALPHA_BLEND_RGBA, ASSEMBLE_RGBA, SDL_PixelFormat::BytesPerPixel, DISEMBLE_RGBA, SDL_BlitInfo::dst, SDL_BlitInfo::dst_fmt, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_BlitInfo::src, SDL_BlitInfo::src_fmt, and SDL_BlitInfo::src_skip.

Referenced by SDL_CalculateBlitA().

◆ BlitNtoNSurfaceAlpha()

static void BlitNtoNSurfaceAlpha ( SDL_BlitInfo info)
static

Definition at line 1213 of file SDL_blit_A.c.

1214 {
1215  int width = info->dst_w;
1216  int height = info->dst_h;
1217  Uint8 *src = info->src;
1218  int srcskip = info->src_skip;
1219  Uint8 *dst = info->dst;
1220  int dstskip = info->dst_skip;
1221  SDL_PixelFormat *srcfmt = info->src_fmt;
1222  SDL_PixelFormat *dstfmt = info->dst_fmt;
1223  int srcbpp = srcfmt->BytesPerPixel;
1224  int dstbpp = dstfmt->BytesPerPixel;
1225  Uint32 Pixel;
1226  unsigned sR, sG, sB;
1227  unsigned dR, dG, dB, dA;
1228  const unsigned sA = info->a;
1229 
1230  if (sA) {
1231  while (height--) {
1232  /* *INDENT-OFF* */
1233  DUFFS_LOOP4(
1234  {
1235  DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
1236  DISEMBLE_RGBA(dst, dstbpp, dstfmt, Pixel, dR, dG, dB, dA);
1237  ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA);
1238  ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
1239  src += srcbpp;
1240  dst += dstbpp;
1241  },
1242  width);
1243  /* *INDENT-ON* */
1244  src += srcskip;
1245  dst += dstskip;
1246  }
1247  }
1248 }

References SDL_BlitInfo::a, ALPHA_BLEND_RGBA, ASSEMBLE_RGBA, SDL_PixelFormat::BytesPerPixel, DISEMBLE_RGB, DISEMBLE_RGBA, SDL_BlitInfo::dst, SDL_BlitInfo::dst_fmt, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_BlitInfo::src, SDL_BlitInfo::src_fmt, and SDL_BlitInfo::src_skip.

Referenced by SDL_CalculateBlitA().

◆ BlitNtoNSurfaceAlphaKey()

static void BlitNtoNSurfaceAlphaKey ( SDL_BlitInfo info)
static

Definition at line 1252 of file SDL_blit_A.c.

1253 {
1254  int width = info->dst_w;
1255  int height = info->dst_h;
1256  Uint8 *src = info->src;
1257  int srcskip = info->src_skip;
1258  Uint8 *dst = info->dst;
1259  int dstskip = info->dst_skip;
1260  SDL_PixelFormat *srcfmt = info->src_fmt;
1261  SDL_PixelFormat *dstfmt = info->dst_fmt;
1262  Uint32 ckey = info->colorkey;
1263  int srcbpp = srcfmt->BytesPerPixel;
1264  int dstbpp = dstfmt->BytesPerPixel;
1265  Uint32 Pixel;
1266  unsigned sR, sG, sB;
1267  unsigned dR, dG, dB, dA;
1268  const unsigned sA = info->a;
1269 
1270  while (height--) {
1271  /* *INDENT-OFF* */
1272  DUFFS_LOOP4(
1273  {
1274  RETRIEVE_RGB_PIXEL(src, srcbpp, Pixel);
1275  if(sA && Pixel != ckey) {
1276  RGB_FROM_PIXEL(Pixel, srcfmt, sR, sG, sB);
1277  DISEMBLE_RGBA(dst, dstbpp, dstfmt, Pixel, dR, dG, dB, dA);
1278  ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA);
1279  ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
1280  }
1281  src += srcbpp;
1282  dst += dstbpp;
1283  },
1284  width);
1285  /* *INDENT-ON* */
1286  src += srcskip;
1287  dst += dstskip;
1288  }
1289 }

References SDL_BlitInfo::a, ALPHA_BLEND_RGBA, ASSEMBLE_RGBA, SDL_PixelFormat::BytesPerPixel, SDL_BlitInfo::colorkey, DISEMBLE_RGBA, SDL_BlitInfo::dst, SDL_BlitInfo::dst_fmt, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, RETRIEVE_RGB_PIXEL, RGB_FROM_PIXEL, SDL_BlitInfo::src, SDL_BlitInfo::src_fmt, and SDL_BlitInfo::src_skip.

Referenced by SDL_CalculateBlitA().

◆ BlitRGBtoRGBPixelAlpha()

static void BlitRGBtoRGBPixelAlpha ( SDL_BlitInfo info)
static

Definition at line 527 of file SDL_blit_A.c.

528 {
529  int width = info->dst_w;
530  int height = info->dst_h;
531  Uint32 *srcp = (Uint32 *) info->src;
532  int srcskip = info->src_skip >> 2;
533  Uint32 *dstp = (Uint32 *) info->dst;
534  int dstskip = info->dst_skip >> 2;
535 
536  while (height--) {
537  /* *INDENT-OFF* */
538  DUFFS_LOOP4({
539  Uint32 dalpha;
540  Uint32 d;
541  Uint32 s1;
542  Uint32 d1;
543  Uint32 s = *srcp;
544  Uint32 alpha = s >> 24;
545  /* FIXME: Here we special-case opaque alpha since the
546  compositioning used (>>8 instead of /255) doesn't handle
547  it correctly. Also special-case alpha=0 for speed?
548  Benchmark this! */
549  if (alpha) {
550  if (alpha == SDL_ALPHA_OPAQUE) {
551  *dstp = *srcp;
552  } else {
553  /*
554  * take out the middle component (green), and process
555  * the other two in parallel. One multiply less.
556  */
557  d = *dstp;
558  dalpha = d >> 24;
559  s1 = s & 0xff00ff;
560  d1 = d & 0xff00ff;
561  d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff;
562  s &= 0xff00;
563  d &= 0xff00;
564  d = (d + ((s - d) * alpha >> 8)) & 0xff00;
565  dalpha = alpha + (dalpha * (alpha ^ 0xFF) >> 8);
566  *dstp = d1 | d | (dalpha << 24);
567  }
568  }
569  ++srcp;
570  ++dstp;
571  }, width);
572  /* *INDENT-ON* */
573  srcp += srcskip;
574  dstp += dstskip;
575  }
576 }

References d, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_ALPHA_OPAQUE, SDL_BlitInfo::src, and SDL_BlitInfo::src_skip.

Referenced by SDL_CalculateBlitA().

◆ BlitRGBtoRGBSurfaceAlpha()

static void BlitRGBtoRGBSurfaceAlpha ( SDL_BlitInfo info)
static

Definition at line 485 of file SDL_blit_A.c.

486 {
487  unsigned alpha = info->a;
488  if (alpha == 128) {
490  } else {
491  int width = info->dst_w;
492  int height = info->dst_h;
493  Uint32 *srcp = (Uint32 *) info->src;
494  int srcskip = info->src_skip >> 2;
495  Uint32 *dstp = (Uint32 *) info->dst;
496  int dstskip = info->dst_skip >> 2;
497  Uint32 s;
498  Uint32 d;
499  Uint32 s1;
500  Uint32 d1;
501 
502  while (height--) {
503  /* *INDENT-OFF* */
504  DUFFS_LOOP4({
505  s = *srcp;
506  d = *dstp;
507  s1 = s & 0xff00ff;
508  d1 = d & 0xff00ff;
509  d1 = (d1 + ((s1 - d1) * alpha >> 8))
510  & 0xff00ff;
511  s &= 0xff00;
512  d &= 0xff00;
513  d = (d + ((s - d) * alpha >> 8)) & 0xff00;
514  *dstp = d1 | d | 0xff000000;
515  ++srcp;
516  ++dstp;
517  }, width);
518  /* *INDENT-ON* */
519  srcp += srcskip;
520  dstp += dstskip;
521  }
522  }
523 }

References SDL_BlitInfo::a, BlitRGBtoRGBSurfaceAlpha128(), d, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_BlitInfo::src, and SDL_BlitInfo::src_skip.

Referenced by SDL_CalculateBlitA().

◆ BlitRGBtoRGBSurfaceAlpha128()

static void BlitRGBtoRGBSurfaceAlpha128 ( SDL_BlitInfo info)
static

Definition at line 460 of file SDL_blit_A.c.

461 {
462  int width = info->dst_w;
463  int height = info->dst_h;
464  Uint32 *srcp = (Uint32 *) info->src;
465  int srcskip = info->src_skip >> 2;
466  Uint32 *dstp = (Uint32 *) info->dst;
467  int dstskip = info->dst_skip >> 2;
468 
469  while (height--) {
470  /* *INDENT-OFF* */
471  DUFFS_LOOP4({
472  Uint32 s = *srcp++;
473  Uint32 d = *dstp;
474  *dstp++ = ((((s & 0x00fefefe) + (d & 0x00fefefe)) >> 1)
475  + (s & d & 0x00010101)) | 0xff000000;
476  }, width);
477  /* *INDENT-ON* */
478  srcp += srcskip;
479  dstp += dstskip;
480  }
481 }

References d, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_skip, SDL_BlitInfo::dst_w, DUFFS_LOOP4, SDL_BlitInfo::src, and SDL_BlitInfo::src_skip.

Referenced by BlitRGBtoRGBSurfaceAlpha().

◆ SDL_CalculateBlitA()

SDL_BlitFunc SDL_CalculateBlitA ( SDL_Surface surface)

Definition at line 1335 of file SDL_blit_A.c.

1336 {
1338  SDL_PixelFormat *df = surface->map->dst->format;
1339 
1340  switch (surface->map->info.flags & ~SDL_COPY_RLE_MASK) {
1341  case SDL_COPY_BLEND:
1342  /* Per-pixel alpha blits */
1343  switch (df->BytesPerPixel) {
1344  case 1:
1345  if (df->palette != NULL) {
1346  return BlitNto1PixelAlpha;
1347  } else {
1348  /* RGB332 has no palette ! */
1349  return BlitNtoNPixelAlpha;
1350  }
1351 
1352  case 2:
1353 #if SDL_ARM_NEON_BLITTERS || SDL_ARM_SIMD_BLITTERS
1354  if (sf->BytesPerPixel == 4 && sf->Amask == 0xff000000
1355  && sf->Gmask == 0xff00 && df->Gmask == 0x7e0
1356  && ((sf->Rmask == 0xff && df->Rmask == 0x1f)
1357  || (sf->Bmask == 0xff && df->Bmask == 0x1f)))
1358  {
1359 #if SDL_ARM_NEON_BLITTERS
1360  if (SDL_HasNEON())
1361  return BlitARGBto565PixelAlphaARMNEON;
1362 #endif
1363 #if SDL_ARM_SIMD_BLITTERS
1364  if (SDL_HasARMSIMD())
1365  return BlitARGBto565PixelAlphaARMSIMD;
1366 #endif
1367  }
1368 #endif
1369  if (sf->BytesPerPixel == 4 && sf->Amask == 0xff000000
1370  && sf->Gmask == 0xff00
1371  && ((sf->Rmask == 0xff && df->Rmask == 0x1f)
1372  || (sf->Bmask == 0xff && df->Bmask == 0x1f))) {
1373  if (df->Gmask == 0x7e0)
1374  return BlitARGBto565PixelAlpha;
1375  else if (df->Gmask == 0x3e0)
1376  return BlitARGBto555PixelAlpha;
1377  }
1378  return BlitNtoNPixelAlpha;
1379 
1380  case 4:
1381  if (sf->Rmask == df->Rmask
1382  && sf->Gmask == df->Gmask
1383  && sf->Bmask == df->Bmask && sf->BytesPerPixel == 4) {
1384 #if defined(__MMX__) || defined(__3dNOW__)
1385  if (sf->Rshift % 8 == 0
1386  && sf->Gshift % 8 == 0
1387  && sf->Bshift % 8 == 0
1388  && sf->Ashift % 8 == 0 && sf->Aloss == 0) {
1389 #ifdef __3dNOW__
1390  if (SDL_Has3DNow())
1391  return BlitRGBtoRGBPixelAlphaMMX3DNOW;
1392 #endif
1393 #ifdef __MMX__
1394  if (SDL_HasMMX())
1395  return BlitRGBtoRGBPixelAlphaMMX;
1396 #endif
1397  }
1398 #endif /* __MMX__ || __3dNOW__ */
1399  if (sf->Amask == 0xff000000) {
1400 #if SDL_ARM_NEON_BLITTERS
1401  if (SDL_HasNEON())
1402  return BlitRGBtoRGBPixelAlphaARMNEON;
1403 #endif
1404 #if SDL_ARM_SIMD_BLITTERS
1405  if (SDL_HasARMSIMD())
1406  return BlitRGBtoRGBPixelAlphaARMSIMD;
1407 #endif
1408  return BlitRGBtoRGBPixelAlpha;
1409  }
1410  }
1411  return BlitNtoNPixelAlpha;
1412 
1413  case 3:
1414  default:
1415  break;
1416  }
1417  return BlitNtoNPixelAlpha;
1418 
1420  if (sf->Amask == 0) {
1421  /* Per-surface alpha blits */
1422  switch (df->BytesPerPixel) {
1423  case 1:
1424  if (df->palette != NULL) {
1425  return BlitNto1SurfaceAlpha;
1426  } else {
1427  /* RGB332 has no palette ! */
1428  return BlitNtoNSurfaceAlpha;
1429  }
1430 
1431  case 2:
1432  if (surface->map->identity) {
1433  if (df->Gmask == 0x7e0) {
1434 #ifdef __MMX__
1435  if (SDL_HasMMX())
1436  return Blit565to565SurfaceAlphaMMX;
1437  else
1438 #endif
1439  return Blit565to565SurfaceAlpha;
1440  } else if (df->Gmask == 0x3e0) {
1441 #ifdef __MMX__
1442  if (SDL_HasMMX())
1443  return Blit555to555SurfaceAlphaMMX;
1444  else
1445 #endif
1446  return Blit555to555SurfaceAlpha;
1447  }
1448  }
1449  return BlitNtoNSurfaceAlpha;
1450 
1451  case 4:
1452  if (sf->Rmask == df->Rmask
1453  && sf->Gmask == df->Gmask
1454  && sf->Bmask == df->Bmask && sf->BytesPerPixel == 4) {
1455 #ifdef __MMX__
1456  if (sf->Rshift % 8 == 0
1457  && sf->Gshift % 8 == 0
1458  && sf->Bshift % 8 == 0 && SDL_HasMMX())
1459  return BlitRGBtoRGBSurfaceAlphaMMX;
1460 #endif
1461  if ((sf->Rmask | sf->Gmask | sf->Bmask) == 0xffffff) {
1462  return BlitRGBtoRGBSurfaceAlpha;
1463  }
1464  }
1465  return BlitNtoNSurfaceAlpha;
1466 
1467  case 3:
1468  default:
1469  return BlitNtoNSurfaceAlpha;
1470  }
1471  }
1472  break;
1473 
1475  if (sf->Amask == 0) {
1476  if (df->BytesPerPixel == 1) {
1477 
1478  if (df->palette != NULL) {
1479  return BlitNto1SurfaceAlphaKey;
1480  } else {
1481  /* RGB332 has no palette ! */
1482  return BlitNtoNSurfaceAlphaKey;
1483  }
1484  } else {
1485  return BlitNtoNSurfaceAlphaKey;
1486  }
1487  }
1488  break;
1489  }
1490 
1491  return NULL;
1492 }

References SDL_PixelFormat::Aloss, SDL_PixelFormat::Amask, SDL_PixelFormat::Ashift, Blit555to555SurfaceAlpha(), Blit565to565SurfaceAlpha(), BlitARGBto555PixelAlpha(), BlitARGBto565PixelAlpha(), BlitNto1PixelAlpha(), BlitNto1SurfaceAlpha(), BlitNto1SurfaceAlphaKey(), BlitNtoNPixelAlpha(), BlitNtoNSurfaceAlpha(), BlitNtoNSurfaceAlphaKey(), BlitRGBtoRGBPixelAlpha(), BlitRGBtoRGBSurfaceAlpha(), SDL_PixelFormat::Bmask, SDL_PixelFormat::Bshift, SDL_PixelFormat::BytesPerPixel, SDL_PixelFormat::format, SDL_PixelFormat::Gmask, SDL_PixelFormat::Gshift, NULL, SDL_PixelFormat::palette, SDL_PixelFormat::Rmask, SDL_PixelFormat::Rshift, SDL_COPY_BLEND, SDL_COPY_COLORKEY, SDL_COPY_MODULATE_ALPHA, SDL_COPY_RLE_MASK, SDL_Has3DNow, SDL_HasARMSIMD, SDL_HasMMX, and SDL_HasNEON.

Referenced by SDL_CalculateBlit().

SDL_BlitInfo::src
Uint8 * src
Definition: SDL_blit.h:58
SDL_PixelFormat::Rshift
Uint8 Rshift
Definition: SDL_pixels.h:333
SDL_BlitInfo::src_skip
int src_skip
Definition: SDL_blit.h:61
SDL_PixelFormat::Ashift
Uint8 Ashift
Definition: SDL_pixels.h:336
BlitNto1SurfaceAlphaKey
static void BlitNto1SurfaceAlphaKey(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:125
Uint8
uint8_t Uint8
Definition: SDL_stdinc.h:179
ASSEMBLE_RGBA
#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)
Definition: SDL_blit.h:403
SDL_PixelFormat::BytesPerPixel
Uint8 BytesPerPixel
Definition: SDL_pixels.h:323
BLEND2x16_50
#define BLEND2x16_50(d, s, mask)
Definition: SDL_blit_A.c:658
Blit16to16SurfaceAlpha128
static void Blit16to16SurfaceAlpha128(SDL_BlitInfo *info, Uint16 mask)
Definition: SDL_blit_A.c:663
mask
GLenum GLint GLuint mask
Definition: SDL_opengl_glext.h:660
Uint16
uint16_t Uint16
Definition: SDL_stdinc.h:191
SDL_Color::b
Uint8 b
Definition: SDL_pixels.h:302
DUFFS_LOOP4
#define DUFFS_LOOP4(pixel_copy_increment, width)
Definition: SDL_blit.h:489
SDL_Has3DNow
#define SDL_Has3DNow
Definition: SDL_dynapi_overrides.h:106
BlitARGBto555PixelAlpha
static void BlitARGBto555PixelAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:1166
NULL
#define NULL
Definition: begin_code.h:167
surface
EGLSurface surface
Definition: eglext.h:248
SDL_PixelFormat::format
Uint32 format
Definition: SDL_pixels.h:320
SDL_ALPHA_OPAQUE
#define SDL_ALPHA_OPAQUE
Definition: SDL_pixels.h:46
width
GLint GLint GLsizei width
Definition: SDL_opengl.h:1572
BlitNto1SurfaceAlpha
static void BlitNto1SurfaceAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:32
RETRIEVE_RGB_PIXEL
#define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel)
Definition: SDL_blit.h:147
SDL_BlitInfo::dst_w
int dst_w
Definition: SDL_blit.h:63
ALPHA_BLEND_RGB
#define ALPHA_BLEND_RGB(sR, sG, sB, A, dR, dG, dB)
Definition: SDL_blit.h:446
SDL_Color::r
Uint8 r
Definition: SDL_pixels.h:300
SDL_BlitInfo::dst_h
int dst_h
Definition: SDL_blit.h:63
SDL_COPY_COLORKEY
#define SDL_COPY_COLORKEY
Definition: SDL_blit.h:40
Uint32
uint32_t Uint32
Definition: SDL_stdinc.h:203
SDL_PixelFormat::Rmask
Uint32 Rmask
Definition: SDL_pixels.h:325
SDL_COPY_RLE_MASK
#define SDL_COPY_RLE_MASK
Definition: SDL_blit.h:45
DISEMBLE_RGBA
#define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a)
Definition: SDL_blit.h:354
s1
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
Definition: SDL_opengl_glext.h:8586
alpha
GLfloat GLfloat GLfloat alpha
Definition: SDL_opengl_glext.h:415
dst
GLenum GLenum dst
Definition: SDL_opengl_glext.h:1740
SDL_BlitInfo::dst
Uint8 * dst
Definition: SDL_blit.h:62
DUFFS_LOOP
#define DUFFS_LOOP(pixel_copy_increment, width)
Definition: SDL_blit.h:501
SDL_Palette::colors
SDL_Color * colors
Definition: SDL_pixels.h:310
BlitARGBto565PixelAlpha
static void BlitARGBto565PixelAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:1120
SDL_BlitInfo::src_fmt
SDL_PixelFormat * src_fmt
Definition: SDL_blit.h:66
Blit555to555SurfaceAlpha
static void Blit555to555SurfaceAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:1081
SDL_Color::g
Uint8 g
Definition: SDL_pixels.h:301
BlitNtoNPixelAlpha
static void BlitNtoNPixelAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:1293
BlitNtoNSurfaceAlphaKey
static void BlitNtoNSurfaceAlphaKey(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:1252
height
GLint GLint GLsizei GLsizei height
Definition: SDL_opengl.h:1572
SDL_COPY_BLEND
#define SDL_COPY_BLEND
Definition: SDL_blit.h:36
SDL_BlitInfo::dst_skip
int dst_skip
Definition: SDL_blit.h:65
SDL_BlitInfo::table
Uint8 * table
Definition: SDL_blit.h:68
SDL_PixelFormat::palette
SDL_Palette * palette
Definition: SDL_pixels.h:321
BlitNto1PixelAlpha
static void BlitNto1PixelAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:79
SDL_PixelFormat::Amask
Uint32 Amask
Definition: SDL_pixels.h:328
SDL_HasNEON
#define SDL_HasNEON
Definition: SDL_dynapi_overrides.h:618
ALPHA_BLEND_RGBA
#define ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA)
Definition: SDL_blit.h:455
SDL_PixelFormat
Definition: SDL_pixels.h:319
SDL_BlitInfo::a
Uint8 a
Definition: SDL_blit.h:71
SDL_PixelFormat::Gmask
Uint32 Gmask
Definition: SDL_pixels.h:326
Blit565to565SurfaceAlpha
static void Blit565to565SurfaceAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:1042
BlitNtoNSurfaceAlpha
static void BlitNtoNSurfaceAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:1213
SDL_COPY_MODULATE_ALPHA
#define SDL_COPY_MODULATE_ALPHA
Definition: SDL_blit.h:35
BlitRGBtoRGBSurfaceAlpha128
static void BlitRGBtoRGBSurfaceAlpha128(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:460
SDL_BlitInfo::dst_fmt
SDL_PixelFormat * dst_fmt
Definition: SDL_blit.h:67
BLEND16_50
#define BLEND16_50(d, s, mask)
Definition: SDL_blit_A.c:654
DISEMBLE_RGB
#define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b)
Definition: SDL_blit.h:178
SDL_HasMMX
#define SDL_HasMMX
Definition: SDL_dynapi_overrides.h:105
SDL_PixelFormat::Bmask
Uint32 Bmask
Definition: SDL_pixels.h:327
src
GLenum src
Definition: SDL_opengl_glext.h:1740
SDL_PixelFormat::Bshift
Uint8 Bshift
Definition: SDL_pixels.h:335
blit_table::dstbpp
int dstbpp
Definition: SDL_blit_N.c:3230
s
GLdouble s
Definition: SDL_opengl.h:2063
SDL_PixelFormat::Aloss
Uint8 Aloss
Definition: SDL_pixels.h:332
SDL_HasARMSIMD
#define SDL_HasARMSIMD
Definition: SDL_dynapi_overrides.h:730
SDL_BlitInfo::colorkey
Uint32 colorkey
Definition: SDL_blit.h:70
RGB_FROM_PIXEL
#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b)
Definition: SDL_blit.h:123
SDL_PixelFormat::Gshift
Uint8 Gshift
Definition: SDL_pixels.h:334
BlitRGBtoRGBPixelAlpha
static void BlitRGBtoRGBPixelAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:527
BlitRGBtoRGBSurfaceAlpha
static void BlitRGBtoRGBSurfaceAlpha(SDL_BlitInfo *info)
Definition: SDL_blit_A.c:485
d
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 SDL_AssertionHandler void SDL_SpinLock SDL_atomic_t int int return SDL_atomic_t return void void void return void return int return SDL_AudioSpec SDL_AudioSpec return int int return return int SDL_RWops int SDL_AudioSpec Uint8 ** d
Definition: SDL_dynapi_procs.h:117
w
GLubyte GLubyte GLubyte GLubyte w
Definition: SDL_opengl_glext.h:734
uintptr_t
unsigned int uintptr_t
Definition: SDL_config_windows.h:70