21 #include "../SDL_internal.h" 99 return (okay ? 0 : -1);
103 #include <sys/sysctl.h> 108 const char key[] =
"hw.l3cachesize";
110 size_t typeSize =
sizeof(
result);
112 if (sysctlbyname(key, &result, &typeSize,
NULL, 0) == 0 && result > 0) {
132 static Uint32 features = 0xffffffff;
135 if (features == 0xffffffff) {
136 const char *
override =
SDL_getenv(
"SDL_BLIT_CPU_FEATURES");
166 for (i = 0; entries[
i].
func; ++
i) {
168 if (src_format != entries[i].src_format) {
171 if (dst_format != entries[i].dst_format) {
178 if ((flagcheck & entries[i].flags) != flagcheck) {
186 if ((flagcheck & entries[i].flags) != flagcheck) {
192 if ((flagcheck & entries[i].flags) != flagcheck) {
198 if ((flagcheck & entries[i].flags) != flagcheck) {
203 flagcheck = entries[
i].
cpu;
204 if ((flagcheck & features) != flagcheck) {
209 return entries[
i].
func;
271 #ifndef TEST_SLOW_BLIT
#define SDL_COPY_MODULATE_COLOR
#define SDL_UnlockSurface
#define SDL_COPY_COLORKEY
SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface *surface)
#define SDL_ISPIXELFORMAT_INDEXED(format)
SDL_PixelFormat * src_fmt
void SDL_Blit_Slow(SDL_BlitInfo *info)
A collection of pixels used in software blitting.
void SDL_UnRLESurface(SDL_Surface *surface, int recode)
SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
Returns true if the rectangle has no area.
#define SDL_COPY_RLE_DESIRED
void SDL_InvalidateMap(SDL_BlitMap *map)
void SDL_BlitCopy(SDL_BlitInfo *info)
static SDL_BlitFunc SDL_ChooseBlitFunc(Uint32 src_format, Uint32 dst_format, int flags, SDL_BlitFuncEntry *entries)
#define SDL_CPU_ALTIVEC_PREFETCH
int SDL_CalculateBlit(SDL_Surface *surface)
SDL_PixelFormat * dst_fmt
SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[]
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_RLESurface(SDL_Surface *surface)
SDL_BlitFunc SDL_CalculateBlit0(SDL_Surface *surface)
#define SDL_COPY_MODULATE_ALPHA
SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface *surface)
void(* SDL_BlitFunc)(SDL_BlitInfo *info)
static int SDL_SoftBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
#define SDL_ISPIXELFORMAT_FOURCC(format)
const GLubyte GLuint GLuint GLuint GLuint alpha GLboolean GLboolean GLboolean GLboolean alpha GLint GLint GLsizei GLsizei GLenum type GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint border GLenum GLint GLint GLint GLint GLint GLsizei GLsizei height GLsizei GLsizei GLenum GLenum const GLvoid *pixels GLenum GLint GLint GLint GLint j2 GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum GLenum GLint *params GLenum GLenum GLint *params GLenum GLenum GLint *params GLenum GLenum GLfloat *params GLenum GLint GLenum GLenum GLvoid *pixels GLenum GLint GLenum GLint *params GLenum GLenum GLint *params GLenum GLsizei const GLvoid *pointer GLenum GLenum const GLint *params GLenum GLfloat GLfloat GLint GLint const GLfloat *points GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat *points GLint GLfloat GLfloat GLint GLfloat GLfloat v2 GLenum GLenum const GLint *params GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum map
SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface)
static SDL_bool SDL_UseAltivecPrefetch()
#define SDL_CPU_ALTIVEC_NOPREFETCH
A rectangle, with the origin at the upper left.