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);
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;
223 if (
dst->format->BitsPerPixel < 8) {
235 map->info.dst_fmt =
dst->format;
236 map->info.dst_pitch =
dst->pitch;
248 }
else if (
surface->format->Rloss > 8 ||
dst->format->Rloss > 8) {
252 }
else if (
surface->format->BitsPerPixel < 8 &&
255 }
else if (
surface->format->BytesPerPixel == 1 &&
271#ifndef TEST_SLOW_BLIT
void SDL_UnRLESurface(SDL_Surface *surface, int recode)
int SDL_RLESurface(SDL_Surface *surface)
static SDL_bool SDL_UseAltivecPrefetch()
int SDL_CalculateBlit(SDL_Surface *surface)
static SDL_BlitFunc SDL_ChooseBlitFunc(Uint32 src_format, Uint32 dst_format, int flags, SDL_BlitFuncEntry *entries)
static int SDL_SoftBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface)
#define SDL_CPU_ALTIVEC_PREFETCH
SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface *surface)
SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface *surface)
#define SDL_COPY_RLE_DESIRED
#define SDL_COPY_MODULATE_COLOR
#define SDL_COPY_COLORKEY
#define SDL_COPY_MODULATE_ALPHA
void(* SDL_BlitFunc)(SDL_BlitInfo *info)
SDL_BlitFunc SDL_CalculateBlit0(SDL_Surface *surface)
#define SDL_CPU_ALTIVEC_NOPREFETCH
SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[]
void SDL_BlitCopy(SDL_BlitInfo *info)
void SDL_Blit_Slow(SDL_BlitInfo *info)
#define SDL_UnlockSurface
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
void SDL_InvalidateMap(SDL_BlitMap *map)
#define SDL_ISPIXELFORMAT_INDEXED(format)
#define SDL_ISPIXELFORMAT_FOURCC(format)
SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
Returns true if the rectangle has no area.
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)
SDL_PixelFormat * src_fmt
SDL_PixelFormat * dst_fmt
A rectangle, with the origin at the upper left (integer).
A collection of pixels used in software blitting.