diff 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
line wrap: on
line diff
--- a/src/video/SDL_blit.c	Tue Dec 02 17:10:05 2008 +0000
+++ b/src/video/SDL_blit.c	Tue Dec 02 17:14:04 2008 +0000
@@ -26,6 +26,7 @@
 #include "SDL_blit.h"
 #include "SDL_blit_auto.h"
 #include "SDL_blit_copy.h"
+#include "SDL_blit_slow.h"
 #include "SDL_RLEaccel_c.h"
 #include "SDL_pixels_c.h"
 
@@ -269,6 +270,15 @@
             SDL_ChooseBlitFunc(src_format, dst_format, map->info.flags,
                                SDL_GeneratedBlitFuncTable);
     }
+#ifndef TEST_SLOW_BLIT
+    if (blit == NULL)
+#endif
+    {
+        if (surface->format->BytesPerPixel > 1
+            && dst->format->BytesPerPixel > 1) {
+            blit = SDL_Blit_Slow;
+        }
+    }
     map->data = blit;
 
     /* Make sure we have a blit function */