comparison src/video/SDL_blit.c @ 2824:4dba7aa7ea77

Added slow but complete blit fallback Don't try to RLE encode surfaces that have alpha channel and alpha modulation Don't turn on blending when converting an RGB surface to RGBA format Do turn on blending when converting colorkey to alpha channel
author Sam Lantinga <slouken@libsdl.org>
date Tue, 02 Dec 2008 17:14:04 +0000
parents 2ed5ff5373d8
children ff8db79a3cc9
comparison
equal deleted inserted replaced
2823:15e1dd1fff78 2824:4dba7aa7ea77
24 #include "SDL_video.h" 24 #include "SDL_video.h"
25 #include "SDL_sysvideo.h" 25 #include "SDL_sysvideo.h"
26 #include "SDL_blit.h" 26 #include "SDL_blit.h"
27 #include "SDL_blit_auto.h" 27 #include "SDL_blit_auto.h"
28 #include "SDL_blit_copy.h" 28 #include "SDL_blit_copy.h"
29 #include "SDL_blit_slow.h"
29 #include "SDL_RLEaccel_c.h" 30 #include "SDL_RLEaccel_c.h"
30 #include "SDL_pixels_c.h" 31 #include "SDL_pixels_c.h"
31 32
32 /* The general purpose software blit routine */ 33 /* The general purpose software blit routine */
33 static int 34 static int
267 268
268 blit = 269 blit =
269 SDL_ChooseBlitFunc(src_format, dst_format, map->info.flags, 270 SDL_ChooseBlitFunc(src_format, dst_format, map->info.flags,
270 SDL_GeneratedBlitFuncTable); 271 SDL_GeneratedBlitFuncTable);
271 } 272 }
273 #ifndef TEST_SLOW_BLIT
274 if (blit == NULL)
275 #endif
276 {
277 if (surface->format->BytesPerPixel > 1
278 && dst->format->BytesPerPixel > 1) {
279 blit = SDL_Blit_Slow;
280 }
281 }
272 map->data = blit; 282 map->data = blit;
273 283
274 /* Make sure we have a blit function */ 284 /* Make sure we have a blit function */
275 if (blit == NULL) { 285 if (blit == NULL) {
276 SDL_InvalidateMap(map); 286 SDL_InvalidateMap(map);