[PATCH] Fix for bug 17477.

Søren Sandmann Pedersen sandmann at daimi.au.dk
Tue Sep 9 07:49:56 PDT 2008


over_2x128 was changing the alphaLo and alphaHi arguments, causing
stripes.
---
 pixman/pixman-sse2.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index 8a3e4b5..cc08189 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -244,9 +244,11 @@ invertColors_2x128 (__m128i dataLo, __m128i dataHi, __m128i* invLo, __m128i* inv
 static inline void
 over_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaLo, __m128i* alphaHi, __m128i* dstLo, __m128i* dstHi)
 {
-    negate_2x128 (*alphaLo, *alphaHi, alphaLo, alphaHi);
+    __m128i t1, t2;
 
-    pixMultiply_2x128 (dstLo, dstHi, alphaLo, alphaHi, dstLo, dstHi);
+    negate_2x128 (*alphaLo, *alphaHi, &t1, &t2);
+
+    pixMultiply_2x128 (dstLo, dstHi, &t1, &t2, dstLo, dstHi);
 
     *dstLo = _mm_adds_epu8 (*srcLo, *dstLo);
     *dstHi = _mm_adds_epu8 (*srcHi, *dstHi);
-- 
1.6.0.1


--=-=-=--


More information about the cairo mailing list