summaryrefslogtreecommitdiff
path: root/src/resources/sdl2softwareimagehelper.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-01 23:38:52 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-01 23:38:52 +0300
commit987141c4340c508b14ec085f977754bb48dcfe0e (patch)
treebcf9b747ebdf79a4c45a9d19a4c22725d48f4b99 /src/resources/sdl2softwareimagehelper.h
parent2ab3f0d8d04374b330c91a9f065efa0f526d7824 (diff)
downloadplus-987141c4340c508b14ec085f977754bb48dcfe0e.tar.gz
plus-987141c4340c508b14ec085f977754bb48dcfe0e.tar.bz2
plus-987141c4340c508b14ec085f977754bb48dcfe0e.tar.xz
plus-987141c4340c508b14ec085f977754bb48dcfe0e.zip
improve speed in software renderer in SDL2.
now it works almost with same speed like SDL1.2
Diffstat (limited to 'src/resources/sdl2softwareimagehelper.h')
-rw-r--r--src/resources/sdl2softwareimagehelper.h10
1 files changed, 3 insertions, 7 deletions
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