Mercurial > sdl-ios-xcode
diff src/video/dummy/SDL_nullrender.c @ 1992:7387e0514595
Take advantage of the existing SDL blitters for normal copy blits.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 29 Aug 2006 08:24:16 +0000 |
parents | 7b573c59cb1f |
children | b252359547ed |
line wrap: on
line diff
--- a/src/video/dummy/SDL_nullrender.c Mon Aug 28 17:35:15 2006 +0000 +++ b/src/video/dummy/SDL_nullrender.c Tue Aug 29 08:24:16 2006 +0000 @@ -280,10 +280,19 @@ SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); SDL_Surface *surface = (SDL_Surface *) texture->driverdata; - surface->userdata = - SDL_GetRenderCopyFunc(texture->format, display->current_mode.format, - texture->modMode, texture->blendMode, - texture->scaleMode); + /* We only need a special copy function for advanced features */ + if (texture->modMode + || (texture-> + blendMode & (SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD)) + || texture->scaleMode) { + surface->userdata = + SDL_GetRenderCopyFunc(texture->format, + display->current_mode.format, + texture->modMode, texture->blendMode, + texture->scaleMode); + } else { + surface->userdata = NULL; + } } static int