diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-09-19 12:04:11 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-09-22 23:41:19 -0400 |
commit | 2ab77c97a5a3a816d6383bdc3b6c8bdceb0383b7 (patch) | |
tree | e0c4c37b8a25b0f37cb4cd8f4ad600c6ceec3856 | |
parent | c4b69e706e63e01fbc70e0026c2079007c89de14 (diff) | |
download | pixman-2ab77c97a5a3a816d6383bdc3b6c8bdceb0383b7.tar.gz |
Fix bugs in component alpha combiners for separable PDF operators
In general, the component alpha version of an operator is supposed to
do this:
- multiply source with mask in all channels
- multiply mask with source alpha in all channels
- compute the regular operator in all channels using the
mask value whenever source alpha is called for
The first two steps are usually accomplished with the function
combine_mask_ca(), but for operators where source alpha is not used,
such as SRC, ADD and OUT, the simpler function
combine_mask_value_ca(), which doesn't compute the new mask values,
can be used.
However, the PDF blend modes generally *do* make use of source alpha,
so they can't use combine_mask_value_ca() as they do now. They have to
use combine_mask_ca().
This patch fixes this in combine_multiply_ca() and the CA combiners
generated by PDF_SEPARABLE_BLEND_MODE.
-rw-r--r-- | pixman/pixman-combine.c.template | 4 | ||||
-rw-r--r-- | test/blitters-test.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pixman/pixman-combine.c.template b/pixman/pixman-combine.c.template index cd008d9..50d2b0a 100644 --- a/pixman/pixman-combine.c.template +++ b/pixman/pixman-combine.c.template @@ -489,7 +489,7 @@ combine_multiply_ca (pixman_implementation_t *imp, comp4_t r = d; comp4_t dest_ia = ALPHA_c (~d); - combine_mask_value_ca (&s, &m); + combine_mask_ca (&s, &m); UNcx4_MUL_UNcx4_ADD_UNcx4_MUL_UNc (r, ~m, s, dest_ia); UNcx4_MUL_UNcx4 (d, s); @@ -546,7 +546,7 @@ combine_multiply_ca (pixman_implementation_t *imp, comp1_t ida = ~da; \ comp4_t result; \ \ - combine_mask_value_ca (&s, &m); \ + combine_mask_ca (&s, &m); \ \ result = d; \ UNcx4_MUL_UNcx4_ADD_UNcx4_MUL_UNc (result, ~m, s, ida); \ diff --git a/test/blitters-test.c b/test/blitters-test.c index 6a3cc86..8c46cef 100644 --- a/test/blitters-test.c +++ b/test/blitters-test.c @@ -395,6 +395,6 @@ main (int argc, const char *argv[]) } return fuzzer_test_main("blitters", 2000000, - 0xA364B5BF, + 0x3E1DD2E8, test_composite, argc, argv); } |