Skip to content

Commit

Permalink
Speed up full-surface fills
Browse files Browse the repository at this point in the history
  • Loading branch information
Starbuck5 authored and slouken committed Nov 25, 2024
1 parent 10e2ce9 commit 7a3f5ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/video/SDL_fillrect.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ static void SDL_TARGETING("sse") SDL_FillSurfaceRect##bpp##SSE(Uint8 *pixels, in
{ \
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; \
\
Expand Down

0 comments on commit 7a3f5ef

Please sign in to comment.