fix c fallback rendering - mask op was wrong. mmx was right. why is
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 26 May 2011 02:44:01 +0000 (02:44 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 26 May 2011 02:44:01 +0000 (02:44 +0000)
the neon code sitting there.. with no neon? just c? if so.. just kill
the neon code and let c fallbacks take care of it as all we do is dup
code. either that or actually implement the neon.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@59686 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c
src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c

index 2f13241..a9d0f4b 100644 (file)
@@ -27,12 +27,12 @@ _op_blend_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
 }
 
 static void
-_op_blend_pas_mas_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
+_op_blend_pas_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
    DATA32 *e;
    int alpha;
    UNROLL8_PLD_WHILE(d, l, e,
                      {
-                        alpha = (*s >> 24);
+                        alpha = *m;
                         switch(alpha)
                           {
                           case 0:
@@ -41,11 +41,11 @@ _op_blend_pas_mas_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l)
                              *d = *s;
                              break;
                           default:
-                             c = MUL_SYM(alpha, *s);
-                             alpha = 256 - (c >> 24);
-                             *d = c + MUL_256(alpha, *d);
+                             alpha++;
+                             *d = INTERP_256(alpha, *s, *d);
                              break;
                           }
+                        m++;  s++;  d++;
                      });
 }
 
index 76025ad..b252a67 100644 (file)
@@ -6,22 +6,22 @@ _op_blend_pas_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, i
    DATA32 *e;
    int alpha;
    UNROLL8_PLD_WHILE(d, l, e,
-                     {
-                        alpha = (*s >> 24);
-                        switch(alpha)
-                          {
+                    {
+                       alpha = *m;
+                       switch(alpha)
+                         {
                           case 0:
-                             break;
+                            break;
                           case 255:
-                             *d = *s;
-                             break;
+                            *d = *s;
+                            break;
                           default:
-                             c = MUL_SYM(alpha, *s);
-                             alpha = 256 - (c >> 24);
-                             *d = c + MUL_256(alpha, *d);
-                             break;
-                          }
-                     });
+                            alpha++;
+                            *d = INTERP_256(alpha, *s, *d);
+                            break;
+                         }
+                       m++;  s++;  d++;
+                    });
 }
 
 static void