summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-07-10 20:06:02 +0200
committerKeith Packard <keithp@keithp.com>2009-07-26 13:56:56 -0700
commitec60f4ca65dbc25f9a40636f5280b1a1ec68407f (patch)
treea5eb528ce2002f36ca69d8e687178cef95837b5b
parentb10c4fe343d2339bae4736793939e44a6befaf88 (diff)
EXA: Only pass CT_YXBANDED to RECTS_TO_REGION() if that is really true.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 . (cherry picked from commit 35758544813f156eaac28844e693b2a28f6de316) Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--exa/exa_accel.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index a50696d90..dac6e6c79 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -415,6 +415,7 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
if (rects) {
int i;
+ int ordering;
for (i = 0; i < nbox; i++) {
rects[i].x = pbox[i].x1 + dx + src_off_x;
@@ -423,7 +424,16 @@ exaCopyNtoN (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,