xserver: Branch 'master' - 3 commits

Adam Jackson ajax at kemper.freedesktop.org
Thu May 8 13:04:59 PDT 2008


 hw/xfree86/xaa/xaaPict.c |  144 -----------------------------------------------
 1 file changed, 144 deletions(-)

New commits:
commit f17ba5d5849c92603f453195aca384844ca76d74
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu May 8 16:04:24 2008 -0400

    Bug #13104: Remove broken XAA a1 glyph fast path.

diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index 76fcf09..784c649 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -588,150 +588,6 @@ XAADoGlyphs (CARD8         op,
         IS_OFFSCREEN_PIXMAP(pSrc->pDrawable))
         return FALSE;
 
-    if(maskFormat && (maskFormat->depth == 1) && 
-       (pSrc->pDrawable->width == 1) && (pSrc->pDrawable->height == 1) &&
-       (op == PictOpOver) && infoRec->WriteBitmap &&
-       !(infoRec->WriteBitmapFlags & NO_TRANSPARENCY))
-    {
-	CARD16 red, green, blue, alpha;
-	CARD32 pixel =
-                *((CARD32*)(((PixmapPtr)(pSrc->pDrawable))->devPrivate.ptr));
-	CARD32 *bits, *pntr, *pnt;
-	int x, y, i, n, left, top, right, bottom, width, height, pitch;
-	int L, T, R, B, X, Y, h, w, dwords, row, column, nbox;
-	int leftEdge, rightEdge, topLine, botLine;
-	BoxPtr pbox;
-	GlyphPtr glyph;
-	
-	if(!XAAGetRGBAFromPixel(pixel,&red,&green,&blue,&alpha,pSrc->format))
-		return FALSE;
-
-	if(alpha != 0xffff) return FALSE;
-
-	XAAGetPixelFromRGBA(&pixel, red, green, blue, 0, pDst->format);
-
-	if((infoRec->WriteBitmapFlags & RGB_EQUAL) && !((red == green) && (green == blue)))
-	   return FALSE;
-
-	x = pDst->pDrawable->x;
-	y = pDst->pDrawable->y;
-
-	while(nlist--) {
-	    x += list->xOff;
-	    y += list->yOff;
-	    left = right = X = x;
-	    top = bottom = Y = y;
-	    for(i = 0; i < list->len; i++) {
-		glyph = glyphs[i];
-
-		L = X - glyph->info.x;
-		if(L < left) left = L;
-		R = L + glyph->info.width;
-		if(R > right) right = R;
-
-		T = Y - glyph->info.y;
-		if(T < top) top = T;
-		B = T + glyph->info.height;
-		if(B > bottom) bottom = B;
-
-		X += glyph->info.xOff;
-		Y += glyph->info.yOff;
-	    }
-
-	    width = right - left;
-	    height = bottom - top;
-
-	    if(width && height) {
-		pitch = (((width + 31) & ~31) >> 5) + 1;
-		pntr = (CARD32*)xalloc(sizeof(CARD32) * pitch * height);
-		if(!pntr) 
-		    return TRUE;
-		bzero(pntr, sizeof(CARD32) * pitch * height);
-		n = list->len;
-
-		X = x; Y = y;
-		while(n--) {
-		    glyph = *glyphs++;
-		    h = glyph->info.height;
-		    w = glyph->info.width;
-		    if(h && w) {
-			row = y - top - glyph->info.y;
-			column = x - left - glyph->info.x;
-			pnt = pntr + (row * pitch) + (column >> 5);
-			column &= 31;
-			dwords = ((w + 31) >> 5) - 1;
-			bits = (CARD32 *)GlyphPixmap(glyph)[pScreen->myNum]->devPrivate.ptr;
-			if(dwords) {
-			  while(h--) {
-			    for(i = 0; i <= dwords; i++) {
-				if(column) {
-				    pnt[i] |= SHIFT_L(*bits, column);
-				    pnt[i + 1] |= SHIFT_R(*bits, 32 - column);
-				} else
-				    pnt[i] |= *bits;
-
-				if(i != dwords) bits++;
-			    }
-			    bits++;
-			    pnt += pitch;
-			  } 
-			} else {
-			  if(column) {
-			     while(h--) {
-				pnt[0] |= SHIFT_L(*bits, column);
-				pnt[0 + 1] |= SHIFT_R(*bits, 32 - column);
-				bits++;
-				pnt += pitch;
-			     }
-			  } else {
-			     while(h--) {
-				*pnt |= *bits++;
-				pnt += pitch;
-			     }			  
-			  }	  
-			}
-		    }
-		    x += glyph->info.xOff;
-		    y += glyph->info.yOff;
-		}
-		
-		nbox = REGION_NUM_RECTS(pDst->pCompositeClip);
-		pbox = REGION_RECTS(pDst->pCompositeClip);
-		
-		while(nbox && (top >= pbox->y2)) {
-		    pbox++; nbox--;
-		}
-		
-		while(nbox && (bottom > pbox->y1)) {		
-		    leftEdge = max(left, pbox->x1);
-		    rightEdge = min(right, pbox->x2);
-		    
-		    if(rightEdge > leftEdge) {
-		    	column = leftEdge - left;
-			topLine = max(top, pbox->y1);
-			botLine = min(bottom, pbox->y2);
-			h = botLine - topLine;
-			
-			if(h > 0) {
-			  (*infoRec->WriteBitmap)(infoRec->pScrn, 
-			  	leftEdge, topLine, rightEdge - leftEdge, h,
-				(unsigned char*)(pntr + 
-				  ((topLine - top) * pitch) + (column >> 5)),
-				pitch << 2, column & 31, pixel, -1, GXcopy, ~0);
-			}
-		    }	
-		    nbox--; pbox++;
-	   	}
-		xfree(pntr);
-	    } else {
-		x = X; y = Y;
-	    }
-	    list++;
-	}
-
-	return TRUE;
-    }
-
     /*
      * If it looks like we have a chance of being able to draw these
      * glyphs with an accelerated Composite, do that now to avoid
commit ddaecfa13cefee7c66b39b606c8640c6544d4943
Merge: 9c2e087... cf20df3...
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu May 8 14:33:58 2008 -0400

    Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver

commit 9c2e0871cfbe54e73eec1f790a7e383d08555055
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed May 7 13:21:26 2008 -0400

    Bug #13104: XAA: Adapt to glyph storage changes.
    
    Glyph bits are now stored in a proper pixmap, not just hanging off the
    end of a GlyphRec.

diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index 74e90e3..76fcf09 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -660,7 +660,7 @@ XAADoGlyphs (CARD8         op,
 			pnt = pntr + (row * pitch) + (column >> 5);
 			column &= 31;
 			dwords = ((w + 31) >> 5) - 1;
-			bits = (CARD32*)(glyph + 1);
+			bits = (CARD32 *)GlyphPixmap(glyph)[pScreen->myNum]->devPrivate.ptr;
 			if(dwords) {
 			  while(h--) {
 			    for(i = 0; i <= dwords; i++) {


More information about the xorg-commit mailing list