mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-16 19:18:55 +00:00
Speed up full-surface fills
(cherry picked from commit7a3f5ef129) (cherry picked from commit9f07ac8bba)
This commit is contained in:
parent
2f873636c7
commit
1e3465dc99
1 changed files with 7 additions and 0 deletions
|
|
@ -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; \
|
||||
\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue