and fix some over-zealous optimising.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 18 Feb 2010 08:51:00 +0000 (08:51 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 18 Feb 2010 08:51:00 +0000 (08:51 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@46269 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/engines/gl_common/evas_gl_context.c

index b15cb27..d305e5c 100644 (file)
@@ -934,11 +934,20 @@ evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
 
    if (!tex->alpha) blend = 0;
    if (a < 255) blend = 1;
+   if ((A_VAL(&(p[0].col)) < 0xff) || (A_VAL(&(p[1].col)) < 0xff) ||
+       (A_VAL(&(p[2].col)) < 0xff) || (A_VAL(&(p[3].col)) < 0xff))
+     blend = 1;
    
    if (tex_only)
      {
         if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
-          prog = gc->shared->shader.tex_nomul.prog;
+          {
+             if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
+                 (p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
+               prog = gc->shared->shader.tex_nomul.prog;
+             else
+               prog = gc->shared->shader.tex.prog;
+          }
         else
           prog = gc->shared->shader.tex.prog;
      }
@@ -947,14 +956,26 @@ evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
         if (tex->gc->shared->info.bgra)
           {
              if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
-               prog = gc->shared->shader.img_bgra_nomul.prog;
+               {
+                  if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
+                      (p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
+                    prog = gc->shared->shader.img_bgra_nomul.prog;
+                  else
+                    prog = gc->shared->shader.img_bgra.prog;
+               }
              else
                prog = gc->shared->shader.img_bgra.prog;
           }
         else
           {
              if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
-               prog = gc->shared->shader.img_nomul.prog;
+               {
+                  if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
+                      (p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
+                    prog = gc->shared->shader.img_nomul.prog;
+                  else
+                    prog = gc->shared->shader.img.prog;
+               }
              else
                prog = gc->shared->shader.img.prog;
           }