Fix bugs in combine_over_reverse_ca().
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Wed, 5 Aug 2009 20:17:52 +0000 (16:17 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Sat, 8 Aug 2009 22:50:17 +0000 (18:50 -0400)
The computation cannot be optimized away when alpha is 0 because that
can happen when the source has alpha zero and rgb non-zero.

pixman/pixman-combine.c.template

index 4a0e2bd..59ea1e1 100644 (file)
@@ -1644,10 +1644,8 @@ combine_over_reverse_ca (pixman_implementation_t *imp,
            comp4_t s = *(src + i);
            comp4_t m = *(mask + i);
 
-           combine_mask_value_ca (&s, &m);
-
-           if (a != MASK)
-               UNcx4_MUL_UNc_ADD_UNcx4 (s, a, d);
+           UNcx4_MUL_UNcx4 (s, m);
+           UNcx4_MUL_UNc_ADD_UNcx4 (s, a, d);
 
            *(dest + i) = s;
        }