From: Søren Sandmann Pedersen Date: Fri, 7 Aug 2009 14:54:16 +0000 (-0400) Subject: Fix bug in vmx_combine_xor_ca() X-Git-Tag: pixman-0.15.20~1^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=27fb8378fdae930475cf4528c539a78bfbd751c5;p=platform%2Fupstream%2Fpixman.git Fix bug in vmx_combine_xor_ca() The destination needs to be inverted before the alpha channel is extracted; otherwise, the RGB channels of da will be 0xff. --- diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c index 7d947d1..5978a07 100644 --- a/pixman/pixman-vmx.c +++ b/pixman/pixman-vmx.c @@ -1542,11 +1542,11 @@ vmx_combine_xor_ca (pixman_implementation_t *imp, uint32_t s = src[i]; uint32_t d = dest[i]; uint32_t sa = ALPHA_8 (s); - uint32_t da = ALPHA_8 (d); + uint32_t da = ALPHA_8 (~d); UN8x4_MUL_UN8x4 (s, a); UN8x4_MUL_UN8 (a, sa); - UN8x4_MUL_UN8x4_ADD_UN8x4_MUL_UN8 (d, ~a, s, ~da); + UN8x4_MUL_UN8x4_ADD_UN8x4_MUL_UN8 (d, ~a, s, da); dest[i] = d; } }