From 62af131a5a7222c58ed9aac38b7dddb75c0e87f7 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Tue, 5 May 2009 15:25:43 +0300 Subject: [PATCH] Fixed rendering bug for source alpha == 0 in OVER fastpath functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Handling of the case when source alpha is zero was keeping destination pixel unmodified. But this is different from how generic path behaves. For example fbOver(0x00200483, 0x9CAC7E9F) == 0x9CCC82FF and the destination pixel changes from 0x9CAC7E9F to 0x9CCC82FF in spite of having zero alpha. Signed-off-by: Søren Sandmann Pedersen --- pixman/pixman-pict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pixman/pixman-pict.c b/pixman/pixman-pict.c index 1aef166..548d38d 100644 --- a/pixman/pixman-pict.c +++ b/pixman/pixman-pict.c @@ -653,7 +653,7 @@ fbCompositeSrc_8888x8888 (pixman_op_t op, a = s >> 24; if (a == 0xff) WRITE(pDst, dst, s & dstMask); - else if (a) + else if (s) WRITE(pDst, dst, fbOver (s, READ(pDst, dst)) & dstMask); dst++; } @@ -745,7 +745,7 @@ fbCompositeSrc_8888x0565 (pixman_op_t op, { s = READ(pSrc, src++); a = s >> 24; - if (a) + if (s) { if (a == 0xff) d = s; -- 2.7.4