pixman: Branch 'master'

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Tue Jun 19 08:08:40 PDT 2007


 pixman/pixman-pict.c |   33 ++++++++++++++-------------------
 1 files changed, 14 insertions(+), 19 deletions(-)

New commits:
diff-tree d7f426806d25a9cea93a4c43a3f23e7ae9d67383 (from 9ebec1f7dbe5576d572fede28d7560ea6000b566)
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date:   Tue Jun 19 10:46:36 2007 -0400

    Smplify the 1x1r optimization for the general compositing and fix the
    1xn and nx1 cases.

diff --git a/pixman/pixman-pict.c b/pixman/pixman-pict.c
index ddd81f4..57bd7d6 100644
--- a/pixman/pixman-pict.c
+++ b/pixman/pixman-pict.c
@@ -1857,30 +1857,25 @@ pixman_image_composite (pixman_op_t     
 	func = pixman_image_composite_rect;
 
 	/* CompositeGeneral optimizes 1x1 repeating images itself */
-	if (pSrc->type == BITS)
+	if (pSrc->type == BITS &&
+	    pSrc->bits.width == 1 && pSrc->bits.height == 1)
 	{
-	    srcRepeat =
-		pSrc->common.repeat == PIXMAN_REPEAT_NORMAL	&&
-		!pSrc->common.transform				&&
-		pSrc->bits.width != 1				&&
-		pSrc->bits.height != 1;
+	    srcRepeat = FALSE;
 	}
-
-	if (pMask && pMask->type == BITS)
+	
+	if (pMask && pMask->type == BITS &&
+	    pMask->bits.width == 1 && pMask->bits.height == 1)
 	{
-	    maskRepeat =
-		pMask->common.repeat == PIXMAN_REPEAT_NORMAL	&&
-		!pMask->common.transform			&&
-		pMask->bits.width != 1				&&
-		pMask->bits.height != 1;
+	    maskRepeat = FALSE;
 	}
-    }
 
-    /* if we are transforming, we handle repeats in fbFetchTransformed */
-    if (srcTransform)
-	srcRepeat = FALSE;
-    if (maskTransform)
-	maskRepeat = FALSE;
+	/* if we are transforming, repeats are handled in fbFetchTransformed */
+	if (srcTransform)
+	    srcRepeat = FALSE;
+	
+	if (maskTransform)
+	    maskTransform = FALSE;
+    }
 
     pixman_walk_composite_region (op, pSrc, pMask, pDst, xSrc, ySrc,
 				  xMask, yMask, xDst, yDst, width, height,


More information about the xorg-commit mailing list