SDL: don't take note of a color in the optimizer if the pixel is strictly transparent
authorTim Goya <tuxdev103@gmail.com>
Fri, 24 Aug 2007 18:43:08 +0000 (18:43 +0000)
committerTim Goya <tuxdev103@gmail.com>
Fri, 24 Aug 2007 18:43:08 +0000 (18:43 +0000)
SVN-Revision: 5156

src/video/sdl_texture.cpp

index b5b6dc6..2164550 100644 (file)
@@ -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))