Fixed rendering bug for source alpha == 0 in OVER fastpath functions
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>
Tue, 5 May 2009 12:25:43 +0000 (15:25 +0300)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Thu, 7 May 2009 01:15:40 +0000 (21:15 -0400)
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 <sandmann@redhat.com>
pixman/pixman-pict.c

index 1aef166..548d38d 100644 (file)
@@ -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;