Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/modules/engines/software_16


Modified Files:
        evas_soft16_main.c 


Log Message:
Improve _soft16_scanline_fill_transp_solid(), with bugfix.


Author: Gustavo Sverzut Barbieri <[EMAIL PROTECTED]>

===================================================================
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_soft16_main.c  18 Jun 2007 16:50:37 -0000      1.3
+++ evas_soft16_main.c  19 Jun 2007 22:51:39 -0000      1.4
@@ -1106,33 +1106,32 @@
 static inline void
 _soft16_scanline_fill_transp_solid(DATA16 *dst, int size, DATA32 
rgb565_unpack, char alpha)
 {
-    DATA16 *start, *end;
-    DATA32 a;
+   DATA16 *start, *end;
+   DATA32 a;
 
-    start = dst;
-    pld(start, 0);
-    end = start + (size & ~7);
+   start = dst;
+   pld(start, 0);
+   end = start + (size & ~7);
 
-    while (start < end) {
-      pld(start, 32);
-      UNROLL8({
-        DATA32 b;
-        b = RGB_565_UNPACK(*start);
-        b = RGB_565_UNPACKED_BLEND(rgb565_unpack, b, alpha);
-        *start = RGB_565_PACK(b);
-        start++;
-      });
-    }
+#define BLEND(dst)                                                      \
+    { DATA32 b;                                                         \
+      b = RGB_565_UNPACK(dst);                                          \
+      b = RGB_565_UNPACKED_BLEND(rgb565_unpack, b, alpha);              \
+      dst = RGB_565_PACK(b); }
 
-    size &= 7;
+   while (start < end)
+      {
+        pld(start, 32);
+        UNROLL8({
+           BLEND(*start);
+           start++;
+        });
+      }
 
-    while (size--) {
-      DATA32 b;
-      b = RGB_565_UNPACK(*start);
-      b = RGB_565_UNPACKED_BLEND(rgb565_unpack, b, alpha);
-      *start = RGB_565_PACK(b);
-      start++;
-    }
+   end = start + (size & 7);
+   for (; start < end; start++)
+      BLEND(*start);
+#undef BLEND
 }
 
 /***********************************************************************



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to