Hi,

I recently upgraded from version 2.15.0 of the intel driver to 2.17.0 but found 
that with the latter 
a trail of 'droppings' was left in the otherwise blank areas of a konqueror 
window when an icon was 
dragged around in the window, under kde-3.5.10. The 'droppings' can be cleaned 
up by refreshing the 
window. Investigation showed that the fault is also present in 2.16.0. I cloned 
the git archive and 
through bisection identified the change that introduced the problem as:

commit ace324e4aa27effdd621156eec03f3f87b610732
Author: Eric Anholt <[email protected]>
Date:   Tue May 31 23:13:18 2011 -0700

    uxa: Simplify BLT solid acceleration for spans filling by only clipping 
once.

Due to subsequent changes that patch cannot be reverted but the attached patch 
reverts the 2.17.0 
driver to its old (2.15.0) behaviour  and eliminates the 'droppings'.

Happy to test a better patch that anyone cooks up.

Chris

-- 
The more I see, the more I know. The more I know, the less I understand. 
Changing Man - Paul Weller
--- xf86-video-intel-2.17.0/uxa/uxa-accel.c.droppings	2011-08-29 10:21:25.000000000 +0100
+++ xf86-video-intel-2.17.0/uxa/uxa-accel.c	2011-12-19 22:50:16.000000000 +0000
@@ -45,9 +45,11 @@ uxa_fill_spans(DrawablePtr pDrawable, GC
 	uxa_screen_t *uxa_screen = uxa_get_screen(screen);
 	RegionPtr pClip = fbGetCompositeClip(pGC);
 	PixmapPtr dst_pixmap;
-	BoxPtr pbox;
+	BoxPtr pextent, pbox;
 	int nbox;
-	int x1, x2, y;
+	int extentX1, extentX2, extentY1, extentY2;
+	int fullX1, fullX2, fullY1;
+	int partX1, partX2;
 	int off_x, off_y;
 
 	if (uxa_screen->swappedOut || uxa_screen->force_fallback)
@@ -70,32 +72,58 @@ uxa_fill_spans(DrawablePtr pDrawable, GC
 						 pGC->fgPixel))
 		goto fallback;
 
+	pextent = REGION_EXTENTS(pGC->screen, pClip);
+	extentX1 = pextent->x1;
+	extentY1 = pextent->y1;
+	extentX2 = pextent->x2;
+	extentY2 = pextent->y2;
 	while (n--) {
-		x1 = ppt->x;
-		y = ppt->y;
-		x2 = x1 + (int)*pwidth;
+		fullX1 = ppt->x;
+		fullY1 = ppt->y;
+		fullX2 = fullX1 + (int)*pwidth;
 		ppt++;
 		pwidth++;
 
-		nbox = REGION_NUM_RECTS(pClip);
-		pbox = REGION_RECTS(pClip);
-		while (nbox--) {
-			if (pbox->y1 > y || pbox->y2 <= y)
-				continue;
+		if (fullY1 < extentY1 || extentY2 <= fullY1)
+			continue;
 
-			if (x1 < pbox->x1)
-				x1 = pbox->x1;
+		if (fullX1 < extentX1)
+			fullX1 = extentX1;
 
-			if (x2 > pbox->x2)
-				x2 = pbox->x2;
+		if (fullX2 > extentX2)
+			fullX2 = extentX2;
 
-			if (x2 <= x1)
-				continue;
+		if (fullX1 >= fullX2)
+			continue;
 
+		nbox = REGION_NUM_RECTS(pClip);
+		if (nbox == 1) {
 			(*uxa_screen->info->solid) (dst_pixmap,
-						    x1 + off_x, y + off_y,
-						    x2 + off_x, y + 1 + off_y);
-			pbox++;
+						    fullX1 + off_x,
+						    fullY1 + off_y,
+						    fullX2 + off_x,
+						    fullY1 + 1 + off_y);
+		} else {
+			pbox = REGION_RECTS(pClip);
+			while (nbox--) {
+				if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) {
+					partX1 = pbox->x1;
+					if (partX1 < fullX1)
+						partX1 = fullX1;
+					partX2 = pbox->x2;
+					if (partX2 > fullX2)
+						partX2 = fullX2;
+					if (partX2 > partX1) {
+						(*uxa_screen->info->
+						solid) (dst_pixmap,
+							partX1 + off_x,
+							fullY1 + off_y,
+							partX2 + off_x,
+							fullY1 + 1 + off_y);
+					}
+				}
+				pbox++;
+			}
 		}
 	}
 	(*uxa_screen->info->done_solid) (dst_pixmap);
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to