xf86-video-intel: uxa/uxa-render.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Nov 13 11:09:09 PST 2009


 uxa/uxa-render.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit e9064eacb0ad8867e320597453facbb3c376522c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Nov 13 18:35:44 2009 +0000

    uxa: Do not remove repeat from solids for 1x1 composites.
    
    Or else we hit the buggy 1x1 source path and trigger:
    
      rendercheck/mcoords regressed
      http://bugs.freedesktop.org/show_bug.cgi?id=25046
    
    caused by the recent commit e581ceb.

diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index ee1e4e1..79017b5 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -856,7 +856,8 @@ uxa_composite(CARD8 op,
 		goto composite;
 
 	/* Remove repeat in source if useless */
-	if (pSrc->repeat && !pSrc->transform && xSrc >= 0 &&
+	if (pSrc->repeat && (pSrc->pDrawable->width > 1 || pSrc->pDrawable->height > 1 ) &&
+	    !pSrc->transform && xSrc >= 0 &&
 	    (xSrc + width) <= pSrc->pDrawable->width && ySrc >= 0 &&
 	    (ySrc + height) <= pSrc->pDrawable->height)
 		pSrc->repeat = 0;
@@ -872,8 +873,9 @@ uxa_composite(CARD8 op,
 			&& pSrc->format == pDst->format
 			&& (pSrc->format == PICT_x8r8g8b8
 			    || pSrc->format == PICT_x8b8g8r8))) {
-			if (pSrc->pDrawable->width == 1
-			    && pSrc->pDrawable->height == 1 && pSrc->repeat) {
+			if (pSrc->pDrawable->width == 1 &&
+			    pSrc->pDrawable->height == 1 &&
+			    pSrc->repeat) {
 				ret =
 				    uxa_try_driver_solid_fill(pSrc, pDst, xSrc,
 							      ySrc, xDst, yDst,
@@ -964,6 +966,7 @@ uxa_composite(CARD8 op,
 composite:
 	/* Remove repeat in mask if useless */
 	if (pMask && pMask->repeat && !pMask->transform && pMask->pDrawable &&
+	    (pMask->pDrawable->width > 1 || pMask->pDrawable->height > 1) &&
 	    xMask >= 0 && (xMask + width) <= pMask->pDrawable->width &&
 	    yMask >= 0 && (yMask + height) <= pMask->pDrawable->height)
 		pMask->repeat = 0;


More information about the xorg-commit mailing list