From f50d272e41f0f8354f5006dfaddc5e3587ca0b7d Mon Sep 17 00:00:00 2001 From: Tim Goya Date: Fri, 24 Aug 2007 18:43:08 +0000 Subject: [PATCH] SDL: don't take note of a color in the optimizer if the pixel is strictly transparent SVN-Revision: 5156 --- src/video/sdl_texture.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/sdl_texture.cpp b/src/video/sdl_texture.cpp index b5b6dc689..21645507e 100644 --- a/src/video/sdl_texture.cpp +++ b/src/video/sdl_texture.cpp @@ -483,7 +483,10 @@ namespace semitransparent++; squaredalphasum += alpha * alpha; } - colors[((red & 0xf0) << 4) | (green & 0xf0) | ((blue & 0xf0) >> 4)] = true; + if(alpha != 0) + { + colors[((red & 0xf0) << 4) | (green & 0xf0) | ((blue & 0xf0) >> 4)] = true; + } } } if(SDL_MUSTLOCK(src)) -- 2.11.0