xserver: Branch 'server-1.10-branch' - 2 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri Feb 10 17:08:23 PST 2012


 configure.ac    |    2 -
 fb/fbpict.c     |    4 +--
 render/mipict.c |   62 ++++++++++++++++++++++++++++++++++++++++++--------------
 render/mipict.h |    7 ++++--
 4 files changed, 55 insertions(+), 20 deletions(-)

New commits:
commit 5db8aa3f8495223080e06b420eb02628c9b7959d
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Fri Feb 10 17:06:51 2012 -0800

    configure.ac: Bump to 1.10.6
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/configure.ac b/configure.ac
index 9b1dc25..112d056 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.10.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.10.6, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 RELEASE_DATE="2012-02-10"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
commit 6526e693d7a51de725231f1b462dd40c9ef14d27
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Fri Feb 10 17:05:52 2012 -0800

    Revert "Remove geometry arguments from miSourceValidate()"
    
    This should not have been there, and I'm honestly not sure why
    I even had it on my branch...
    
    Sorry for the noise.  I'm going to go hide in a corner now.
    
    This reverts commit 4975887a30a2c8f1bbba9127eee17f7099c3ecd1.

diff --git a/fb/fbpict.c b/fb/fbpict.c
index 471f7e3..d438cdc 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -54,9 +54,9 @@ fbComposite (CARD8      op,
     int msk_xoff, msk_yoff;
     int dst_xoff, dst_yoff;
     
-    miCompositeSourceValidate (pSrc);
+    miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
     if (pMask)
-	miCompositeSourceValidate (pMask);
+	miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
     
     src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
     mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff);
diff --git a/render/mipict.c b/render/mipict.c
index 2159ebe..de5eea6 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -333,8 +333,12 @@ miClipPictureSrc (RegionPtr	pRegion,
     return TRUE;
 }
 
-static void
-SourceValidateOnePicture (PicturePtr pPicture)
+void
+miCompositeSourceValidate (PicturePtr	pPicture,
+			   INT16	x,
+			   INT16	y,
+			   CARD16	width,
+			   CARD16	height)
 {
     DrawablePtr	pDrawable = pPicture->pDrawable;
     ScreenPtr	pScreen;
@@ -343,22 +347,50 @@ SourceValidateOnePicture (PicturePtr pPicture)
         return;
 
     pScreen = pDrawable->pScreen;
-
+    
     if (pScreen->SourceValidate)
     {
-	pScreen->SourceValidate (
-	    pDrawable, 0, 0, pDrawable->width, pDrawable->height, pPicture->subWindowMode);
+	if (pPicture->transform)
+	{
+	    xPoint	    points[4];
+	    int		    i;
+	    int		    xmin, ymin, xmax, ymax;
+
+#define VectorSet(i,_x,_y) { points[i].x = _x; points[i].y = _y; }
+	    VectorSet (0, x, y);
+	    VectorSet (1, x + width, y);
+	    VectorSet (2, x, y + height);
+	    VectorSet (3, x + width, y + height);
+	    xmin = ymin = 32767;
+	    xmax = ymax = -32737;
+	    for (i = 0; i < 4; i++)
+	    {
+		PictVector  t;
+		t.vector[0] = IntToxFixed (points[i].x);
+		t.vector[1] = IntToxFixed (points[i].y);
+		t.vector[2] = xFixed1;
+		if (pixman_transform_point (pPicture->transform, &t))
+		{
+		    int	tx = xFixedToInt (t.vector[0]);
+		    int ty = xFixedToInt (t.vector[1]);
+		    if (tx < xmin) xmin = tx;
+		    if (tx > xmax) xmax = tx;
+		    if (ty < ymin) ymin = ty;
+		    if (ty > ymax) ymax = ty;
+		}
+	    }
+	    x = xmin;
+	    y = ymin;
+	    width = xmax - xmin;
+	    height = ymax - ymin;
+	}
+        x += pPicture->pDrawable->x;
+        y += pPicture->pDrawable->y;
+	(*pScreen->SourceValidate) (pDrawable, x, y, width, height,
+				    pPicture->subWindowMode);
     }
 }
 
-void
-miCompositeSourceValidate (PicturePtr pPicture)
-{
-    SourceValidateOnePicture (pPicture);
-    if (pPicture->alphaMap)
-	SourceValidateOnePicture (pPicture->alphaMap);
-}
-
 /*
  * returns FALSE if the final region is empty.  Indistinguishable from
  * an allocation failure, but rendering ignores those anyways.
@@ -448,9 +480,9 @@ miComputeCompositeRegion (RegionPtr	pRegion,
     }
 
     
-    miCompositeSourceValidate (pSrc);
+    miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height);
     if (pMask)
-	miCompositeSourceValidate (pMask);
+	miCompositeSourceValidate (pMask, xMask, yMask, width, height);
 
     return TRUE;
 }
diff --git a/render/mipict.h b/render/mipict.h
index 4f5b3ba..eb6b664 100644
--- a/render/mipict.h
+++ b/render/mipict.h
@@ -81,8 +81,11 @@ miChangePictureFilter (PicturePtr pPicture,
 		       int	  nparams);
 
 extern _X_EXPORT void
-miCompositeSourceValidate (PicturePtr pPicture);
-
+miCompositeSourceValidate (PicturePtr	pPicture,
+			   INT16	x,
+			   INT16	y,
+			   CARD16	width,
+			   CARD16	height);
 extern _X_EXPORT Bool
 miComputeCompositeRegion (RegionPtr	pRegion,
 			  PicturePtr	pSrc,


More information about the xorg-commit mailing list