aboutsummaryrefslogtreecommitdiff
path: root/pixman/pixman/pixman-combine.c.template
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/pixman/pixman-combine.c.template')
-rw-r--r--pixman/pixman/pixman-combine.c.template22
1 files changed, 8 insertions, 14 deletions
diff --git a/pixman/pixman/pixman-combine.c.template b/pixman/pixman/pixman-combine.c.template
index 4a0e2bd06..c129980a8 100644
--- a/pixman/pixman/pixman-combine.c.template
+++ b/pixman/pixman/pixman-combine.c.template
@@ -78,7 +78,6 @@ combine_mask_alpha_ca (const comp4_t *src, comp4_t *mask)
if (a == ~0)
{
- x = x >> A_SHIFT;
x |= x << G_SHIFT;
x |= x << R_SHIFT;
*(mask) = x;
@@ -1610,17 +1609,14 @@ combine_over_ca (pixman_implementation_t *imp,
combine_mask_ca (&s, &m);
a = ~m;
- if (a != ~0)
+ if (a)
{
- if (a)
- {
- comp4_t d = *(dest + i);
- UNcx4_MUL_UNcx4_ADD_UNcx4 (d, a, s);
- s = d;
- }
-
- *(dest + i) = s;
+ comp4_t d = *(dest + i);
+ UNcx4_MUL_UNcx4_ADD_UNcx4 (d, a, s);
+ s = d;
}
+
+ *(dest + i) = s;
}
}
@@ -1644,10 +1640,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;
}