Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/engines/common


Modified Files:
        evas_blend_alpha_color_pixel.c evas_blend_color_pixel.c 
        evas_blend_ops.h evas_blend_pixel_cmod_pixel.c 
        evas_blend_pixel_mul_pixel.c evas_blend_pixel_pixel.c 
        evas_line_main.c 


Log Message:


jose's evas patches are in.

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_blend_alpha_color_pixel.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_blend_alpha_color_pixel.c      18 Mar 2004 09:06:11 -0000      1.5
+++ evas_blend_alpha_color_pixel.c      6 Apr 2004 03:36:51 -0000       1.6
@@ -147,12 +147,10 @@
    while (dst_ptr < dst_end_ptr)
      {
        DATA32 tmp;
-       DATA8  a;
-       DATA8 aa;
+       DATA8  a, aa;
        
        aa = (((*src_ptr) + 1) * A_VAL(&col)) >> 8;
-       a = _evas_pow_lut[aa][A_VAL(dst_ptr)];
-        switch (a)
+        switch (aa)
          {
           case 0:
             break;
@@ -160,6 +158,10 @@
             *dst_ptr = col;
             break;
           default:
+            a = _evas_pow_lut[aa][A_VAL(dst_ptr)];
+            BLEND_COLOR(aa, A_VAL(dst_ptr), 
+                      255, A_VAL(dst_ptr), 
+                      tmp);
             BLEND_COLOR(a, R_VAL(dst_ptr), 
                         R_VAL(&col), R_VAL(dst_ptr), 
                         tmp);
@@ -169,7 +171,6 @@
             BLEND_COLOR(a, B_VAL(dst_ptr), 
                         B_VAL(&col), B_VAL(dst_ptr), 
                         tmp);
-            A_VAL(dst_ptr) = A_VAL(dst_ptr) + ((aa * (255 - A_VAL(dst_ptr))) / 255);
             break;
          }
        src_ptr++;
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_blend_color_pixel.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_blend_color_pixel.c    18 Mar 2004 09:06:12 -0000      1.5
+++ evas_blend_color_pixel.c    6 Apr 2004 03:36:51 -0000       1.6
@@ -96,6 +96,9 @@
        
        a = _evas_pow_lut[A_VAL(&src)][A_VAL(dst_ptr)];
        
+       BLEND_COLOR(A_VAL(&src), A_VAL(dst_ptr), 
+                   255, A_VAL(dst_ptr), 
+                   tmp);
        BLEND_COLOR(a, R_VAL(dst_ptr), 
                    R_VAL(&src), R_VAL(dst_ptr), 
                    tmp);
@@ -105,7 +108,6 @@
        BLEND_COLOR(a, B_VAL(dst_ptr), 
                    B_VAL(&src), B_VAL(dst_ptr), 
                    tmp);       
-       A_VAL(dst_ptr) = A_VAL(dst_ptr) + ((A_VAL(&src) * (255 - A_VAL(dst_ptr))) / 
255);
        
        dst_ptr++;
      }
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_blend_ops.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_blend_ops.h    30 Jan 2004 05:46:57 -0000      1.1
+++ evas_blend_ops.h    6 Apr 2004 03:36:51 -0000       1.2
@@ -9,6 +9,9 @@
    if (A_VAL(src)) /* hmmm - do we need this? */ \
      { \
        __a = _evas_pow_lut[A_VAL(src)][A_VAL(dst)]; \
+       BLEND_COLOR(A_VAL(src), A_VAL(dst), \
+                   255, A_VAL(dst), \
+                   __tmp); \
        BLEND_COLOR(__a, R_VAL(dst), \
                    R_VAL(src), R_VAL(dst), \
                    __tmp); \
@@ -18,7 +21,6 @@
        BLEND_COLOR(__a, B_VAL(dst), \
                    B_VAL(src), B_VAL(dst), \
                    __tmp); \
-       A_VAL(dst) = A_VAL(dst) + ((A_VAL(src) * (255 - A_VAL(dst))) / 255);\
      } \
 }
 
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_blend_pixel_cmod_pixel.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_blend_pixel_cmod_pixel.c       16 Mar 2004 08:03:00 -0000      1.4
+++ evas_blend_pixel_cmod_pixel.c       6 Apr 2004 03:36:51 -0000       1.5
@@ -27,7 +27,10 @@
           case 0:
             break;
           case 255:
