[cairo-commit] pixman/src

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Tue Feb 6 13:39:36 PST 2007


 pixman/src/fbmmx.c |   54 +++++++++++++----------------------------------------
 1 files changed, 14 insertions(+), 40 deletions(-)

New commits:
diff-tree 9d3f537423b3cc0cb6a4b2607e9307c1eef9e074 (from a8f8efb750fd3a8857c7f519b8645e578f75442b)
Author: Soren Sandmann Pedersen <ssp at dhcp83-218.boston.redhat.com>
Date:   Tue Feb 6 16:27:42 2007 -0500

    Remove left-over assert and some alpha checks from
    fbCompositeSrc_8888x0565mmx(). Bug 9893.

diff --git a/pixman/src/fbmmx.c b/pixman/src/fbmmx.c
index 93e7d50..387d4b4 100644
--- a/pixman/src/fbmmx.c
+++ b/pixman/src/fbmmx.c
@@ -1472,8 +1472,6 @@ fbCompositeSrc_8888x0565mmx (pixman_oper
     fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
     fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
 
-    assert (pSrc->pDrawable == pMask->pDrawable);
-
     while (height--)
     {
 	dst = dstLine;
@@ -1502,46 +1500,22 @@ fbCompositeSrc_8888x0565mmx (pixman_oper
 
 	while (w >= 4)
 	{
-	    CARD32 s0, s1, s2, s3;
-	    unsigned char a0, a1, a2, a3;
 	    __m64 vsrc0, vsrc1, vsrc2, vsrc3;
+	    __m64 vdest;
 
-	    s0 = *src;
-	    s1 = *(src + 1);
-	    s2 = *(src + 2);
-	    s3 = *(src + 3);
-
-	    a0 = (s0 >> 24);
-	    a1 = (s1 >> 24);
-	    a2 = (s2 >> 24);
-	    a3 = (s3 >> 24);
-
-	    vsrc0 = load8888(s0);
-	    vsrc1 = load8888(s1);
-	    vsrc2 = load8888(s2);
-	    vsrc3 = load8888(s3);
-
-	    if ((a0 & a1 & a2 & a3) == 0xFF)
-	    {
-		__m64 vdest;
-		vdest = pack565(vsrc0, _mm_setzero_si64(), 0);
-		vdest = pack565(vsrc1, vdest, 1);
-		vdest = pack565(vsrc2, vdest, 2);
-		vdest = pack565(vsrc3, vdest, 3);
-
-		*(__m64 *)dst = vdest;
-	    }
-	    else if (a0 | a1 | a2 | a3)
-	    {
-		__m64 vdest = *(__m64 *)dst;
-
-		vdest = pack565(over(vsrc0, expand_alpha(vsrc0), expand565(vdest, 0)), vdest, 0);
-	        vdest = pack565(over(vsrc1, expand_alpha(vsrc1), expand565(vdest, 1)), vdest, 1);
-		vdest = pack565(over(vsrc2, expand_alpha(vsrc2), expand565(vdest, 2)), vdest, 2);
-		vdest = pack565(over(vsrc3, expand_alpha(vsrc3), expand565(vdest, 3)), vdest, 3);
-
-		*(__m64 *)dst = vdest;
-	    }
+	    vsrc0 = load8888(*(src + 0));
+	    vsrc1 = load8888(*(src + 1));
+	    vsrc2 = load8888(*(src + 2));
+	    vsrc3 = load8888(*(src + 3));
+
+	    vdest = *(__m64 *)dst;
+	    
+	    vdest = pack565(over(vsrc0, expand_alpha(vsrc0), expand565(vdest, 0)), vdest, 0);
+	    vdest = pack565(over(vsrc1, expand_alpha(vsrc1), expand565(vdest, 1)), vdest, 1);
+	    vdest = pack565(over(vsrc2, expand_alpha(vsrc2), expand565(vdest, 2)), vdest, 2);
+	    vdest = pack565(over(vsrc3, expand_alpha(vsrc3), expand565(vdest, 3)), vdest, 3);
+	    
+	    *(__m64 *)dst = vdest;
 
 	    w -= 4;
 	    dst += 4;


More information about the cairo-commit mailing list