summaryrefslogtreecommitdiff
path: root/miext/rootless
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 /miext/rootless
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 'miext/rootless')
-rw-r--r--miext/rootless/rootlessCommon.c46
-rw-r--r--miext/rootless/rootlessScreen.c4
-rw-r--r--miext/rootless/rootlessValTree.c96
-rw-r--r--miext/rootless/rootlessWindow.c66
4 files changed, 106 insertions, 106 deletions
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index dd3f953ca..4fb0e4970 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -286,30 +286,30 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
drawing inside the clip, go to some lengths to avoid the general
case intersection. */
- b1 = REGION_EXTENTS(pScreen, &pWindow->borderClip);
- b2 = REGION_EXTENTS(pScreen, pRegion);
+ b1 = RegionExtents(&pWindow->borderClip);
+ b2 = RegionExtents(pRegion);
if (EXTENTCHECK(b1, b2)) {
/* Regions may overlap. */
- if (REGION_NUM_RECTS(pRegion) == 1) {
+ if (RegionNumRects(pRegion) == 1) {
int in;
/* Damaged region only has a single rect, so we can
just compare that against the region */
- in = RECT_IN_REGION(pScreen, &pWindow->borderClip,
- REGION_RECTS (pRegion));
+ in = RegionContainsRect(&pWindow->borderClip,
+ RegionRects (pRegion));
if (in == rgnIN) {
/* clip totally contains pRegion */
#ifdef ROOTLESS_TRACK_DAMAGE
- REGION_UNION(pScreen, &winRec->damage,
+ RegionUnion(&winRec->damage,
&winRec->damage, (pRegion));
#else
SCREENREC(pScreen)->imp->DamageRects(winRec->wid,
- REGION_NUM_RECTS(pRegion),
- REGION_RECTS(pRegion),
+ RegionNumRects(pRegion),
+ RegionRects(pRegion),
-winRec->x, -winRec->y);
#endif
@@ -325,20 +325,20 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
/* clip overlaps pRegion, need to intersect */
- REGION_NULL(pScreen, &clipped);
- REGION_INTERSECT(pScreen, &clipped, &pWindow->borderClip, pRegion);
+ RegionNull(&clipped);
+ RegionIntersect(&clipped, &pWindow->borderClip, pRegion);
#ifdef ROOTLESS_TRACK_DAMAGE
- REGION_UNION(pScreen, &winRec->damage,
+ RegionUnion(&winRec->damage,
&winRec->damage, (pRegion));
#else
SCREENREC(pScreen)->imp->DamageRects(winRec->wid,
- REGION_NUM_RECTS(&clipped),
- REGION_RECTS(&clipped),
+ RegionNumRects(&clipped),
+ RegionRects(&clipped),
-winRec->x, -winRec->y);
#endif
- REGION_UNINIT(pScreen, &clipped);
+ RegionUninit(&clipped);
RootlessQueueRedisplay(pTop->drawable.pScreen);
}
@@ -346,8 +346,8 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
out:
#ifdef ROOTLESSDEBUG
{
- BoxRec *box = REGION_RECTS(pRegion), *end;
- int numBox = REGION_NUM_RECTS(pRegion);
+ BoxRec *box = RegionRects(pRegion), *end;
+ int numBox = RegionNumRects(pRegion);
for (end = box+numBox; box < end; box++) {
RL_DEBUG_MSG("Damage rect: %i, %i, %i, %i\n",
@@ -369,11 +369,11 @@ RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox)
{
RegionRec region;
- REGION_INIT(pWindow->drawable.pScreen, &region, pBox, 1);
+ RegionInit(&region, pBox, 1);
RootlessDamageRegion(pWindow, &region);
- REGION_UNINIT(pWindow->drawable.pScreen, &region); /* no-op */
+ RegionUninit(&region); /* no-op */
}
@@ -396,11 +396,11 @@ RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h)
box.y1 = y;
box.y2 = y + h;
- REGION_INIT(pWindow->drawable.pScreen, &region, &box, 1);
+ RegionInit(&region, &box, 1);
RootlessDamageRegion(pWindow, &region);
- REGION_UNINIT(pWindow->drawable.pScreen, &region); /* no-op */
+ RegionUninit(&region); /* no-op */
}
@@ -418,18 +418,18 @@ RootlessRedisplay(WindowPtr pWindow)
RootlessStopDrawing(pWindow, FALSE);
- if (REGION_NOTEMPTY(pScreen, &winRec->damage)) {
+ if (RegionNotEmpty(&winRec->damage)) {
RL_DEBUG_MSG("Redisplay Win 0x%x, %i x %i @ (%i, %i)\n",
pWindow, winRec->width, winRec->height,
winRec->x, winRec->y);
// move region to window local coords
- REGION_TRANSLATE(pScreen, &winRec->damage,
+ RegionTranslate(&winRec->damage,
-winRec->x, -winRec->y);
SCREENREC(pScreen)->imp->UpdateRegion(winRec->wid, &winRec->damage);
- REGION_EMPTY(pScreen, &winRec->damage);
+ RegionEmpty(&winRec->damage);
}
#else /* !ROOTLESS_TRACK_DAMAGE */
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index d24ca04ad..24dcfe80a 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -441,9 +441,9 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst,
pChild = pWin;
while (1) {
if (pChild->viewable) {
- if (REGION_BROKEN (pScreen, &pChild->winSize))
+ if (RegionBroken(&pChild->winSize))
SetWinSize (pChild);
- if (REGION_BROKEN (pScreen, &pChild->borderSize))
+ if (RegionBroken(&pChild->borderSize))
SetBorderSize (pChild);
(* MarkWindow)(pChild);
if (pChild->firstChild) {
diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c
index 0ee4919e1..0f62c28f4 100644
--- a/miext/rootless/rootlessValTree.c
+++ b/miext/rootless/rootlessValTree.c
@@ -122,8 +122,8 @@ RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe,
Bool someIn, someOut;
register int t, x1, y1, x2, y2;
- nbox = REGION_NUM_RECTS (bounding);
- boundBox = REGION_RECTS (bounding);
+ nbox = RegionNumRects (bounding);
+ boundBox = RegionRects (bounding);
someIn = someOut = FALSE;
x1 = rect->x1;
y1 = rect->y1;
@@ -147,7 +147,7 @@ RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe,
box.x2 = box.x1;
if (box.y1 > box.y2)
box.y2 = box.y1;
- switch (RECT_IN_REGION(pScreen, universe, &box))
+ switch (RegionContainsRect(universe, &box))
{
case rgnIN:
if (someOut)
@@ -224,7 +224,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
borderSize.y2 = dy;
oldVis = pParent->visibility;
- switch (RECT_IN_REGION( pScreen, universe, &borderSize))
+ switch (RegionContainsRect(universe, &borderSize))
{
case rgnIN:
newVis = VisibilityUnobscured;
@@ -285,9 +285,9 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
{
if (pChild->visibility != VisibilityFullyObscured)
{
- REGION_TRANSLATE( pScreen, &pChild->borderClip,
+ RegionTranslate(&pChild->borderClip,
dx, dy);
- REGION_TRANSLATE( pScreen, &pChild->clipList,
+ RegionTranslate(&pChild->clipList,
dx, dy);
pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER;
if (pScreen->ClipNotify)
@@ -296,16 +296,16 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
}
if (pChild->valdata)
{
- REGION_NULL(pScreen,
+ RegionNull(
&pChild->valdata->after.borderExposed);
if (HasParentRelativeBorder(pChild))
{
- REGION_SUBTRACT(pScreen,
+ RegionSubtract(
&pChild->valdata->after.borderExposed,
&pChild->borderClip,
&pChild->winSize);
}
- REGION_NULL(pScreen, &pChild->valdata->after.exposed);
+ RegionNull(&pChild->valdata->after.exposed);
}
if (pChild->firstChild)
{
@@ -334,20 +334,20 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
* We translate the old clipList because that will be exposed or copied
* if gravity is right.
*/
- REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy);
- REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy);
+ RegionTranslate(&pParent->borderClip, dx, dy);
+ RegionTranslate(&pParent->clipList, dx, dy);
}
break;
case VTBroken:
- REGION_EMPTY (pScreen, &pParent->borderClip);
- REGION_EMPTY (pScreen, &pParent->clipList);
+ RegionEmpty(&pParent->borderClip);
+ RegionEmpty(&pParent->clipList);
break;
}
borderVisible = pParent->valdata->before.borderVisible;
resized = pParent->valdata->before.resized;
- REGION_NULL(pScreen, &pParent->valdata->after.borderExposed);
- REGION_NULL(pScreen, &pParent->valdata->after.exposed);
+ RegionNull(&pParent->valdata->after.borderExposed);
+ RegionNull(&pParent->valdata->after.exposed);
/*
* Since the borderClip must not be clipped by the children, we do
@@ -367,23 +367,23 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
* of the border will be saved by DIX in borderVisible --
* use that region and destroy it
*/
- REGION_SUBTRACT( pScreen, exposed, universe, borderVisible);
- REGION_DESTROY( pScreen, borderVisible);
+ RegionSubtract(exposed, universe, borderVisible);
+ RegionDestroy(borderVisible);
}
else
{
- REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip);
+ RegionSubtract(exposed, universe, &pParent->borderClip);
}
if (HasParentRelativeBorder(pParent) && (dx || dy)) {
- REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed,
+ RegionSubtract(&pParent->valdata->after.borderExposed,
universe,
&pParent->winSize);
} else {
- REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed,
+ RegionSubtract(&pParent->valdata->after.borderExposed,
exposed, &pParent->winSize);
}
- REGION_COPY( pScreen, &pParent->borderClip, universe);
+ RegionCopy(&pParent->borderClip, universe);
/*
* To get the right clipList for the parent, and to make doubly sure
@@ -391,15 +391,15 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
* border from the universe before proceeding.
*/
- REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize);
+ RegionIntersect(universe, universe, &pParent->winSize);
}
else
- REGION_COPY( pScreen, &pParent->borderClip, universe);
+ RegionCopy(&pParent->borderClip, universe);
if ((pChild = pParent->firstChild) && pParent->mapped)
{
- REGION_NULL(pScreen, &childUniverse);
- REGION_NULL(pScreen, &childUnion);
+ RegionNull(&childUniverse);
+ RegionNull(&childUnion);
if ((pChild->drawable.y < pParent->lastChild->drawable.y) ||
((pChild->drawable.y == pParent->lastChild->drawable.y) &&
(pChild->drawable.x < pParent->lastChild->drawable.x)))
@@ -407,7 +407,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
for (; pChild; pChild = pChild->nextSib)
{
if (pChild->viewable)
- REGION_APPEND( pScreen, &childUnion, &pChild->borderSize);
+ RegionAppend(&childUnion, &pChild->borderSize);
}
}
else
@@ -415,10 +415,10 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib)
{
if (pChild->viewable)
- REGION_APPEND( pScreen, &childUnion, &pChild->borderSize);
+ RegionAppend(&childUnion, &pChild->borderSize);
}
}
- REGION_VALIDATE( pScreen, &childUnion, &overlap);
+ RegionValidate(&childUnion, &overlap);
for (pChild = pParent->firstChild;
pChild;
@@ -435,7 +435,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
* Figure out the new universe from the child's
* perspective and recurse.
*/
- REGION_INTERSECT( pScreen, &childUniverse,
+ RegionIntersect(&childUniverse,
universe,
&pChild->borderSize);
RootlessComputeClips (pChild, pScreen, &childUniverse,
@@ -447,14 +447,14 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
* other sibling.
*/
if (overlap)
- REGION_SUBTRACT( pScreen, universe, universe,
+ RegionSubtract(universe, universe,
&pChild->borderSize);
}
}
if (!overlap)
- REGION_SUBTRACT( pScreen, universe, universe, &childUnion);
- REGION_UNINIT( pScreen, &childUnion);
- REGION_UNINIT( pScreen, &childUniverse);
+ RegionSubtract(universe, universe, &childUnion);
+ RegionUninit(&childUnion);
+ RegionUninit(&childUniverse);
} /* if any children */
/*
@@ -467,12 +467,12 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
if (oldVis == VisibilityFullyObscured ||
oldVis == VisibilityNotViewable)
{
- REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe);
+ RegionCopy(&pParent->valdata->after.exposed, universe);
}
else if (newVis != VisibilityFullyObscured &&
newVis != VisibilityNotViewable)
{
- REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed,
+ RegionSubtract(&pParent->valdata->after.exposed,
universe, &pParent->clipList);
}
@@ -484,7 +484,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
*/
if (pParent->backStorage && !resized)
{
- REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe);
+ RegionSubtract(exposed, &pParent->clipList, universe);
(* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy);
}
@@ -498,7 +498,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
}
#ifdef NOTDEF
- REGION_COPY( pScreen, &pParent->clipList, universe);
+ RegionCopy(&pParent->clipList, universe);
#endif
pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@@ -589,15 +589,15 @@ RootlessMiValidateTree (WindowPtr pRoot, /* Parent to validate */
if (pChild == NullWindow)
pChild = pRoot->firstChild;
- REGION_NULL(pScreen, &childClip);
- REGION_NULL(pScreen, &exposed);
+ RegionNull(&childClip);
+ RegionNull(&exposed);
- if (REGION_BROKEN (pScreen, &pRoot->clipList) &&
- !REGION_BROKEN (pScreen, &pRoot->borderClip))
+ if (RegionBroken(&pRoot->clipList) &&
+ !RegionBroken(&pRoot->borderClip))
{
// fixme this might not work, but hopefully doesn't happen anyway.
kind = VTBroken;
- REGION_EMPTY (pScreen, &pRoot->clipList);
+ RegionEmpty(&pRoot->clipList);
ErrorF("ValidateTree: BUSTED!\n");
}
@@ -613,28 +613,28 @@ RootlessMiValidateTree (WindowPtr pRoot, /* Parent to validate */
{
if (pWin->viewable) {
if (pWin->valdata) {
- REGION_COPY( pScreen, &childClip, &pWin->borderSize);
+ RegionCopy(&childClip, &pWin->borderSize);
RootlessComputeClips (pWin, pScreen, &childClip, kind, &exposed);
} else if (pWin->visibility == VisibilityNotViewable) {
RootlessTreeObscured(pWin);
}
} else {
if (pWin->valdata) {
- REGION_EMPTY( pScreen, &pWin->clipList);
+ RegionEmpty(&pWin->clipList);
if (pScreen->ClipNotify)
(* pScreen->ClipNotify) (pWin, 0, 0);
- REGION_EMPTY( pScreen, &pWin->borderClip);
+ RegionEmpty(&pWin->borderClip);
pWin->valdata = NULL;
}
}
}
- REGION_UNINIT(pScreen, &childClip);
+ RegionUninit(&childClip);
/* The root is never clipped by its children, so nothing on the root
is ever exposed by moving or mapping its children. */
- REGION_NULL(pScreen, &pRoot->valdata->after.exposed);
- REGION_NULL(pScreen, &pRoot->valdata->after.borderExposed);
+ RegionNull(&pRoot->valdata->after.exposed);
+ RegionNull(&pRoot->valdata->after.borderExposed);
return 1;
}
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 4d541f404..7f0321434 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -184,7 +184,7 @@ RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec)
SCREENREC(pScreen)->imp->DestroyFrame(winRec->wid);
#ifdef ROOTLESS_TRACK_DAMAGE
- REGION_UNINIT(pScreen, &winRec->damage);
+ RegionUninit(&winRec->damage);
#endif
free(winRec);
@@ -232,9 +232,9 @@ RootlessGetShape(WindowPtr pWin, RegionPtr pShape)
/* wBoundingShape is relative to *inner* origin of window.
Translate by borderWidth to get the outside-relative position. */
- REGION_NULL(pScreen, pShape);
- REGION_COPY(pScreen, pShape, wBoundingShape(pWin));
- REGION_TRANSLATE(pScreen, pShape, pWin->borderWidth, pWin->borderWidth);
+ RegionNull(pShape);
+ RegionCopy(pShape, wBoundingShape(pWin));
+ RegionTranslate(pShape, pWin->borderWidth, pWin->borderWidth);
return TRUE;
}
@@ -266,7 +266,7 @@ static void RootlessReshapeFrame(WindowPtr pWin)
RL_DEBUG_MSG("reshaping...");
if (pShape != NULL) {
RL_DEBUG_MSG("numrects %d, extents %d %d %d %d ",
- REGION_NUM_RECTS(&newShape),
+ RegionNumRects(&newShape),
newShape.extents.x1, newShape.extents.y1,
newShape.extents.x2, newShape.extents.y2);
} else {
@@ -277,7 +277,7 @@ static void RootlessReshapeFrame(WindowPtr pWin)
SCREENREC(pScreen)->imp->ReshapeFrame(winRec->wid, pShape);
if (pShape != NULL)
- REGION_UNINIT(pScreen, &newShape);
+ RegionUninit(&newShape);
}
@@ -355,8 +355,8 @@ RootlessPositionWindow(WindowPtr pWin, int x, int y)
#ifdef ROOTLESS_TRACK_DAMAGE
// Move damaged region to correspond to new window position
- if (REGION_NOTEMPTY(pScreen, &winRec->damage)) {
- REGION_TRANSLATE(pScreen, &winRec->damage,
+ if (RegionNotEmpty(&winRec->damage)) {
+ RegionTranslate(&winRec->damage,
x - bw - winRec->x,
y - bw - winRec->y);
}
@@ -394,7 +394,7 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec)
winRec->borderWidth = bw;
#ifdef ROOTLESS_TRACK_DAMAGE
- REGION_NULL(pScreen, &winRec->damage);
+ RegionNull(&winRec->damage);
#endif
}
@@ -457,7 +457,7 @@ RootlessEnsureFrame(WindowPtr pWin)
RootlessFlushWindowColormap(pWin);
if (pShape != NULL)
- REGION_UNINIT(pScreen, &shape);
+ RegionUninit(&shape);
return winRec;
}
@@ -673,7 +673,7 @@ RootlessNoCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
RL_DEBUG_MSG("ROOTLESSNOCOPYWINDOW ");
- REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
}
@@ -705,9 +705,9 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
- REGION_NULL(pScreen, &rgnDst);
- REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
+ RegionTranslate(prgnSrc, -dx, -dy);
+ RegionNull(&rgnDst);
+ RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
if (gResizeDeathCount == 1) {
/* Simple case, we only have a single source pixmap. */
@@ -724,21 +724,21 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
intersect the destination with each source and copy those bits. */
for (i = 0; i < gResizeDeathCount; i++) {
- REGION_INIT(pScreen, &clip, gResizeDeathBounds + 0, 1);
- REGION_NULL(pScreen, &clipped);
- REGION_INTERSECT(pScreen, &rgnDst, &clip, &clipped);
+ RegionInit(&clip, gResizeDeathBounds + 0, 1);
+ RegionNull(&clipped);
+ RegionIntersect(&rgnDst, &clip, &clipped);
fbCopyRegion(&gResizeDeathPix[i]->drawable,
&pScreen->GetWindowPixmap(pWin)->drawable, 0,
&clipped, dx, dy, fbCopyWindowProc, 0, 0);
- REGION_UNINIT(pScreen, &clipped);
- REGION_UNINIT(pScreen, &clip);
+ RegionUninit(&clipped);
+ RegionUninit(&clip);
}
}
/* Don't update - resize will update everything */
- REGION_UNINIT(pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
fbValidateDrawable(&pWin->drawable);
@@ -768,12 +768,12 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
- REGION_NULL(pScreen, &rgnDst);
- REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
+ RegionNull(&rgnDst);
+ RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
- extents = REGION_EXTENTS(pScreen, &rgnDst);
+ extents = RegionExtents(&rgnDst);
area = (extents->x2 - extents->x1) * (extents->y2 - extents->y1);
/* If the area exceeds threshold, use the implementation's
@@ -797,13 +797,13 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
}
/* Move region to window local coords */
- REGION_TRANSLATE(pScreen, &rgnDst, -winRec->x, -winRec->y);
+ RegionTranslate(&rgnDst, -winRec->x, -winRec->y);
RootlessStopDrawing(pWin, FALSE);
SCREENREC(pScreen)->imp->CopyWindow(winRec->wid,
- REGION_NUM_RECTS(&rgnDst),
- REGION_RECTS(&rgnDst),
+ RegionNumRects(&rgnDst),
+ RegionRects(&rgnDst),
dx, dy);
}
else {
@@ -817,7 +817,7 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
}
out:
- REGION_UNINIT(pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
fbValidateDrawable(&pWin->drawable);
SCREEN_WRAP(pScreen, CopyWindow);
@@ -1320,11 +1320,11 @@ RootlessResizeWindow(WindowPtr pWin, int x, int y,
box.x1 = x; box.y1 = y;
box.x2 = x + w; box.y2 = y + h;
- REGION_UNINIT(pScreen, &pWin->winSize);
- REGION_INIT(pScreen, &pWin->winSize, &box, 1);
- REGION_COPY(pScreen, &pWin->borderSize, &pWin->winSize);
- REGION_COPY(pScreen, &pWin->clipList, &pWin->winSize);
- REGION_COPY(pScreen, &pWin->borderClip, &pWin->winSize);
+ RegionUninit(&pWin->winSize);
+ RegionInit(&pWin->winSize, &box, 1);
+ RegionCopy(&pWin->borderSize, &pWin->winSize);
+ RegionCopy(&pWin->clipList, &pWin->winSize);
+ RegionCopy(&pWin->borderClip, &pWin->winSize);
miSendExposures(pWin, &pWin->borderClip,
pWin->drawable.x, pWin->drawable.y);