Go to the documentation of this file.
21 #include "../SDL_internal.h"
33 c128.m128_u32[0] = color; \
34 c128.m128_u32[1] = color; \
35 c128.m128_u32[2] = color; \
36 c128.m128_u32[3] = color;
40 DECLARE_ALIGNED(Uint32, cccc[4], 16); \
45 c128 = *(__m128 *)cccc;
49 for (i = n / 64; i--;) { \
50 _mm_stream_ps((float *)(p+0), c128); \
51 _mm_stream_ps((float *)(p+16), c128); \
52 _mm_stream_ps((float *)(p+32), c128); \
53 _mm_stream_ps((float *)(p+48), c128); \
59 #define DEFINE_SSE_FILLRECT(bpp, type) \
61 SDL_FillRect##bpp##SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h) \
73 int adjust = 16 - ((uintptr_t)p & 15); \
78 *((type *)p) = (type)color; \
85 int remainder = (n & 63); \
87 while (remainder--) { \
88 *((type *)p) = (type)color; \
118 int remainder = (
n & 63);
127 DEFINE_SSE_FILLRECT(2,
Uint16)
128 DEFINE_SSE_FILLRECT(4,
Uint32)
199 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
203 #elif SDL_BYTEORDER == SDL_BIG_ENDIAN
247 if (
dst->format->BitsPerPixel < 8) {
248 return SDL_SetError(
"SDL_FillRect(): Unsupported surface format");
268 return SDL_SetError(
"SDL_FillRect(): You must lock the surface");
272 rect->
x *
dst->format->BytesPerPixel;
274 switch (
dst->format->BytesPerPixel) {
334 return SDL_SetError(
"SDL_FillRects() passed NULL rects");
int SDL_FillRect(SDL_Surface *dst, const SDL_Rect *rect, Uint32 color)
A collection of pixels used in software blitting.
GLuint GLuint GLsizei count
static void SDL_FillRect4(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
#define SDL_IntersectRect
SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
Returns true if the rectangle has no area.
GLfloat GLfloat GLfloat GLfloat h
static void SDL_FillRect1(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
static void SDL_FillRect2(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
static void SDL_FillRect3(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
A rectangle, with the origin at the upper left (integer).
EGLSurface EGLint * rects
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
int SDL_FillRects(SDL_Surface *dst, const SDL_Rect *rects, int count, Uint32 color)
GLubyte GLubyte GLubyte GLubyte w