diff options
author | Keith Packard <keithp@keithp.com> | 2010-05-21 15:05:48 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-06-05 18:59:00 -0700 |
commit | 2dc138922b7588515d5f2447e4b9dcdc0bef15e0 (patch) | |
tree | 004ca1d730f94a78150c30b3fbc0c87af31f2895 /hw/xfree86/xaa | |
parent | d17e726e89ef644310de77b960b715c2d11088da (diff) |
Rename region macros to eliminate screen argument
This is a combination of a huge mechanical patch and a few small
fixups required to finish the job. They were reviewed separately, but
because the server does not build without both pieces, I've merged
them together at this time.
The mechanical changes were performed by running the included
'fix-region' script over the whole tree:
$ git ls-files | grep -v '^fix-' | xargs ./fix-region
And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.
$ sh ./fix-patch-whitespace
Thanks to Jamey Sharp for the mighty fine sed-generating sed script.
The hand-done changes involve removing functions from dix/region.c
that duplicate inline functions in include/regionstr.h, along with
their declarations in regionstr.h, mi.h and mispans.h.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/xaa')
-rw-r--r-- | hw/xfree86/xaa/xaaBitBlt.c | 34 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaCpyArea.c | 12 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaCpyPlane.c | 12 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaCpyWin.c | 14 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaDashLine.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaFillArc.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaFillPoly.c | 12 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaFillRect.c | 22 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaImage.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaLine.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaNonTEText.c | 20 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaOverlay.c | 16 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaOverlayDF.c | 28 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaPCache.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaPict.c | 40 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaRect.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaSpans.c | 10 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaTEText.c | 12 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaWideLine.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaawrap.h | 2 |
20 files changed, 131 insertions, 131 deletions
diff --git a/hw/xfree86/xaa/xaaBitBlt.c b/hw/xfree86/xaa/xaaBitBlt.c index 75033bcca..5148ed4a2 100644 --- a/hw/xfree86/xaa/xaaBitBlt.c +++ b/hw/xfree86/xaa/xaaBitBlt.c @@ -118,8 +118,8 @@ XAABitBlt( fastExpose = 0; } } else { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); + RegionInit(&rgnDst, &fastBox, 1); + RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip); } dstx += pDstDrawable->x; @@ -128,9 +128,9 @@ XAABitBlt( if (pDstDrawable->type == DRAWABLE_WINDOW) { if (!((WindowPtr)pDstDrawable)->realized) { if (!fastClip) - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return NULL; } } @@ -153,8 +153,8 @@ XAABitBlt( blown region and call intersect */ cclip = pGC->pCompositeClip; - if (REGION_NUM_RECTS(cclip) == 1) { - BoxPtr pBox = REGION_RECTS(cclip); + if (RegionNumRects(cclip) == 1) { + BoxPtr pBox = RegionRects(cclip); if (fastBox.x1 < pBox->x1) fastBox.x1 = pBox->x1; if (fastBox.x2 > pBox->x2) fastBox.x2 = pBox->x2; @@ -163,37 +163,37 @@ XAABitBlt( /* Check to see if the region is empty */ if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) { - REGION_NULL(pGC->pScreen, &rgnDst); + RegionNull(&rgnDst); } else { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + RegionInit(&rgnDst, &fastBox, 1); } } else { /* We must turn off fastClip now, since we must create a full blown region. It is intersected with the composite clip below. */ fastClip = 0; - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1); + RegionInit(&rgnDst, &fastBox,1); } } else { - REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + RegionTranslate(&rgnDst, -dx, -dy); } if (!fastClip) { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, + RegionIntersect(&rgnDst, &rgnDst, pGC->pCompositeClip); } /* Do bit blitting */ - numRects = REGION_NUM_RECTS(&rgnDst); + numRects = RegionNumRects(&rgnDst); if (numRects && width && height) { if(!(pptSrc = (DDXPointPtr)malloc(numRects * sizeof(DDXPointRec)))) { - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return NULL; } - pbox = REGION_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); ppt = pptSrc; for (i = numRects; --i >= 0; pbox++, ppt++) { ppt->x = pbox->x1 + dx; @@ -214,8 +214,8 @@ XAABitBlt( (int)origSource.height, origDest.x, origDest.y, bitPlane); } - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return prgnExposed; } diff --git a/hw/xfree86/xaa/xaaCpyArea.c b/hw/xfree86/xaa/xaaCpyArea.c index 1a03bfdb2..443a0e15e 100644 --- a/hw/xfree86/xaa/xaaCpyArea.c +++ b/hw/xfree86/xaa/xaaCpyArea.c @@ -95,8 +95,8 @@ XAADoBitBlt( ((pSrc->type == DRAWABLE_WINDOW) && (pDst->type == DRAWABLE_WINDOW))); - pbox = REGION_RECTS(prgnDst); - nbox = REGION_NUM_RECTS(prgnDst); + pbox = RegionRects(prgnDst); + nbox = RegionNumRects(prgnDst); pboxNew1 = NULL; pptNew1 = NULL; @@ -204,8 +204,8 @@ XAADoImageWrite( int srcwidth; unsigned char* psrcBase; /* start of image */ unsigned char* srcPntr; /* index into the image */ - BoxPtr pbox = REGION_RECTS(prgnDst); - int nbox = REGION_NUM_RECTS(prgnDst); + BoxPtr pbox = RegionRects(prgnDst); + int nbox = RegionNumRects(prgnDst); XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); int Bpp = pSrc->bitsPerPixel >> 3; @@ -233,8 +233,8 @@ XAADoImageRead( int dstwidth; unsigned char* pdstBase; /* start of image */ unsigned char* dstPntr; /* index into the image */ - BoxPtr pbox = REGION_RECTS(prgnDst); - int nbox = REGION_NUM_RECTS(prgnDst); + BoxPtr pbox = RegionRects(prgnDst); + int nbox = RegionNumRects(prgnDst); XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); int Bpp = pSrc->bitsPerPixel >> 3; /* wouldn't get here unless both src and dst have same bpp */ diff --git a/hw/xfree86/xaa/xaaCpyPlane.c b/hw/xfree86/xaa/xaaCpyPlane.c index e3010eafb..6d2b3a008 100644 --- a/hw/xfree86/xaa/xaaCpyPlane.c +++ b/hw/xfree86/xaa/xaaCpyPlane.c @@ -76,8 +76,8 @@ XAACopyPlane1toNColorExpand( DDXPointPtr pptSrc ) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - BoxPtr pbox = REGION_RECTS(rgnDst); - int numrects = REGION_NUM_RECTS(rgnDst); + BoxPtr pbox = RegionRects(rgnDst); + int numrects = RegionNumRects(rgnDst); unsigned char *src = ((PixmapPtr)pSrc)->devPrivate.ptr; int srcwidth = ((PixmapPtr)pSrc)->devKind; @@ -101,8 +101,8 @@ XAACopyPlaneNtoNColorExpand( DDXPointPtr pptSrc ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - BoxPtr pbox = REGION_RECTS(rgnDst); - int numrects = REGION_NUM_RECTS(rgnDst); + BoxPtr pbox = RegionRects(rgnDst); + int numrects = RegionNumRects(rgnDst); unsigned char *src = ((PixmapPtr)pSrc)->devPrivate.ptr; unsigned char *data, *srcPtr, *dataPtr; int srcwidth = ((PixmapPtr)pSrc)->devKind; @@ -168,14 +168,14 @@ XAAPushPixelsSolidColorExpansion( int xOrg, int yOrg ) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - int MaxBoxes = REGION_NUM_RECTS(pGC->pCompositeClip); + int MaxBoxes = RegionNumRects(pGC->pCompositeClip); BoxPtr pbox, pClipBoxes; int nboxes, srcx, srcy; xRectangle TheRect; unsigned char *src = pBitMap->devPrivate.ptr; int srcwidth = pBitMap->devKind; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; TheRect.x = xOrg; diff --git a/hw/xfree86/xaa/xaaCpyWin.c b/hw/xfree86/xaa/xaaCpyWin.c index d58db8ea1..c3c2690b2 100644 --- a/hw/xfree86/xaa/xaaCpyWin.c +++ b/hw/xfree86/xaa/xaaCpyWin.c @@ -49,18 +49,18 @@ XAACopyWindow( pwinRoot = pScreen->root; - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); - pbox = REGION_RECTS(&rgnDst); - nbox = REGION_NUM_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); + nbox = RegionNumRects(&rgnDst); if(!nbox || !(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) { - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); return; } ppt = pptSrc; @@ -78,5 +78,5 @@ XAACopyWindow( &(infoRec->ScratchGC), &rgnDst, pptSrc); free(pptSrc); - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); } diff --git a/hw/xfree86/xaa/xaaDashLine.c b/hw/xfree86/xaa/xaaDashLine.c index 63233e05d..e84708449 100644 --- a/hw/xfree86/xaa/xaaDashLine.c +++ b/hw/xfree86/xaa/xaaDashLine.c @@ -37,8 +37,8 @@ XAAPolyLinesDashed( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates, XAAGetGCKey()); - BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip); - int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip); + BoxPtr pboxInit = RegionRects(pGC->pCompositeClip); + int nboxInit = RegionNumRects(pGC->pCompositeClip); unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); int xorg = pDrawable->x; int yorg = pDrawable->y; diff --git a/hw/xfree86/xaa/xaaFillArc.c b/hw/xfree86/xaa/xaaFillArc.c index d83922ce0..47d804108 100644 --- a/hw/xfree86/xaa/xaaFillArc.c +++ b/hw/xfree86/xaa/xaaFillArc.c @@ -171,7 +171,7 @@ XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) cclip = pGC->pCompositeClip; - if(!REGION_NUM_RECTS(cclip)) + if(!RegionNumRects(cclip)) return; for (arc = parcs, i = narcs; --i >= 0; arc++) @@ -198,7 +198,7 @@ XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) y2 = box.y1 + (int)arc->height + 1; box.y2 = y2; if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && - (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) ) + (RegionContainsRect(cclip, &box) == rgnIN) ) { if ((arc->angle2 >= FULLCIRCLE) || (arc->angle2 <= -FULLCIRCLE)) diff --git a/hw/xfree86/xaa/xaaFillPoly.c b/hw/xfree86/xaa/xaaFillPoly.c index 6f11e35ff..289a3cab1 100644 --- a/hw/xfree86/xaa/xaaFillPoly.c +++ b/hw/xfree86/xaa/xaaFillPoly.c @@ -213,7 +213,7 @@ XAAFillPolygonSolid( int c, y, maxy, h, yoffset; DDXPointPtr topPoint; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; if (mode == CoordModePrevious) { @@ -226,7 +226,7 @@ XAAFillPolygonSolid( mode = CoordModeOrigin; } - if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if (RegionNumRects(pGC->pCompositeClip) != 1) { miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn); return; } @@ -676,7 +676,7 @@ XAAFillPolygonStippled( RectFuncPtr RectFunc = NULL; TrapFuncPtr TrapFunc = NULL; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; if (mode == CoordModePrevious) { @@ -689,7 +689,7 @@ XAAFillPolygonStippled( mode = CoordModeOrigin; } - if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if (RegionNumRects(pGC->pCompositeClip) != 1) { miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn); return; } @@ -836,7 +836,7 @@ XAAFillPolygonTiled( RectFuncPtr RectFunc = NULL; TrapFuncPtr TrapFunc = NULL; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; if (mode == CoordModePrevious) { @@ -849,7 +849,7 @@ XAAFillPolygonTiled( mode = CoordModeOrigin; } - if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if (RegionNumRects(pGC->pCompositeClip) != 1) { miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn); return; } diff --git a/hw/xfree86/xaa/xaaFillRect.c b/hw/xfree86/xaa/xaaFillRect.c index 0b83ef3ee..dde31c1f3 100644 --- a/hw/xfree86/xaa/xaaFillRect.c +++ b/hw/xfree86/xaa/xaaFillRect.c @@ -40,7 +40,7 @@ XAAPolyFillRect( if((nrectFill <= 0) || !pGC->planemask) return; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; switch(pGC->fillStyle) { @@ -944,8 +944,8 @@ XAAClipAndRenderRects( pboxClippedBase = (BoxPtr)infoRec->PreAllocMem; pboxClipped = pboxClippedBase; - if (REGION_NUM_RECTS(pGC->pCompositeClip) == 1) { - pextent = REGION_RECTS(pGC->pCompositeClip); + if (RegionNumRects(pGC->pCompositeClip) == 1) { + pextent = RegionRects(pGC->pCompositeClip); while (nrectFill--) { pboxClipped->x1 = max(pextent->x1, prect->x); pboxClipped->y1 = max(pextent->y1, prect->y); @@ -967,7 +967,7 @@ XAAClipAndRenderRects( } } } else { - pextent = REGION_EXTENTS(pGC->pScreen, pGC->pCompositeClip); + pextent = RegionExtents(pGC->pCompositeClip); while (nrectFill--) { int n; BoxRec box, *pbox; @@ -986,8 +986,8 @@ XAAClipAndRenderRects( if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) continue; - n = REGION_NUM_RECTS (pGC->pCompositeClip); - pbox = REGION_RECTS(pGC->pCompositeClip); + n = RegionNumRects (pGC->pCompositeClip); + pbox = RegionRects(pGC->pCompositeClip); /* clip the rectangle to each box in the clip region this is logically equivalent to calling Intersect() @@ -1030,8 +1030,8 @@ XAAGetRectClipBoxes( xRectangle *prect = prectInit; RegionPtr prgnClip = pGC->pCompositeClip; - if (REGION_NUM_RECTS(prgnClip) == 1) { - pextent = REGION_RECTS(prgnClip); + if (RegionNumRects(prgnClip) == 1) { + pextent = RegionRects(prgnClip); while (nrectFill--) { pboxClipped->x1 = max(pextent->x1, prect->x); pboxClipped->y1 = max(pextent->y1, prect->y); @@ -1049,7 +1049,7 @@ XAAGetRectClipBoxes( } } } else { - pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); + pextent = RegionExtents(prgnClip); while (nrectFill--) { int n; BoxRec box, *pbox; @@ -1068,8 +1068,8 @@ XAAGetRectClipBoxes( if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) continue; - n = REGION_NUM_RECTS (prgnClip); - pbox = REGION_RECTS(prgnClip); + n = RegionNumRects (prgnClip); + pbox = RegionRects(prgnClip); /* clip the rectangle to each box in the clip region this is logically equivalent to calling Intersect() diff --git a/hw/xfree86/xaa/xaaImage.c b/hw/xfree86/xaa/xaaImage.c index 30caa2a9a..e88f45c55 100644 --- a/hw/xfree86/xaa/xaaImage.c +++ b/hw/xfree86/xaa/xaaImage.c @@ -406,7 +406,7 @@ XAAPutImage( Bool depthBug = FALSE; if(!w || !h) return; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; depthBug = XAA_DEPTH_BUG(pGC); @@ -431,7 +431,7 @@ XAAPutImage( !(infoRec->WriteBitmapFlags & NO_PLANEMASK) && !(infoRec->WriteBitmapFlags & TRANSPARENCY_ONLY))){ - int MaxBoxes = REGION_NUM_RECTS(pGC->pCompositeClip); + int MaxBoxes = RegionNumRects(pGC->pCompositeClip); BoxPtr pbox, pClipBoxes; int nboxes, srcx, srcy, srcwidth; xRectangle TheRect; diff --git a/hw/xfree86/xaa/xaaLine.c b/hw/xfree86/xaa/xaaLine.c index 7469de179..d6c06eba8 100644 --- a/hw/xfree86/xaa/xaaLine.c +++ b/hw/xfree86/xaa/xaaLine.c @@ -35,8 +35,8 @@ XAAPolyLines( #endif ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip); - int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip); + BoxPtr pboxInit = RegionRects(pGC->pCompositeClip); + int nboxInit = RegionNumRects(pGC->pCompositeClip); unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); int xorg = pDrawable->x; int yorg = pDrawable->y; diff --git a/hw/xfree86/xaa/xaaNonTEText.c b/hw/xfree86/xaa/xaaNonTEText.c index 072fe1925..a7fcf7ab9 100644 --- a/hw/xfree86/xaa/xaaNonTEText.c +++ b/hw/xfree86/xaa/xaaNonTEText.c @@ -128,7 +128,7 @@ XAAImageText8NonTEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)(pGC->font, (unsigned long)count, @@ -153,7 +153,7 @@ XAAImageText16NonTEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)( @@ -188,7 +188,7 @@ XAAImageGlyphBltNonTEColorExpansion( ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; ImageGlyphBltNonTEColorExpansion( @@ -208,7 +208,7 @@ XAAPolyGlyphBltNonTEColorExpansion( ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; PolyGlyphBltNonTEColorExpansion( @@ -368,8 +368,8 @@ ImageGlyphBltNonTEColorExpansion( int skippix, skipglyph, width, n, i; int Left, Right, Top, Bottom; int LeftEdge, RightEdge, ytop, ybot; - int nbox = REGION_NUM_RECTS(cclip); - BoxPtr pbox = REGION_RECTS(cclip); + int nbox = RegionNumRects(cclip); + BoxPtr pbox = RegionRects(cclip); Bool AlreadySetup = FALSE; width = CollectCharacterInfo(infoRec->GlyphInfo, nglyph, ppci, font); @@ -405,8 +405,8 @@ ImageGlyphBltNonTEColorExpansion( nbox--; pbox++; } - nbox = REGION_NUM_RECTS(cclip); - pbox = REGION_RECTS(cclip); + nbox = RegionNumRects(cclip); + pbox = RegionRects(cclip); if(infoRec->WriteBitmap && (nglyph > 1) && ((FONTMAXBOUNDS(font, rightSideBearing) - @@ -477,8 +477,8 @@ PolyGlyphBltNonTEColorExpansion( int skippix, skipglyph, width, n, i; int Left, Right, Top, Bottom; int LeftEdge, RightEdge; - int nbox = REGION_NUM_RECTS(cclip); - BoxPtr pbox = REGION_RECTS(cclip); + int nbox = RegionNumRects(cclip); + BoxPtr pbox = RegionRects(cclip); width = CollectCharacterInfo(infoRec->GlyphInfo, nglyph, ppci, font); diff --git a/hw/xfree86/xaa/xaaOverlay.c b/hw/xfree86/xaa/xaaOverlay.c index 14de9bd34..4b52bf6fd 100644 --- a/hw/xfree86/xaa/xaaOverlay.c +++ b/hw/xfree86/xaa/xaaOverlay.c @@ -59,18 +59,18 @@ XAACopyWindow8_32( if(doUnderlay) freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip); - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(&rgnDst, borderClip, prgnSrc); - pbox = REGION_RECTS(&rgnDst); - nbox = REGION_NUM_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); + nbox = RegionNumRects(&rgnDst); if(!nbox || !(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) { - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); return; } ppt = pptSrc; @@ -88,9 +88,9 @@ XAACopyWindow8_32( &(infoRec->ScratchGC), &rgnDst, pptSrc); free(pptSrc); - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); if(freeReg) - REGION_DESTROY(pScreen, borderClip); + RegionDestroy(borderClip); } static void diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c index b186cb5cd..61adec62b 100644 --- a/hw/xfree86/xaa/xaaOverlayDF.c +++ b/hw/xfree86/xaa/xaaOverlayDF.c @@ -341,18 +341,18 @@ XAAOverCopyWindow( infoRec->ScratchGC.alu = GXcopy; infoRec->ScratchGC.planemask = ~0; - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); - nbox = REGION_NUM_RECTS(&rgnDst); + nbox = RegionNumRects(&rgnDst); if(nbox && (pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) { - pbox = REGION_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) { ppt->x = pbox->x1 + dx; ppt->y = pbox->y1 + dy; @@ -371,18 +371,18 @@ XAAOverCopyWindow( free(pptSrc); } - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); if(pWin->drawable.depth == 8) { - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); miSegregateChildren(pWin, &rgnDst, pScrn->depth); - if(REGION_NOTEMPTY(pScreen, &rgnDst)) { - REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrc); - nbox = REGION_NUM_RECTS(&rgnDst); + if(RegionNotEmpty(&rgnDst)) { + RegionIntersect(&rgnDst, &rgnDst, prgnSrc); + nbox = RegionNumRects(&rgnDst); if(nbox && (pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))){ - pbox = REGION_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) { ppt->x = pbox->x1 + dx; ppt->y = pbox->y1 + dy; @@ -394,7 +394,7 @@ XAAOverCopyWindow( free(pptSrc); } } - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); } } @@ -409,13 +409,13 @@ XAAOverWindowExposures( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); if((pWin->drawable.bitsPerPixel != 8) && infoRec->pScrn->vtSema) { - if(REGION_NUM_RECTS(pReg) && infoRec->FillSolidRects) { + if(RegionNumRects(pReg) && infoRec->FillSolidRects) { XAAOverlayPtr pOverPriv = GET_OVERLAY_PRIV(pScreen); SWITCH_DEPTH(8); (*infoRec->FillSolidRects)(infoRec->pScrn, infoRec->pScrn->colorKey, GXcopy, ~0, - REGION_NUM_RECTS(pReg), REGION_RECTS(pReg)); + RegionNumRects(pReg), RegionRects(pReg)); miWindowExposures(pWin, pReg, pOtherReg); return; } else if(infoRec->NeedToSync) { diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c index 598a1bec8..f7f6a29bb 100644 --- a/hw/xfree86/xaa/xaaPCache.c +++ b/hw/xfree86/xaa/xaaPCache.c @@ -639,8 +639,8 @@ XAAInitPixmapCache( ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XAAInfoRecPtr infoRec = (XAAInfoRecPtr)data; XAAPixmapCachePrivatePtr pCachePriv; - BoxPtr pBox = REGION_RECTS(areas); - int nBox = REGION_NUM_RECTS(areas); + BoxPtr pBox = RegionRects(areas); + int nBox = RegionNumRects(areas); int Num512, Num256, Num128, NumPartial, NumColor, NumMono; int Target512, Target256; CacheLinkPtr List512, List256, List128, ListPartial, ListColor, ListMono; diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c index 38ef21e85..aaafacba5 100644 --- a/hw/xfree86/xaa/xaaPict.c +++ b/hw/xfree86/xaa/xaaPict.c @@ -215,7 +215,7 @@ XAADoComposite ( BoxPtr pbox; int nbox, w, h; - if(!REGION_NUM_RECTS(pDst->pCompositeClip)) + if(!RegionNumRects(pDst->pCompositeClip)) return TRUE; if(!infoRec->pScrn->vtSema || !DRAWABLE_IS_ON_CARD(pDst->pDrawable)) @@ -273,8 +273,8 @@ XAADoComposite ( width, height)) return TRUE; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) return TRUE; @@ -298,7 +298,7 @@ XAADoComposite ( } /* WriteBitmap sets the Sync flag */ - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -340,11 +340,11 @@ XAADoComposite ( width, height)) return TRUE; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -355,7 +355,7 @@ XAADoComposite ( ((PixmapPtr)(pMask->pDrawable))->devKind, w, h, flags)) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return FALSE; } @@ -371,7 +371,7 @@ XAADoComposite ( } SET_SYNC_FLAG(infoRec); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } } else { @@ -409,11 +409,11 @@ XAADoComposite ( width, height)) return TRUE; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -423,7 +423,7 @@ XAADoComposite ( ((PixmapPtr)(pSrc->pDrawable))->devKind, w, h, flags)) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return FALSE; } @@ -440,7 +440,7 @@ XAADoComposite ( } SET_SYNC_FLAG(infoRec); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -476,16 +476,16 @@ XAACompositeSrcCopy (PicturePtr pSrc, width, height)) return; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return; } pptSrc = malloc(sizeof(DDXPointRec) * nbox); if (!pptSrc) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return; } xoff = xSrc - xDst; @@ -502,7 +502,7 @@ XAACompositeSrcCopy (PicturePtr pSrc, pptSrc); free(pptSrc); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return; } @@ -588,7 +588,7 @@ XAADoGlyphs (CARD8 op, ScreenPtr pScreen = pDst->pDrawable->pScreen; XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); - if(!REGION_NUM_RECTS(pDst->pCompositeClip)) + if(!RegionNumRects(pDst->pCompositeClip)) return TRUE; if(!infoRec->pScrn->vtSema || diff --git a/hw/xfree86/xaa/xaaRect.c b/hw/xfree86/xaa/xaaRect.c index 0a7e174b7..4a3912946 100644 --- a/hw/xfree86/xaa/xaaRect.c +++ b/hw/xfree86/xaa/xaaRect.c @@ -46,8 +46,8 @@ XAAPolyRectangleThinSolid( int clipYMax; /* lower right corner of clip rect */ int width, height; /* width and height of rect */ - nClipRects = REGION_NUM_RECTS(pGC->pCompositeClip); - pClipRects = REGION_RECTS(pGC->pCompositeClip); + nClipRects = RegionNumRects(pGC->pCompositeClip); + pClipRects = RegionRects(pGC->pCompositeClip); if(!nClipRects) return; diff --git a/hw/xfree86/xaa/xaaSpans.c b/hw/xfree86/xaa/xaaSpans.c index 46d6d0740..a742cba1b 100644 --- a/hw/xfree86/xaa/xaaSpans.c +++ b/hw/xfree86/xaa/xaaSpans.c @@ -49,7 +49,7 @@ XAAFillSpans( if((nInit <= 0) || !pGC->planemask) return; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; switch(pGC->fillStyle) { @@ -117,7 +117,7 @@ XAAFillSpans( } - if((nInit < 10) || (REGION_NUM_RECTS(pGC->pCompositeClip) != 1)) + if((nInit < 10) || (RegionNumRects(pGC->pCompositeClip) != 1)) fastClip = FALSE; if(fastClip) { @@ -797,10 +797,10 @@ XAAClipAndRenderSpans( pptNew = pptBase; pwidthNew = pwidthBase; - numRects = REGION_NUM_RECTS(pGC->pCompositeClip); + numRects = RegionNumRects(pGC->pCompositeClip); if(numRects == 1) { - BoxPtr pextent = REGION_RECTS(pGC->pCompositeClip); + BoxPtr pextent = RegionRects(pGC->pCompositeClip); while(nspans--) { if ((pextent->y1 <= ppt->y) && (ppt->y < pextent->y2)) { @@ -830,7 +830,7 @@ XAAClipAndRenderSpans( while(nspans--) { nbox = numRects; - pbox = REGION_RECTS(pGC->pCompositeClip); + pbox = RegionRects(pGC->pCompositeClip); /* find the first band */ while(nbox && (pbox->y2 <= ppt->y)) { diff --git a/hw/xfree86/xaa/xaaTEText.c b/hw/xfree86/xaa/xaaTEText.c index b18228310..729e8a8cb 100644 --- a/hw/xfree86/xaa/xaaTEText.c +++ b/hw/xfree86/xaa/xaaTEText.c @@ -110,7 +110,7 @@ XAAImageText8TEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)(pGC->font, (unsigned long)count, @@ -134,7 +134,7 @@ XAAImageText16TEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)( @@ -169,7 +169,7 @@ XAAImageGlyphBltTEColorExpansion( { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; XAAGlyphBltTEColorExpansion( @@ -189,7 +189,7 @@ XAAPolyGlyphBltTEColorExpansion( { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; XAAGlyphBltTEColorExpansion( @@ -229,8 +229,8 @@ XAAGlyphBltTEColorExpansion( int skippix, skipglyphs; int Left, Right, Top, Bottom; int LeftEdge, RightEdge, ytop, ybot; - int nbox = REGION_NUM_RECTS(cclip); - BoxPtr pbox = REGION_RECTS(cclip); + int nbox = RegionNumRects(cclip); + BoxPtr pbox = RegionRects(cclip); unsigned int **glyphs = NULL; int glyphWidth = FONTMAXBOUNDS(font, characterWidth); diff --git a/hw/xfree86/xaa/xaaWideLine.c b/hw/xfree86/xaa/xaaWideLine.c index a684d6676..79a6159cd 100644 --- a/hw/xfree86/xaa/xaaWideLine.c +++ b/hw/xfree86/xaa/xaaWideLine.c @@ -804,10 +804,10 @@ XAAPolylinesWideSolid ( int yorg = pDrawable->y; Bool hardClip = FALSE; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; - if(REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if(RegionNumRects(pGC->pCompositeClip) != 1) { miWideLine(pDrawable, pGC, mode, npt, pPts); return; } diff --git a/hw/xfree86/xaa/xaawrap.h b/hw/xfree86/xaa/xaawrap.h index 86ba003d6..3f3c26171 100644 --- a/hw/xfree86/xaa/xaawrap.h +++ b/hw/xfree86/xaa/xaawrap.h @@ -32,7 +32,7 @@ #define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ GCFuncs *oldFuncs = pGC->funcs;\ - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) return; \ + if(!RegionNumRects(pGC->pCompositeClip)) return; \ pGC->funcs = pGCPriv->wrapFuncs;\ pGC->ops = pGCPriv->wrapOps |