34 bool SDL2SoftwareImageHelper::mEnableAlphaCache =
false;
35 SDL_PixelFormat *SDL2SoftwareImageHelper::mFormat =
nullptr;
37 Image *SDL2SoftwareImageHelper::loadSurface(SDL_Surface *
const tmpImage)
39 return _SDLload(tmpImage);
42 Image *SDL2SoftwareImageHelper::createTextSurface(SDL_Surface *
const tmpImage,
50 Image *
const img = _SDLload(tmpImage);
56 SDL_Surface* SDL2SoftwareImageHelper::SDLDuplicateSurface(SDL_Surface *
const
59 if (!tmpImage || !tmpImage->format)
65 Image *SDL2SoftwareImageHelper::_SDLload(SDL_Surface *tmpImage)
70 SDL_Surface *image = SDL_ConvertSurface(tmpImage, mFormat, 0);
71 return new Image(image,
false,
nullptr);
74 int SDL2SoftwareImageHelper::combineSurface(SDL_Surface *
restrict const src,
79 SDL_SetSurfaceBlendMode(src, SDL_BLENDMODE_BLEND);
80 SDL_BlitSurface(src, srcrect, dst, dstrect);
#define MSDL_ConvertSurface(src, fmt, flags)