Mercurial > sdl-ios-xcode
comparison src/video/SDL_renderer_sw.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 | 5b5f5de5433f |
children | 3ee59c43d784 |
comparison
equal
deleted
inserted
replaced
1991:3863ba81c1d6 | 1992:7387e0514595 |
---|---|
419 SW_UpdateRenderCopyFunc(SDL_Renderer * renderer, SDL_Texture * texture) | 419 SW_UpdateRenderCopyFunc(SDL_Renderer * renderer, SDL_Texture * texture) |
420 { | 420 { |
421 SW_RenderData *data = (SW_RenderData *) renderer->driverdata; | 421 SW_RenderData *data = (SW_RenderData *) renderer->driverdata; |
422 SDL_Surface *surface = (SDL_Surface *) texture->driverdata; | 422 SDL_Surface *surface = (SDL_Surface *) texture->driverdata; |
423 | 423 |
424 surface->userdata = | 424 /* We only need a special copy function for advanced features */ |
425 SDL_GetRenderCopyFunc(texture->format, data->format, texture->modMode, | 425 if (texture->modMode |
426 texture->blendMode, texture->scaleMode); | 426 || (texture-> |
427 blendMode & (SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD)) | |
428 || texture->scaleMode) { | |
429 surface->userdata = | |
430 SDL_GetRenderCopyFunc(texture->format, data->format, | |
431 texture->modMode, texture->blendMode, | |
432 texture->scaleMode); | |
433 } else { | |
434 surface->userdata = NULL; | |
435 } | |
427 } | 436 } |
428 | 437 |
429 static int | 438 static int |
430 SW_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture) | 439 SW_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture) |
431 { | 440 { |