-            *dst_ptr = *src_ptr;
+            A_VAL(dst_ptr) = 0xff;
+            R_VAL(dst_ptr) = rmod[R_VAL(src_ptr)];
+            G_VAL(dst_ptr) = gmod[G_VAL(src_ptr)];
+            B_VAL(dst_ptr) = bmod[B_VAL(src_ptr)];
             break;
           default:
             BLEND_COLOR(a, R_VAL(dst_ptr), 
@@ -60,17 +63,23 @@
    while (dst_ptr < dst_end_ptr)
      {
        DATA32 tmp;
-       DATA8  a;
-       
-       a = _evas_pow_lut[amod[A_VAL(src_ptr)]][A_VAL(dst_ptr)];
-       switch (a)
+       DATA8  a, aa;
+
+       aa = amod[A_VAL(src_ptr)];      
+       switch (aa)
          {
           case 0:
             break;
           case 255:
-            *dst_ptr = *src_ptr;
+            A_VAL(dst_ptr) = 0xff;
+            R_VAL(dst_ptr) = rmod[R_VAL(src_ptr)];
+            G_VAL(dst_ptr) = gmod[G_VAL(src_ptr)];
+            B_VAL(dst_ptr) = bmod[B_VAL(src_ptr)];
             break;
           default:
+            a = _evas_pow_lut[aa][A_VAL(dst_ptr)];
+            BLEND_COLOR(aa,A_VAL(dst_ptr),
+                      255,A_VAL(dst_ptr),tmp);
             BLEND_COLOR(a, R_VAL(dst_ptr), 
                         rmod[R_VAL(src_ptr)], R_VAL(dst_ptr), 
                         tmp);
@@ -80,8 +89,6 @@
             BLEND_COLOR(a, B_VAL(dst_ptr), 
                         bmod[B_VAL(src_ptr)], B_VAL(dst_ptr), 
                         tmp);  
-            BLEND_COLOR(A_VAL(src),A_VAL(dst),255,A_VAL(dst),tmp);
-/*          A_VAL(dst_ptr) = A_VAL(dst_ptr) + ((amod[A_VAL(src_ptr)] * (255 - 
A_VAL(dst_ptr))) / 255);*/
             break;
          }
        src_ptr++;
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_blend_pixel_mul_pixel.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_blend_pixel_mul_pixel.c        18 Mar 2004 09:06:12 -0000      1.5
+++ evas_blend_pixel_mul_pixel.c        6 Apr 2004 03:36:51 -0000       1.6
@@ -202,6 +202,9 @@
                default:
                  a = _evas_pow_lut[aa][A_VAL(dst_ptr)];
                  
+                 BLEND_COLOR(aa, A_VAL(dst_ptr),
+                               255, A_VAL(dst_ptr),
+                               tmp);
                  BLEND_COLOR(a, R_VAL(dst_ptr), 
                              R_VAL(src_ptr), R_VAL(dst_ptr), 
                              tmp);
@@ -211,7 +214,6 @@
                  BLEND_COLOR(a, B_VAL(dst_ptr), 
                              B_VAL(src_ptr), B_VAL(dst_ptr), 
                              tmp);
-                 A_VAL(dst_ptr) = A_VAL(dst_ptr) + ((aa * (255 - A_VAL(dst_ptr))) / 
255);
                  break;
               }
             src_ptr++;
@@ -231,14 +233,17 @@
                case 0:
                  break;
                case 255:
+                 A_VAL(dst_ptr) = 255;
                  R_VAL(dst_ptr) = ((R_VAL(src_ptr) * (R_VAL(&mul_color) + 1)) >> 8);
                  G_VAL(dst_ptr) = ((G_VAL(src_ptr) * (G_VAL(&mul_color) + 1)) >> 8);
                  B_VAL(dst_ptr) = ((B_VAL(src_ptr) * (B_VAL(&mul_color) + 1)) >> 8);
-                 A_VAL(dst_ptr) = 255;
                  break;
                default:
                  a = _evas_pow_lut[aa][A_VAL(dst_ptr)];
                  
+                 BLEND_COLOR(aa, A_VAL(dst_ptr),
+                               255, A_VAL(dst_ptr),
+                               tmp);
                  BLEND_COLOR(a, R_VAL(dst_ptr), 
                              ((R_VAL(src_ptr) * (R_VAL(&mul_color) + 1)) >> 8), 
R_VAL(dst_ptr), 
                              tmp);
@@ -248,7 +253,6 @@
                  BLEND_COLOR(a, B_VAL(dst_ptr), 
                              ((B_VAL(src_ptr) * (B_VAL(&mul_color) + 1)) >> 8), 
B_VAL(dst_ptr), 
                              tmp);
-                 A_VAL(dst_ptr) = A_VAL(dst_ptr) + ((aa * (255 - A_VAL(dst_ptr))) / 
255);
                  break;
               }
             src_ptr++;
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_blend_pixel_pixel.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_blend_pixel_pixel.c    18 Mar 2004 09:06:12 -0000      1.8
+++ evas_blend_pixel_pixel.c    6 Apr 2004 03:36:51 -0000       1.9
@@ -4,8 +4,6 @@
 #include "evas_mmx.h"
 #endif
 
