85 RunBlit = (SDL_BlitFunc) src->
map->
data;
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;
218 SDL_BlitFunc blit =
NULL;
261 #ifndef TEST_SLOW_BLIT
#define SDL_COPY_MODULATE_COLOR
#define SDL_COPY_COLORKEY
SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface *surface)
DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void)
#define SDL_ISPIXELFORMAT_INDEXED(format)
SDL_PixelFormat * src_fmt
void SDL_Blit_Slow(SDL_BlitInfo *info)
A collection of pixels used in software blitting.
DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void)
void SDL_UnRLESurface(SDL_Surface *surface, int recode)
DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt,...)
DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void)
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)
uint32_t Uint32
An unsigned 32-bit integer type.
DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface *surface)
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
DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void)
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
int SDL_CalculateBlit(SDL_Surface *surface)
SDL_PixelFormat * dst_fmt
SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[]
int SDL_RLESurface(SDL_Surface *surface)
SDL_BlitFunc SDL_CalculateBlit0(SDL_Surface *surface)
DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void)
GLenum GLsizei GLsizei GLsizei GLsizei GLbitfield flags
#define SDL_COPY_MODULATE_ALPHA
uint8_t Uint8
An unsigned 8-bit integer type.
SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface *surface)
static int SDL_SoftBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
uint16_t Uint16
An unsigned 16-bit integer type.
DECLSPEC char *SDLCALL SDL_getenv(const char *name)
#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()
DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface *surface)
Sets up a surface for directly accessing the pixels.
#define SDL_CPU_ALTIVEC_NOPREFETCH
A rectangle, with the origin at the upper left.