Speed up full-surface fills

This commit is contained in:
Starbuck5 authored and Sam Lantinga committed 2024-11-24 17:44:00 -08:00
1 parent 10e2ce9ba4
commit 7a3f5ef129
1 file changed
+7
+7
View File
@@ -59,6 +59,13 @@ static void SDL_TARGETING("sse") SDL_FillSurfaceRect##bpp##SSE(Uint8 *pixels, in
{ \ { \
int i, n; \ int i, n; \
Uint8 *p = NULL; \ 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; \ SSE_BEGIN; \
\ \