summaryrefslogtreecommitdiff
path: root/composite
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-05-21 15:05:48 -0700
committerKeith Packard <keithp@keithp.com>2010-06-05 18:59:00 -0700
commit2dc138922b7588515d5f2447e4b9dcdc0bef15e0 (patch)
tree004ca1d730f94a78150c30b3fbc0c87af31f2895 /composite
parentd17e726e89ef644310de77b960b715c2d11088da (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 'composite')
-rw-r--r--composite/compalloc.c6
-rw-r--r--composite/compext.c2
-rw-r--r--composite/compwindow.c42
3 files changed, 25 insertions, 25 deletions
diff --git a/composite/compalloc.c b/composite/compalloc.c
index 7930ebe48..d8ccc1181 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -134,7 +134,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
EnableMapUnmapEvents (pWin);
}
- REGION_NULL (pScreen, &cw->borderClip);
+ RegionNull(&cw->borderClip);
cw->borderClipX = 0;
cw->borderClipY = 0;
cw->update = CompositeRedirectAutomatic;
@@ -227,7 +227,7 @@ compFreeClientWindow (WindowPtr pWin, XID id)
if (cw->damage)
DamageDestroy (cw->damage);
- REGION_UNINIT (pScreen, &cw->borderClip);
+ RegionUninit(&cw->borderClip);
dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, NULL);
free(cw);
@@ -599,7 +599,7 @@ compFreePixmap (WindowPtr pWin)
* case correctly. Unmap adds the window borderClip to the
* parent exposed area; regions beyond the parent cause crashes
*/
- REGION_COPY (pScreen, &pWin->borderClip, &cw->borderClip);
+ RegionCopy(&pWin->borderClip, &cw->borderClip);
pRedirectPixmap = (*pScreen->GetWindowPixmap) (pWin);
pParentPixmap = (*pScreen->GetWindowPixmap) (pWin->parent);
pWin->redirectDraw = RedirectDrawNone;
diff --git a/composite/compext.c b/composite/compext.c
index ed437756e..d37d52a18 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -218,7 +218,7 @@ ProcCompositeCreateRegionFromBorderClip (ClientPtr client)
pRegion = XFixesRegionCopy (pBorderClip);
if (!pRegion)
return BadAlloc;
- REGION_TRANSLATE (pScreen, pRegion, -pWin->drawable.x, -pWin->drawable.y);
+ RegionTranslate(pRegion, -pWin->drawable.x, -pWin->drawable.y);
if (!AddResource (stuff->region, RegionResType, (pointer) pRegion))
return BadAlloc;
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 0f3898cb3..7d877b104 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -98,10 +98,10 @@ compRepaintBorder (ClientPtr pClient, pointer closure)
if (rc == Success) {
RegionRec exposed;
- REGION_NULL(pScreen, &exposed);
- REGION_SUBTRACT(pScreen, &exposed, &pWindow->borderClip, &pWindow->winSize);
+ RegionNull(&exposed);
+ RegionSubtract(&exposed, &pWindow->borderClip, &pWindow->winSize);
miPaintWindow(pWindow, &exposed, PW_BORDER);
- REGION_UNINIT(pScreen, &exposed);
+ RegionUninit(&exposed);
}
return TRUE;
}
@@ -283,7 +283,7 @@ compClipNotify (WindowPtr pWin, int dx, int dy)
if (cw->borderClipX != pWin->drawable.x ||
cw->borderClipY != pWin->drawable.y)
{
- REGION_TRANSLATE (pScreen, &cw->borderClip,
+ RegionTranslate(&cw->borderClip,
pWin->drawable.x - cw->borderClipX,
pWin->drawable.y - cw->borderClipY);
cw->borderClipX = pWin->drawable.x;
@@ -404,14 +404,14 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
- REGION_NULL (pWin->drawable.pScreen, &rgnDst);
+ RegionNull(&rgnDst);
- REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst,
+ RegionIntersect(&rgnDst,
&pWin->borderClip, prgnSrc);
- REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
+ RegionTranslate(&rgnDst,
-pPixmap->screen_x, -pPixmap->screen_y);
dx = dx + pPixmap->screen_x - cw->oldx;
@@ -419,8 +419,8 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
if (pGC)
{
- BoxPtr pBox = REGION_RECTS (&rgnDst);
- int nBox = REGION_NUM_RECTS (&rgnDst);
+ BoxPtr pBox = RegionRects (&rgnDst);
+ int nBox = RegionNumRects (&rgnDst);
ValidateGC(&pPixmap->drawable, pGC);
while (nBox--)
@@ -448,16 +448,16 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y)
{
if (dx || dy)
- REGION_TRANSLATE (pScreen, prgnSrc, dx, dy);
+ RegionTranslate(prgnSrc, dx, dy);
(*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc);
if (dx || dy)
- REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
}
else
{
ptOldOrg.x -= dx;
ptOldOrg.y -= dy;
- REGION_TRANSLATE (prgnSrc, prgnSrc,
+ RegionTranslate(prgnSrc,
pWin->drawable.x - ptOldOrg.x,
pWin->drawable.y - ptOldOrg.y);
DamageRegionAppend(&pWin->drawable, prgnSrc);
@@ -525,26 +525,26 @@ compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion)
CompWindowPtr cw = GetCompWindow (pWin);
RegionRec damage;
- REGION_NULL (pScreen, &damage);
+ RegionNull(&damage);
/*
* Align old border clip with new border clip
*/
- REGION_TRANSLATE (pScreen, &cw->borderClip,
+ RegionTranslate(&cw->borderClip,
pWin->drawable.x - cw->borderClipX,
pWin->drawable.y - cw->borderClipY);
/*
* Compute newly visible portion of window for repaint
*/
- REGION_SUBTRACT (pScreen, &damage, pRegion, &cw->borderClip);
+ RegionSubtract(&damage, pRegion, &cw->borderClip);
/*
* Report that as damaged so it will be redrawn
*/
DamageRegionAppend(&pWin->drawable, &damage);
- REGION_UNINIT (pScreen, &damage);
+ RegionUninit(&damage);
/*
* Save the new border clip region
*/
- REGION_COPY (pScreen, &cw->borderClip, pRegion);
+ RegionCopy(&cw->borderClip, pRegion);
cw->borderClipX = pWin->drawable.x;
cw->borderClipY = pWin->drawable.y;
}
@@ -606,18 +606,18 @@ compWindowUpdateAutomatic (WindowPtr pWin)
/*
* First move the region from window to screen coordinates
*/
- REGION_TRANSLATE (pScreen, pRegion,
+ RegionTranslate(pRegion,
pWin->drawable.x, pWin->drawable.y);
/*
* Clip against the "real" border clip
*/
- REGION_INTERSECT (pScreen, pRegion, pRegion, &cw->borderClip);
+ RegionIntersect(pRegion, pRegion, &cw->borderClip);
/*
* Now translate from screen to dest coordinates
*/
- REGION_TRANSLATE (pScreen, pRegion,
+ RegionTranslate(pRegion,
-pParent->drawable.x, -pParent->drawable.y);
/*