Skip to content

Commit

Permalink
Speed up full-surface fills
Browse files Browse the repository at this point in the history
(cherry picked from commit 7a3f5ef)
(cherry picked from commit 9f07ac8)
  • Loading branch information
Starbuck5 authored and slouken committed Nov 25, 2024
1 parent 2f87363 commit 1e3465d
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 @@ -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; \
\
Expand Down

0 comments on commit 1e3465d

Please sign in to comment.