From 987141c4340c508b14ec085f977754bb48dcfe0e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 1 Sep 2013 23:38:52 +0300 Subject: improve speed in software renderer in SDL2. now it works almost with same speed like SDL1.2 --- src/resources/sdl2softwareimagehelper.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/resources/sdl2softwareimagehelper.h') diff --git a/src/resources/sdl2softwareimagehelper.h b/src/resources/sdl2softwareimagehelper.h index 877ae9032..907d2242e 100644 --- a/src/resources/sdl2softwareimagehelper.h +++ b/src/resources/sdl2softwareimagehelper.h @@ -94,19 +94,15 @@ class SDL2SoftwareImageHelper final : public ImageHelper SDL_Surface *const dst, SDL_Rect *const dstrect); -#ifdef USE_SDL2 - static void setRenderer(SDL_Renderer *const renderer) - { mRenderer = renderer; } -#endif + static void setFormat(SDL_PixelFormat *const format) + { mFormat = format; } protected: /** SDL_Surface to SDL_Surface Image loader */ Image *_SDLload(SDL_Surface *tmpImage) const A_WARN_UNUSED; static bool mEnableAlphaCache; -#ifdef USE_SDL2 - static SDL_Renderer *mRenderer; -#endif + static SDL_PixelFormat *mFormat; }; #endif // USE_SDL2 -- cgit v1.2.3-60-g2f50