pixman: Branch 'master'

Vladimir Vukicevic vladimir at kemper.freedesktop.org
Wed Mar 5 15:28:01 PST 2008


 pixman/pixman-compose.c |    8 +++++---
 pixman/pixman-pict.c    |   47 +++--------------------------------------------
 2 files changed, 8 insertions(+), 47 deletions(-)

New commits:
commit 5bcde57da704000f0fbb52291d01c7f3c0dc8655
Author: Antoine Azar <cairo at antoineazar.com>
Date:   Wed Mar 5 15:27:11 2008 -0800

    Fixed transformed/untransformed cases of extend_pad by using fbfetchtransformed in all cases and making sure no fast path can be taken.

diff --git a/pixman/pixman-compose.c b/pixman/pixman-compose.c
index 94fef6c..1b2d581 100644
--- a/pixman/pixman-compose.c
+++ b/pixman/pixman-compose.c
@@ -4196,7 +4196,7 @@ fbFetchTransformed(bits_image_t * pict, int x, int y, int width, uint32_t *buffe
     v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1 / 2 - 1;
     v.vector[2] = pixman_fixed_1;
 
-    /* when using convolution filters one might get here without a transform */
+    /* when using convolution filters or PIXMAN_REPEAT_PAD one might get here without a transform */
     if (pict->common.transform)
     {
         if (!pixman_transform_point_3d (pict->common.transform, &v))
@@ -4398,7 +4398,8 @@ PIXMAN_COMPOSITE_RECT_GENERAL (const FbComposeData *data,
 	    fetchSrc = (scanFetchProc)fbFetchSolid;
 	    srcClass = SOURCE_IMAGE_CLASS_HORIZONTAL;
 	}
-	else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION)
+	else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION
+                && bits->common.repeat != PIXMAN_REPEAT_PAD)
 	{
 	    fetchSrc = (scanFetchProc)fbFetch;
 	}
@@ -4435,7 +4436,8 @@ PIXMAN_COMPOSITE_RECT_GENERAL (const FbComposeData *data,
 		fetchMask = (scanFetchProc)fbFetchSolid;
 		maskClass = SOURCE_IMAGE_CLASS_HORIZONTAL;
 	    }
-	    else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION)
+	    else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION
+                    && bits->common.repeat != PIXMAN_REPEAT_PAD)
 		fetchMask = (scanFetchProc)fbFetch;
 	    else
 		fetchMask = (scanFetchProc)fbFetchTransformed;
diff --git a/pixman/pixman-pict.c b/pixman/pixman-pict.c
index a6d3302..4a97df9 100644
--- a/pixman/pixman-pict.c
+++ b/pixman/pixman-pict.c
@@ -1235,10 +1235,8 @@ pixman_walk_composite_region (pixman_op_t op,
     const pixman_box16_t *pbox;
     int		    w, h, w_this, h_this;
     int		    x_msk, y_msk, x_src, y_src, x_dst, y_dst;
-    int		    x_src_pad_backup = 0, y_src_pad_backup = 0;
     pixman_region16_t reg;
     pixman_region16_t *region;
-    pixman_bool_t srcPad = pSrc->type == BITS && pSrc->common.repeat == PIXMAN_REPEAT_PAD;
 
     pixman_region_init (&reg);
     if (!pixman_compute_composite_region (&reg, pSrc, pMask, pDst,
@@ -1275,24 +1273,6 @@ pixman_walk_composite_region (pixman_op_t op,
 		if (h_this > pSrc->bits.height - y_src)
 		    h_this = pSrc->bits.height - y_src;
 	    }
-	    else if (srcPad)
-	    {
-		y_src_pad_backup = y_src;
-		if (y_src < 0)
-		{
-		    y_src = 0;
-		    h_this = 1;
-		}
-		else if (y_src > pSrc->bits.height - 1)
-		{
-		    y_src = pSrc->bits.height - 1;
-		    h_this = 1;
-		}
-		else if (h_this > pSrc->bits.height - y_src)
-		{
-		    h_this = pSrc->bits.height - y_src;
-		}
-	    }
 	    while (w)
 	    {
 		w_this = w;
@@ -1308,36 +1288,14 @@ pixman_walk_composite_region (pixman_op_t op,
 		    if (w_this > pSrc->bits.width - x_src)
 			w_this = pSrc->bits.width - x_src;
 		}
-		else if (srcPad)
-		{
-		    x_src_pad_backup = x_src;
-		    if (x_src < 0)
-		    {
-			x_src = 0;
-			w_this = 1;
-		    }
-		    else if (x_src > pSrc->bits.width - 1)
-		    {
-			x_src = pSrc->bits.width - 1;
-			w_this = 1;
-		    }
-		    else if (w_this > pSrc->bits.width - x_src)
-		    {
-			w_this = pSrc->bits.width - x_src;
-		    }
-		}
 		(*compositeRect) (op, pSrc, pMask, pDst,
 				  x_src, y_src, x_msk, y_msk, x_dst, y_dst,
 				  w_this, h_this);
-		if (srcPad)
-		    x_src = x_src_pad_backup;
 		w -= w_this;
 		x_src += w_this;
 		x_msk += w_this;
 		x_dst += w_this;
 	    }
-	    if (srcPad)
-		y_src = y_src_pad_backup;
 	    h -= h_this;
 	    y_src += h_this;
 	    y_msk += h_this;
@@ -1731,7 +1689,8 @@ pixman_image_composite (pixman_op_t      op,
         && !srcTransform && !maskTransform
         && !maskAlphaMap && !srcAlphaMap && !dstAlphaMap
         && (pSrc->common.filter != PIXMAN_FILTER_CONVOLUTION)
-        && (!pMask || pMask->common.filter != PIXMAN_FILTER_CONVOLUTION)
+        && (pSrc->common.repeat != PIXMAN_REPEAT_PAD)
+        && (!pMask || (pMask->common.filter != PIXMAN_FILTER_CONVOLUTION && pMask->common.repeat != PIXMAN_REPEAT_PAD))
 	&& !pSrc->common.read_func && !pSrc->common.write_func
 	&& !(pMask && pMask->common.read_func) && !(pMask && pMask->common.write_func)
 	&& !pDst->common.read_func && !pDst->common.write_func)
@@ -1811,7 +1770,7 @@ pixman_image_composite (pixman_op_t      op,
 	    srcRepeat = FALSE;
 
 	if (maskTransform)
-	    maskTransform = FALSE;
+	    maskRepeat = FALSE;
     }
 
     pixman_walk_composite_region (op, pSrc, pMask, pDst, xSrc, ySrc,


More information about the xorg-commit mailing list