Go to the documentation of this file.
21 #include "../SDL_internal.h"
34 c128.m128_u32[0] = color; \
35 c128.m128_u32[1] = color; \
36 c128.m128_u32[2] = color; \
37 c128.m128_u32[3] = color;
41 DECLARE_ALIGNED(Uint32, cccc[4], 16); \
46 c128 = *(__m128 *)cccc;
50 for (i = n / 64; i--;) { \
51 _mm_stream_ps((float *)(p+0), c128); \
52 _mm_stream_ps((float *)(p+16), c128); \
53 _mm_stream_ps((float *)(p+32), c128); \
54 _mm_stream_ps((float *)(p+48), c128); \
60 #define DEFINE_SSE_FILLRECT(bpp, type) \
62 SDL_FillRect##bpp##SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h) \
74 int adjust = 16 - ((uintptr_t)p & 15); \
79 *((type *)p) = (type)color; \
86 int remainder = (n & 63); \
88 while (remainder--) { \
89 *((type *)p) = (type)color; \
119 int remainder = (
n & 63);
128 DEFINE_SSE_FILLRECT(2,
Uint16)
129 DEFINE_SSE_FILLRECT(4,
Uint32)
200 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
204 #elif SDL_BYTEORDER == SDL_BIG_ENDIAN
256 #if SDL_ARM_NEON_BLITTERS
277 #if SDL_ARM_SIMD_BLITTERS
313 if (
dst->format->BitsPerPixel < 8) {
314 return SDL_SetError(
"SDL_FillRect(): Unsupported surface format");
319 return SDL_SetError(
"SDL_FillRect(): You must lock the surface");
323 return SDL_SetError(
"SDL_FillRects() passed NULL rects");
326 #if SDL_ARM_NEON_BLITTERS
328 switch (
dst->format->BytesPerPixel) {
330 fill_function = fill_8_neon;
333 fill_function = fill_16_neon;
336 fill_function = fill_32_neon;
341 #if SDL_ARM_SIMD_BLITTERS
343 switch (
dst->format->BytesPerPixel) {
345 fill_function = fill_8_simd;
348 fill_function = fill_16_simd;
351 fill_function = fill_32_simd;
357 if (fill_function ==
NULL) {
358 switch (
dst->format->BytesPerPixel) {
365 fill_function = SDL_FillRect1SSE;
378 fill_function = SDL_FillRect2SSE;
397 fill_function = SDL_FillRect4SSE;
419 rect->
x *
dst->format->BytesPerPixel;
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).
const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char const char const SDL_SCANF_FORMAT_STRING char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
EGLSurface EGLint * rects
int SDL_FillRects(SDL_Surface *dst, const SDL_Rect *rects, int count, Uint32 color)
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)
GLubyte GLubyte GLubyte GLubyte w