-#define CONDITIONAL_BLEND 1
-
 extern DATA8        _evas_pow_lut[256][256];
 extern const DATA16 _evas_const_c1[4];
 
@@ -22,9 +20,11 @@
    while (dst_ptr < dst_end_ptr)
      {
        DATA32 tmp;
+       DATA8  a;
+       
+       a = A_VAL(src_ptr);
 
-#ifdef CONDITIONAL_BLEND
-       switch (A_VAL(src_ptr))
+       switch (a)
          {
           case 0:
             break;
@@ -32,31 +32,17 @@
             *dst_ptr = *src_ptr;
             break;
           default:
-            BLEND_COLOR(A_VAL(src_ptr), R_VAL(dst_ptr), 
+            BLEND_COLOR(a, R_VAL(dst_ptr), 
                         R_VAL(src_ptr), R_VAL(dst_ptr), 
                         tmp);
-            BLEND_COLOR(A_VAL(src_ptr), G_VAL(dst_ptr), 
+            BLEND_COLOR(a, G_VAL(dst_ptr), 
                         G_VAL(src_ptr), G_VAL(dst_ptr), 
                         tmp);
-            BLEND_COLOR(A_VAL(src_ptr), B_VAL(dst_ptr), 
+            BLEND_COLOR(a, B_VAL(dst_ptr), 
                         B_VAL(src_ptr), B_VAL(dst_ptr), 
                         tmp);
             break;
          }
-#else
-       if (A_VAL(src_ptr))
-         {
-            BLEND_COLOR(A_VAL(src_ptr), R_VAL(dst_ptr), 
-                        R_VAL(src_ptr), R_VAL(dst_ptr), 
-                        tmp);
-            BLEND_COLOR(A_VAL(src_ptr), G_VAL(dst_ptr), 
-                        G_VAL(src_ptr), G_VAL(dst_ptr), 
-                        tmp);
-            BLEND_COLOR(A_VAL(src_ptr), B_VAL(dst_ptr), 
-                        B_VAL(src_ptr), B_VAL(dst_ptr), 
-                        tmp);
-         }
-#endif        
        src_ptr++;
        dst_ptr++;
      }
@@ -128,9 +114,10 @@
    while (dst_ptr < dst_end_ptr)
      {
        DATA32 tmp;
-       DATA8  a;
+       DATA8  a, aa;
        
-       switch (A_VAL(src_ptr))
+       aa = A_VAL(src_ptr);
+       switch (aa)
          {
           case 0:
             break;
@@ -138,8 +125,11 @@
             *dst_ptr = *src_ptr;
             break;
           default:
-            a = _evas_pow_lut[A_VAL(src_ptr)][A_VAL(dst_ptr)];
+            a = _evas_pow_lut[aa][A_VAL(dst_ptr)];
             
+            BLEND_COLOR(aa, A_VAL(dst_ptr), 
+                        255, A_VAL(dst_ptr), 
+                        tmp);
             BLEND_COLOR(a, R_VAL(dst_ptr), 
                         R_VAL(src_ptr), R_VAL(dst_ptr), 
                         tmp);
@@ -149,7 +139,6 @@
             BLEND_COLOR(a, B_VAL(dst_ptr), 
                         B_VAL(src_ptr), B_VAL(dst_ptr), 
                         tmp);  
-            A_VAL(dst_ptr) = A_VAL(dst_ptr) + ((A_VAL(src_ptr) * (255 - 
A_VAL(dst_ptr))) / 255);
          }
        src_ptr++;
        dst_ptr++;
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_line_main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_line_main.c    18 Mar 2004 09:22:36 -0000      1.5
+++ evas_line_main.c    6 Apr 2004 03:36:51 -0000       1.6
@@ -31,6 +31,8 @@
    sx = SGN(dx);
    sy = SGN(dy);
    
+   col = dc->col.col;
+
    if ((dx == 0) && (dy == 0))
      {
        if ((x1 < 0) ||
@@ -54,6 +56,9 @@
             ptr = dst->image->data + (y1 * dst->image->w) + x1;
             __blend_a = _evas_pow_lut[A_VAL(&(col))][A_VAL(ptr)]; 
             
+            BLEND_COLOR(A_VAL(&(col)), A_VAL(ptr), 
+                        255, A_VAL(ptr), 
+                        __blend_tmp);                 
             BLEND_COLOR(__blend_a, R_VAL(ptr), 
                         R_VAL(&(col)), R_VAL(ptr), 
                         __blend_tmp);                 
@@ -63,7 +68,6 @@
             BLEND_COLOR(__blend_a, B_VAL(ptr), 
                         B_VAL(&(col)), B_VAL(ptr), 
                         __blend_tmp);                 
-            A_VAL(ptr) = A_VAL(ptr) + ((A_VAL(&(col)) * (255 - A_VAL(ptr))) / 255);
          }
        else
          {
@@ -86,8 +90,6 @@
    im = dst->image->data;
    im_w = dst->image->w;
    im_h = dst->image->h;   
-   col = dc->col.col;
-   if (!A_VAL(&(col))) return;
 
    ext_x = 0; ext_y = 0; ext_w = im_w; ext_h = im_h;
    if (dc->clip.use)
@@ -146,6 +148,9 @@
                            
                            __blend_a = _evas_pow_lut[A_VAL(&(col))][A_VAL(ptr)]; 
                            
+                           BLEND_COLOR(A_VAL(&(col)), A_VAL(ptr), 
+                                       255, A_VAL(ptr), 
+                                       __blend_tmp);                 
                            BLEND_COLOR(__blend_a, R_VAL(ptr), 
                                        R_VAL(&(col)), R_VAL(ptr), 
                                        __blend_tmp);                 
@@ -155,7 +160,6 @@
                            BLEND_COLOR(__blend_a, B_VAL(ptr), 
                                        B_VAL(&(col)), B_VAL(ptr), 
                                        __blend_tmp);                 
-                           A_VAL(ptr) = A_VAL(ptr) + ((A_VAL(&(col)) * (255 - 
A_VAL(ptr))) / 255);
                         }
                    }
                  if (x == x2) return;
@@ -183,6 +187,9 @@
                            
                            __blend_a = _evas_pow_lut[A_VAL(&(col))][A_VAL(ptr)]; 
                            
+                           BLEND_COLOR(A_VAL(&(col)), A_VAL(ptr), 
+                                       255, A_VAL(ptr), 
+                                       __blend_tmp);                 
                            BLEND_COLOR(__blend_a, R_VAL(ptr), 
                                        R_VAL(&(col)), R_VAL(ptr), 
                                        __blend_tmp);
@@ -192,7 +199,6 @@
                            BLEND_COLOR(__blend_a, B_VAL(ptr), 
                                        B_VAL(&(col)), B_VAL(ptr), 
                                        __blend_tmp);
-                           A_VAL(ptr) = A_VAL(ptr) + ((A_VAL(&(col)) * (255 - 
A_VAL(ptr))) / 255);
                         }
                    }
                  if (y == y2) return;




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to