Speed up full-surface fills

(cherry picked from commit 7a3f5ef129)
This commit is contained in:
Starbuck5
2024-11-23 14:48:52 -08:00
committed by Sam Lantinga
parent ba433e4a5d
commit 9f07ac8bba

View File

@@ -61,6 +61,13 @@ static void SDL_FillRect##bpp##SSE(Uint8 *pixels, int pitch, Uint32 color, int w
{ \
int i, n; \
Uint8 *p = NULL; \
\
/* If the number of bytes per row is equal to the pitch, treat */ \
/* all rows as one long continuous row (for better performance) */ \
if ((w) * (bpp) == pitch) { \
w = w * h; \
h = 1; \
} \
\
SSE_BEGIN; \
\