Evas: Fix SW rendering COPY function with mask
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 10 Nov 2014 07:48:38 +0000 (16:48 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 12 Nov 2014 08:02:20 +0000 (17:02 +0900)
This does not fix any known bug as there is no known path using this
function.

src/lib/evas/common/evas_op_copy/op_copy_mask_color_.c

index efe7cca..3cbecbe 100644 (file)
@@ -3,20 +3,21 @@
 static void
 _op_copy_mas_c_dp(DATA32 *s EINA_UNUSED, DATA8 *m, DATA32 c, DATA32 *d, int l) {
    DATA32 *e;
-   int color;
+   int alpha;
    UNROLL8_PLD_WHILE(d, l, e,
                      {
-                        color = *m;
-                        switch(color)
+                        alpha = *m;
+                        switch(alpha)
                           {
                           case 0:
+                             *d = 0;
                              break;
                           case 255:
                              *d = c;
                              break;
                           default:
-                             color++;
-                             *d = INTERP_256(color, c, *d);
+                             alpha++;
+                             *d = MUL_256(alpha, c);
                              break;
                           }
                         m++;  d++;