xserver: Branch 'master'

Michel Dänzer daenzer at kemper.freedesktop.org
Fri Jul 10 11:08:49 PDT 2009


 exa/exa_accel.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 35758544813f156eaac28844e693b2a28f6de316
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Fri Jul 10 20:06:02 2009 +0200

    EXA: Only pass CT_YXBANDED to RECTS_TO_REGION() if that is really true.
    
    Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 .

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 39f3437..001a4f0 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -394,6 +394,7 @@ exaHWCopyNtoN (DrawablePtr    pSrcDrawable,
 
     if (rects) {
 	int i;
+	int ordering;
 
 	for (i = 0; i < nbox; i++) {
 	    rects[i].x = pbox[i].x1 + dx + src_off_x;
@@ -402,7 +403,16 @@ exaHWCopyNtoN (DrawablePtr    pSrcDrawable,
 	    rects[i].height = pbox[i].y2 - pbox[i].y1;
 	}
 
-	srcregion  = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED);
+	/* This must match the miRegionCopy() logic for reversing rect order */
+	if (nbox == 1 || (dx > 0 && dy > 0) ||
+	    (pDstDrawable != pSrcDrawable &&
+	     (pDstDrawable->type != DRAWABLE_WINDOW ||
+	      pSrcDrawable->type != DRAWABLE_WINDOW)))
+	    ordering = CT_YXBANDED;
+	else
+	    ordering = CT_UNSORTED;
+
+	srcregion  = RECTS_TO_REGION(pScreen, nbox, rects, ordering);
 	xfree(rects);
 
 	if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,


More information about the xorg-commit mailing list