Wed Jul 22 06:10:52 2009 UTC ()
apply the patch from http://bugs.freedesktop.org/attachment.cgi?id=27568.
it fixes various issues picked up by newer pixman.


(mrg)
diff -r1.1.1.3 -r1.2 xsrc/external/mit/xorg-server/dist/exa/exa_accel.c

cvs diff -r1.1.1.3 -r1.2 xsrc/external/mit/xorg-server/dist/exa/exa_accel.c (expand / switch to unified diff)

--- xsrc/external/mit/xorg-server/dist/exa/exa_accel.c 2009/07/09 07:04:33 1.1.1.3
+++ xsrc/external/mit/xorg-server/dist/exa/exa_accel.c 2009/07/22 06:10:52 1.2
@@ -405,35 +405,45 @@ exaCopyNtoN (DrawablePtr pSrcDrawable @@ -405,35 +405,45 @@ exaCopyNtoN (DrawablePtr pSrcDrawable
405 if (nbox == 0) 405 if (nbox == 0)
406 return; 406 return;
407 407
408 pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable); 408 pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable);
409 pDstPixmap = exaGetDrawablePixmap (pDstDrawable); 409 pDstPixmap = exaGetDrawablePixmap (pDstDrawable);
410 410
411 exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y); 411 exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y);
412 exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y); 412 exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y);
413 413
414 rects = xalloc(nbox * sizeof(xRectangle)); 414 rects = xalloc(nbox * sizeof(xRectangle));
415 415
416 if (rects) { 416 if (rects) {
417 int i; 417 int i;
 418 int ordering;
418 419
419 for (i = 0; i < nbox; i++) { 420 for (i = 0; i < nbox; i++) {
420 rects[i].x = pbox[i].x1 + dx + src_off_x; 421 rects[i].x = pbox[i].x1 + dx + src_off_x;
421 rects[i].y = pbox[i].y1 + dy + src_off_y; 422 rects[i].y = pbox[i].y1 + dy + src_off_y;
422 rects[i].width = pbox[i].x2 - pbox[i].x1; 423 rects[i].width = pbox[i].x2 - pbox[i].x1;
423 rects[i].height = pbox[i].y2 - pbox[i].y1; 424 rects[i].height = pbox[i].y2 - pbox[i].y1;
424 } 425 }
425 426
426 srcregion = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED); 427 /* This must match the miRegionCopy() logic for reversing rect order */
 428 if (nbox == 1 || (dx > 0 && dy > 0) ||
 429 (pDstDrawable != pSrcDrawable &&
 430 (pDstDrawable->type != DRAWABLE_WINDOW ||
 431 pSrcDrawable->type != DRAWABLE_WINDOW)))
 432 ordering = CT_YXBANDED;
 433 else
 434 ordering = CT_UNSORTED;
 435
 436 srcregion = RECTS_TO_REGION(pScreen, nbox, rects, ordering);
427 xfree(rects); 437 xfree(rects);
428 438
429 if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, 439 if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
430 pGC->fillStyle, pGC->alu, 440 pGC->fillStyle, pGC->alu,
431 pGC->clientClipType)) { 441 pGC->clientClipType)) {
432 dstregion = REGION_CREATE(pScreen, NullBox, 0); 442 dstregion = REGION_CREATE(pScreen, NullBox, 0);
433 REGION_COPY(pScreen, dstregion, srcregion); 443 REGION_COPY(pScreen, dstregion, srcregion);
434 REGION_TRANSLATE(pScreen, dstregion, dst_off_x - dx - src_off_x, 444 REGION_TRANSLATE(pScreen, dstregion, dst_off_x - dx - src_off_x,
435 dst_off_y - dy - src_off_y); 445 dst_off_y - dy - src_off_y);
436 } 446 }
437 } 447 }
438 448
439 pixmaps[0].as_dst = TRUE; 449 pixmaps[0].as_dst = TRUE;