# HG changeset patch # User Sam Lantinga # Date 1156839856 0 # Node ID 7387e0514595dfba03d00a5ec20b5cce64f5b1ff # Parent 3863ba81c1d6b439e53d3f1d0425558c62e33118 Take advantage of the existing SDL blitters for normal copy blits. diff -r 3863ba81c1d6 -r 7387e0514595 src/video/SDL_rendercopy.c --- a/src/video/SDL_rendercopy.c Mon Aug 28 17:35:15 2006 +0000 +++ b/src/video/SDL_rendercopy.c Tue Aug 29 08:24:16 2006 +0000 @@ -42,7 +42,6 @@ { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGB888_RGB888_Modulate_Scale }, { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_RGB888_RGB888_Modulate_Blend }, { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGB888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, 0, 0, 0, SDL_RenderCopy_RGB888_BGR888 }, { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGB888_BGR888_Scale }, { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_RGB888_BGR888_Blend }, { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGB888_BGR888_Blend_Scale }, @@ -50,7 +49,6 @@ { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGB888_BGR888_Modulate_Scale }, { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_RGB888_BGR888_Modulate_Blend }, { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGB888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, 0, 0, 0, SDL_RenderCopy_BGR888_RGB888 }, { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGR888_RGB888_Scale }, { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_BGR888_RGB888_Blend }, { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGR888_RGB888_Blend_Scale }, @@ -65,7 +63,6 @@ { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGR888_BGR888_Modulate_Scale }, { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_BGR888_BGR888_Modulate_Blend }, { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGR888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, 0, 0, 0, SDL_RenderCopy_ARGB8888_RGB888 }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ARGB8888_RGB888_Scale }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_ARGB8888_RGB888_Blend }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ARGB8888_RGB888_Blend_Scale }, @@ -73,7 +70,6 @@ { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ARGB8888_RGB888_Modulate_Scale }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_ARGB8888_RGB888_Modulate_Blend }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ARGB8888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, 0, 0, 0, SDL_RenderCopy_ARGB8888_BGR888 }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ARGB8888_BGR888_Scale }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_ARGB8888_BGR888_Blend }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ARGB8888_BGR888_Blend_Scale }, @@ -81,7 +77,6 @@ { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ARGB8888_BGR888_Modulate_Scale }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_ARGB8888_BGR888_Modulate_Blend }, { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ARGB8888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, 0, 0, 0, SDL_RenderCopy_RGBA8888_RGB888 }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGBA8888_RGB888_Scale }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_RGBA8888_RGB888_Blend }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGBA8888_RGB888_Blend_Scale }, @@ -89,7 +84,6 @@ { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGBA8888_RGB888_Modulate_Scale }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_RGBA8888_RGB888_Modulate_Blend }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGBA8888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, 0, 0, 0, SDL_RenderCopy_RGBA8888_BGR888 }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGBA8888_BGR888_Scale }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_RGBA8888_BGR888_Blend }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGBA8888_BGR888_Blend_Scale }, @@ -97,7 +91,6 @@ { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGBA8888_BGR888_Modulate_Scale }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_RGBA8888_BGR888_Modulate_Blend }, { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_RGBA8888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, 0, 0, 0, SDL_RenderCopy_ABGR8888_RGB888 }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ABGR8888_RGB888_Scale }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_ABGR8888_RGB888_Blend }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ABGR8888_RGB888_Blend_Scale }, @@ -105,7 +98,6 @@ { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ABGR8888_RGB888_Modulate_Scale }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_ABGR8888_RGB888_Modulate_Blend }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ABGR8888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, 0, 0, 0, SDL_RenderCopy_ABGR8888_BGR888 }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ABGR8888_BGR888_Scale }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_ABGR8888_BGR888_Blend }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ABGR8888_BGR888_Blend_Scale }, @@ -113,7 +105,6 @@ { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ABGR8888_BGR888_Modulate_Scale }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_ABGR8888_BGR888_Modulate_Blend }, { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_ABGR8888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, 0, 0, 0, SDL_RenderCopy_BGRA8888_RGB888 }, { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGRA8888_RGB888_Scale }, { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_BGRA8888_RGB888_Blend }, { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGRA8888_RGB888_Blend_Scale }, @@ -121,7 +112,6 @@ { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGRA8888_RGB888_Modulate_Scale }, { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_BGRA8888_RGB888_Modulate_Blend }, { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGRA8888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, 0, 0, 0, SDL_RenderCopy_BGRA8888_BGR888 }, { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, 0, 0, SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGRA8888_BGR888_Scale }, { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), 0, SDL_RenderCopy_BGRA8888_BGR888_Blend }, { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, 0, (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | SDL_TEXTUREBLENDMODE_MOD), SDL_TEXTURESCALEMODE_FAST, SDL_RenderCopy_BGRA8888_BGR888_Blend_Scale }, @@ -595,30 +585,6 @@ return 0; } -int SDL_RenderCopy_RGB888_BGR888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; A = 0xFF; - pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_RGB888_BGR888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; @@ -1063,30 +1029,6 @@ return 0; } -int SDL_RenderCopy_BGR888_RGB888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; A = 0xFF; - pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_BGR888_RGB888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; @@ -1970,30 +1912,6 @@ return 0; } -int SDL_RenderCopy_ARGB8888_RGB888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - A = (Uint8)(pixel >> 24); R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; - pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_ARGB8888_RGB888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; @@ -2438,30 +2356,6 @@ return 0; } -int SDL_RenderCopy_ARGB8888_BGR888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - A = (Uint8)(pixel >> 24); R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; - pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_ARGB8888_BGR888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; @@ -2906,30 +2800,6 @@ return 0; } -int SDL_RenderCopy_RGBA8888_RGB888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8); A = (Uint8)pixel; - pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_RGBA8888_RGB888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; @@ -3374,30 +3244,6 @@ return 0; } -int SDL_RenderCopy_RGBA8888_BGR888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8); A = (Uint8)pixel; - pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_RGBA8888_BGR888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; @@ -3842,30 +3688,6 @@ return 0; } -int SDL_RenderCopy_ABGR8888_RGB888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - A = (Uint8)(pixel >> 24); B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; - pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_ABGR8888_RGB888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; @@ -4310,30 +4132,6 @@ return 0; } -int SDL_RenderCopy_ABGR8888_BGR888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - A = (Uint8)(pixel >> 24); B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; - pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_ABGR8888_BGR888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; @@ -4778,30 +4576,6 @@ return 0; } -int SDL_RenderCopy_BGRA8888_RGB888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8); A = (Uint8)pixel; - pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_BGRA8888_RGB888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; @@ -5246,30 +5020,6 @@ return 0; } -int SDL_RenderCopy_BGRA8888_BGR888(SDL_RenderCopyData *data) -{ - const int flags = data->flags; - Uint32 pixel; - Uint32 R, G, B, A; - - while (data->dst_h--) { - Uint32 *src = (Uint32 *)data->src; - Uint32 *dst = (Uint32 *)data->dst; - int n = data->dst_w; - while (n--) { - pixel = *src; - B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8); A = (Uint8)pixel; - pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R; - *dst = pixel; - ++src; - ++dst; - } - data->src += data->src_pitch; - data->dst += data->dst_pitch; - } - return 0; -} - int SDL_RenderCopy_BGRA8888_BGR888_Scale(SDL_RenderCopyData *data) { const int flags = data->flags; diff -r 3863ba81c1d6 -r 7387e0514595 src/video/SDL_rendercopy.h --- a/src/video/SDL_rendercopy.h Mon Aug 28 17:35:15 2006 +0000 +++ b/src/video/SDL_rendercopy.h Tue Aug 29 08:24:16 2006 +0000 @@ -55,7 +55,6 @@ extern int SDLCALL SDL_RenderCopy_RGB888_RGB888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGB888_RGB888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGB888_RGB888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_RGB888_BGR888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGB888_BGR888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGB888_BGR888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGB888_BGR888_Blend_Scale(SDL_RenderCopyData *data); @@ -63,7 +62,6 @@ extern int SDLCALL SDL_RenderCopy_RGB888_BGR888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGB888_BGR888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGB888_BGR888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_BGR888_RGB888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGR888_RGB888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGR888_RGB888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGR888_RGB888_Blend_Scale(SDL_RenderCopyData *data); @@ -78,7 +76,6 @@ extern int SDLCALL SDL_RenderCopy_BGR888_BGR888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGR888_BGR888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGR888_BGR888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_ARGB8888_RGB888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_RGB888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_RGB888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_RGB888_Blend_Scale(SDL_RenderCopyData *data); @@ -86,7 +83,6 @@ extern int SDLCALL SDL_RenderCopy_ARGB8888_RGB888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_RGB888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_RGB888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_ARGB8888_BGR888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_BGR888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_BGR888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_BGR888_Blend_Scale(SDL_RenderCopyData *data); @@ -94,7 +90,6 @@ extern int SDLCALL SDL_RenderCopy_ARGB8888_BGR888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_BGR888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ARGB8888_BGR888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_RGBA8888_RGB888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_RGB888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_RGB888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_RGB888_Blend_Scale(SDL_RenderCopyData *data); @@ -102,7 +97,6 @@ extern int SDLCALL SDL_RenderCopy_RGBA8888_RGB888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_RGB888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_RGB888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_RGBA8888_BGR888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_BGR888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_BGR888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_BGR888_Blend_Scale(SDL_RenderCopyData *data); @@ -110,7 +104,6 @@ extern int SDLCALL SDL_RenderCopy_RGBA8888_BGR888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_BGR888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_RGBA8888_BGR888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_ABGR8888_RGB888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_RGB888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_RGB888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_RGB888_Blend_Scale(SDL_RenderCopyData *data); @@ -118,7 +111,6 @@ extern int SDLCALL SDL_RenderCopy_ABGR8888_RGB888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_RGB888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_RGB888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_ABGR8888_BGR888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_BGR888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_BGR888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_BGR888_Blend_Scale(SDL_RenderCopyData *data); @@ -126,7 +118,6 @@ extern int SDLCALL SDL_RenderCopy_ABGR8888_BGR888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_BGR888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_ABGR8888_BGR888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_BGRA8888_RGB888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGRA8888_RGB888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGRA8888_RGB888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGRA8888_RGB888_Blend_Scale(SDL_RenderCopyData *data); @@ -134,7 +125,6 @@ extern int SDLCALL SDL_RenderCopy_BGRA8888_RGB888_Modulate_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGRA8888_RGB888_Modulate_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGRA8888_RGB888_Modulate_Blend_Scale(SDL_RenderCopyData *data); -extern int SDLCALL SDL_RenderCopy_BGRA8888_BGR888(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGRA8888_BGR888_Scale(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGRA8888_BGR888_Blend(SDL_RenderCopyData *data); extern int SDLCALL SDL_RenderCopy_BGRA8888_BGR888_Blend_Scale(SDL_RenderCopyData *data); diff -r 3863ba81c1d6 -r 7387e0514595 src/video/SDL_renderer_sw.c --- a/src/video/SDL_renderer_sw.c Mon Aug 28 17:35:15 2006 +0000 +++ b/src/video/SDL_renderer_sw.c Tue Aug 29 08:24:16 2006 +0000 @@ -421,9 +421,18 @@ SW_RenderData *data = (SW_RenderData *) renderer->driverdata; SDL_Surface *surface = (SDL_Surface *) texture->driverdata; - surface->userdata = - SDL_GetRenderCopyFunc(texture->format, data->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, data->format, + texture->modMode, texture->blendMode, + texture->scaleMode); + } else { + surface->userdata = NULL; + } } static int diff -r 3863ba81c1d6 -r 7387e0514595 src/video/dummy/SDL_nullrender.c --- 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 diff -r 3863ba81c1d6 -r 7387e0514595 src/video/sdlgenblit.pl --- a/src/video/sdlgenblit.pl Mon Aug 28 17:35:15 2006 +0000 +++ b/src/video/sdlgenblit.pl Tue Aug 29 08:24:16 2006 +0000 @@ -398,7 +398,7 @@ for (my $modulate = 0; $modulate <= 1; ++$modulate) { for (my $blend = 0; $blend <= 1; ++$blend) { for (my $scale = 0; $scale <= 1; ++$scale) { - if ( $modulate != 0 || $blend != 0 || $scale != 0 || $src ne $dst ) { + if ( $modulate || $blend || $scale ) { output_copyfuncname("extern int SDLCALL", $src, $dst, $modulate, $blend, $scale, 1, ";\n"); } } @@ -434,7 +434,7 @@ for (my $modulate = 0; $modulate <= 1; ++$modulate) { for (my $blend = 0; $blend <= 1; ++$blend) { for (my $scale = 0; $scale <= 1; ++$scale) { - if ( $modulate != 0 || $blend != 0 || $scale != 0 || $src ne $dst ) { + if ( $modulate || $blend || $scale ) { print FILE " { SDL_PIXELFORMAT_$src, SDL_PIXELFORMAT_$dst, "; if ( $modulate ) { print FILE "(SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), "; @@ -497,7 +497,7 @@ for (my $modulate = 0; $modulate <= 1; ++$modulate) { for (my $blend = 0; $blend <= 1; ++$blend) { for (my $scale = 0; $scale <= 1; ++$scale) { - if ( $modulate != 0 || $blend != 0 || $scale != 0 || $src ne $dst ) { + if ( $modulate || $blend || $scale ) { output_copyfunc($src, $dst, $modulate, $blend, $scale); } }