summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/dmx/dmxextension.c4
-rw-r--r--hw/dmx/dmxgc.c4
-rw-r--r--hw/dmx/dmxgcops.c18
-rw-r--r--hw/dmx/dmxpict.c4
-rw-r--r--hw/dmx/dmxpixmap.c18
-rw-r--r--hw/dmx/dmxshadow.c4
-rw-r--r--hw/dmx/dmxwindow.c8
-rw-r--r--hw/dmx/input/dmxconsole.c2
-rw-r--r--hw/kdrive/ephyr/ephyr.c12
-rw-r--r--hw/kdrive/ephyr/ephyrdriext.c18
-rw-r--r--hw/kdrive/ephyr/ephyrvideo.c16
-rw-r--r--hw/kdrive/src/kdrive.c20
-rw-r--r--hw/kdrive/src/kxv.c158
-rw-r--r--hw/xfree86/common/xf86Helper.c16
-rw-r--r--hw/xfree86/common/xf86fbman.c132
-rw-r--r--hw/xfree86/common/xf86xv.c172
-rw-r--r--hw/xfree86/dri/dri.c36
-rw-r--r--hw/xfree86/dri2/dri2.c8
-rw-r--r--hw/xfree86/modes/xf86Crtc.c6
-rw-r--r--hw/xfree86/modes/xf86Rotate.c18
-rw-r--r--hw/xfree86/shadowfb/shadow.c34
-rw-r--r--hw/xfree86/xaa/xaaBitBlt.c34
-rw-r--r--hw/xfree86/xaa/xaaCpyArea.c12
-rw-r--r--hw/xfree86/xaa/xaaCpyPlane.c12
-rw-r--r--hw/xfree86/xaa/xaaCpyWin.c14
-rw-r--r--hw/xfree86/xaa/xaaDashLine.c4
-rw-r--r--hw/xfree86/xaa/xaaFillArc.c4
-rw-r--r--hw/xfree86/xaa/xaaFillPoly.c12
-rw-r--r--hw/xfree86/xaa/xaaFillRect.c22
-rw-r--r--hw/xfree86/xaa/xaaImage.c4
-rw-r--r--hw/xfree86/xaa/xaaLine.c4
-rw-r--r--hw/xfree86/xaa/xaaNonTEText.c20
-rw-r--r--hw/xfree86/xaa/xaaOverlay.c16
-rw-r--r--hw/xfree86/xaa/xaaOverlayDF.c28
-rw-r--r--hw/xfree86/xaa/xaaPCache.c4
-rw-r--r--hw/xfree86/xaa/xaaPict.c40
-rw-r--r--hw/xfree86/xaa/xaaRect.c4
-rw-r--r--hw/xfree86/xaa/xaaSpans.c10
-rw-r--r--hw/xfree86/xaa/xaaTEText.c12
-rw-r--r--hw/xfree86/xaa/xaaWideLine.c4
-rw-r--r--hw/xfree86/xaa/xaawrap.h2
-rw-r--r--hw/xnest/Events.c2
-rw-r--r--hw/xnest/GC.c12
-rw-r--r--hw/xnest/GCOps.c12
-rw-r--r--hw/xnest/Pixmap.c16
-rw-r--r--hw/xnest/Window.c34
-rw-r--r--hw/xquartz/darwin.c22
-rw-r--r--hw/xquartz/xpr/dri.c4
-rw-r--r--hw/xquartz/xpr/xprFrame.c8
-rw-r--r--hw/xwin/winfillsp.c6
-rw-r--r--hw/xwin/wingc.c2
-rw-r--r--hw/xwin/winmultiwindowshape.c12
-rw-r--r--hw/xwin/winsetsp.c4
-rw-r--r--hw/xwin/winshaddd.c6
-rw-r--r--hw/xwin/winshadddnl.c6
-rw-r--r--hw/xwin/winshadgdi.c6
-rwxr-xr-xhw/xwin/winvideo.c2
-rwxr-xr-xhw/xwin/winwin32rootless.c4
-rw-r--r--hw/xwin/winwindow.c26
-rwxr-xr-xhw/xwin/winwindowswm.c8
60 files changed, 581 insertions, 581 deletions
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index 5945a5eda..009283505 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -350,7 +350,7 @@ void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
* clipList to be broken since it will be recalculated in
* ValidateTree()
*/
- REGION_BREAK(pScreen, &pRoot->clipList);
+ RegionBreak(&pRoot->clipList);
} else {
/* Otherwise, we just set it directly since there are no
* windows visible on this screen
@@ -994,7 +994,7 @@ static void dmxForceExposures(int idx)
* clipList to be broken since it will be recalculated in
* ValidateTree()
*/
- REGION_BREAK(pScreen, &pRoot->clipList);
+ RegionBreak(&pRoot->clipList);
pScreen->ValidateTree(pRoot, NULL, VTBroken);
pScreen->HandleExposures(pRoot);
if (pScreen->PostValidateTree)
diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c
index a761ea89a..3e75de75e 100644
--- a/hw/dmx/dmxgc.c
+++ b/hw/dmx/dmxgc.c
@@ -363,9 +363,9 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
case CT_REGION:
if (dmxScreen->beDisplay) {
- nRects = REGION_NUM_RECTS((RegionPtr)pGC->clientClip);
+ nRects = RegionNumRects((RegionPtr)pGC->clientClip);
pRects = malloc(nRects * sizeof(*pRects));
- pBox = REGION_RECTS((RegionPtr)pGC->clientClip);
+ pBox = RegionRects((RegionPtr)pGC->clientClip);
for (i = 0; i < nRects; i++) {
pRects[i].x = pBox[i].x1;
diff --git a/hw/dmx/dmxgcops.c b/hw/dmx/dmxgcops.c
index 267a306db..589c6377b 100644
--- a/hw/dmx/dmxgcops.c
+++ b/hw/dmx/dmxgcops.c
@@ -127,16 +127,16 @@ void dmxPutImage(DrawablePtr pDrawable, GCPtr pGC,
box.y1 = y;
box.x2 = x + w;
box.y2 = y + h;
- pSubImages = REGION_CREATE(pGC->pScreen, &box, 1);
+ pSubImages = RegionCreate(&box, 1);
- pClip = REGION_CREATE(pGC->pScreen, NullBox, 1);
- REGION_COPY(pGC->pScreen, pClip, pGC->pCompositeClip);
- REGION_TRANSLATE(pGC->pScreen, pClip,
+ pClip = RegionCreate(NullBox, 1);
+ RegionCopy(pClip, pGC->pCompositeClip);
+ RegionTranslate(pClip,
-pDrawable->x, -pDrawable->y);
- REGION_INTERSECT(pGC->pScreen, pSubImages, pSubImages, pClip);
+ RegionIntersect(pSubImages, pSubImages, pClip);
- nBox = REGION_NUM_RECTS(pSubImages);
- pBox = REGION_RECTS(pSubImages);
+ nBox = RegionNumRects(pSubImages);
+ pBox = RegionRects(pSubImages);
while (nBox--) {
XPutImage(dmxScreen->beDisplay, draw, pGCPriv->gc, img,
@@ -148,8 +148,8 @@ void dmxPutImage(DrawablePtr pDrawable, GCPtr pGC,
pBox->y2 - pBox->y1);
pBox++;
}
- REGION_DESTROY(pGC->pScreen, pClip);
- REGION_DESTROY(pGC->pScreen, pSubImages);
+ RegionDestroy(pClip);
+ RegionDestroy(pSubImages);
} else {
XPutImage(dmxScreen->beDisplay, draw, pGCPriv->gc,
img, 0, 0, x, y, w, h);
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index 0544c88ba..164214500 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -871,8 +871,8 @@ int dmxChangePictureClip(PicturePtr pPicture, int clipType,
pPictPriv->pict, 0, 0, None);
} else if (pPicture->clientClip) {
RegionPtr pClip = pPicture->clientClip;
- BoxPtr pBox = REGION_RECTS(pClip);
- int nBox = REGION_NUM_RECTS(pClip);
+ BoxPtr pBox = RegionRects(pClip);
+ int nBox = RegionNumRects(pClip);
XRectangle *pRects;
XRectangle *pRect;
int nRects;
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index c8b064b78..a64cbd0a4 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -201,7 +201,7 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
Bool overlap;
if (!dmxScreen->beDisplay) {
- pReg = REGION_CREATE(pScreen, NullBox, 1);
+ pReg = RegionCreate(NullBox, 1);
return pReg;
}
@@ -209,8 +209,8 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
pPixmap->drawable.width, pPixmap->drawable.height,
1, XYPixmap);
- pReg = REGION_CREATE(pScreen, NullBox, 1);
- pTmpReg = REGION_CREATE(pScreen, NullBox, 1);
+ pReg = RegionCreate(NullBox, 1);
+ pTmpReg = RegionCreate(NullBox, 1);
if(!pReg || !pTmpReg) {
XDestroyImage(ximage);
return NullRegion;
@@ -229,8 +229,8 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
} else if (currentPixel == 0L) {
/* right edge */
Box.x2 = x;
- REGION_RESET(pScreen, pTmpReg, &Box);
- REGION_APPEND(pScreen, pReg, pTmpReg);
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
}
previousPixel = currentPixel;
}
@@ -238,15 +238,15 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
if (previousPixel != 0L) {
/* right edge because of the end of pixmap */
Box.x2 = pPixmap->drawable.width;
- REGION_RESET(pScreen, pTmpReg, &Box);
- REGION_APPEND(pScreen, pReg, pTmpReg);
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
}
}
- REGION_DESTROY(pScreen, pTmpReg);
+ RegionDestroy(pTmpReg);
XDestroyImage(ximage);
- REGION_VALIDATE(pScreen, pReg, &overlap);
+ RegionValidate(pReg, &overlap);
dmxSync(dmxScreen, FALSE);
return(pReg);
diff --git a/hw/dmx/dmxshadow.c b/hw/dmx/dmxshadow.c
index 461fd085b..a62eb5c52 100644
--- a/hw/dmx/dmxshadow.c
+++ b/hw/dmx/dmxshadow.c
@@ -47,8 +47,8 @@
void dmxShadowUpdateProc(ScreenPtr pScreen, shadowBufPtr pBuf)
{
RegionPtr damage = &pBuf->damage;
- int nbox = REGION_NUM_RECTS(damage);
- BoxPtr pbox = REGION_RECTS(damage);
+ int nbox = RegionNumRects(damage);
+ BoxPtr pbox = RegionRects(damage);
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
if (!dmxScreen->beDisplay)
diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c
index 5b0baff3a..28212a330 100644
--- a/hw/dmx/dmxwindow.c
+++ b/hw/dmx/dmxwindow.c
@@ -940,8 +940,8 @@ static void dmxDoSetShape(WindowPtr pWindow)
/* First, set the bounding shape */
if (wBoundingShape(pWindow)) {
- pBox = REGION_RECTS(wBoundingShape(pWindow));
- nRect = nBox = REGION_NUM_RECTS(wBoundingShape(pWindow));
+ pBox = RegionRects(wBoundingShape(pWindow));
+ nRect = nBox = RegionNumRects(wBoundingShape(pWindow));
pRectFirst = pRect = malloc(nRect * sizeof(*pRect));
while (nBox--) {
pRect->x = pBox->x1;
@@ -963,8 +963,8 @@ static void dmxDoSetShape(WindowPtr pWindow)
/* Next, set the clip shape */
if (wClipShape(pWindow)) {
- pBox = REGION_RECTS(wClipShape(pWindow));
- nRect = nBox = REGION_NUM_RECTS(wClipShape(pWindow));
+ pBox = RegionRects(wClipShape(pWindow));
+ nRect = nBox = RegionNumRects(wClipShape(pWindow));
pRectFirst = pRect = malloc(nRect * sizeof(*pRect));
while (nBox--) {
pRect->x = pBox->x1;
diff --git a/hw/dmx/input/dmxconsole.c b/hw/dmx/input/dmxconsole.c
index 297166edd..80df0649e 100644
--- a/hw/dmx/input/dmxconsole.c
+++ b/hw/dmx/input/dmxconsole.c
@@ -226,7 +226,7 @@ static void dmxConsoleDrawWindows(pointer private)
pChild->drawable.height,
pChild->visibility,
pChild->overrideRedirect,
- REGION_NUM_RECTS(&pChild->clipList));
+ RegionNumRects(&pChild->clipList));
#endif
rect.x = scalex(priv, pChild->drawable.x + pScreen->x);
rect.y = scaley(priv, pChild->drawable.y + pScreen->y);
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index b96851605..e0cb95672 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -343,13 +343,13 @@ ephyrInternalDamageRedisplay (ScreenPtr pScreen)
pRegion = DamageRegion (scrpriv->pDamage);
- if (REGION_NOTEMPTY (pScreen, pRegion))
+ if (RegionNotEmpty(pRegion))
{
int nbox;
BoxPtr pbox;
- nbox = REGION_NUM_RECTS (pRegion);
- pbox = REGION_RECTS (pRegion);
+ nbox = RegionNumRects (pRegion);
+ pbox = RegionRects (pRegion);
while (nbox--)
{
@@ -897,10 +897,10 @@ ephyrExposePairedWindow (int a_remote)
return;
}
screen = pair->local->drawable.pScreen;
- REGION_NULL (screen, &reg);
- REGION_COPY (screen, &reg, &pair->local->clipList);
+ RegionNull(&reg);
+ RegionCopy(&reg, &pair->local->clipList);
screen->WindowExposures (pair->local, &reg, NullRegion);
- REGION_UNINIT (screen, &reg);
+ RegionUninit(&reg);
}
#endif /* XF86DRI */
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 55cc0f128..23c20321f 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -418,11 +418,11 @@ ephyrDRIClipNotify (WindowPtr a_win,
EPHYR_LOG_ERROR ("failed to get window pair\n") ;
goto out ;
}
- rects = calloc(REGION_NUM_RECTS (&a_win->clipList),
+ rects = calloc(RegionNumRects (&a_win->clipList),
sizeof (EphyrRect)) ;
- for (i=0; i < REGION_NUM_RECTS (&a_win->clipList); i++) {
+ for (i=0; i < RegionNumRects (&a_win->clipList); i++) {
memmove (&rects[i],
- &REGION_RECTS (&a_win->clipList)[i],
+ &RegionRects (&a_win->clipList)[i],
sizeof (EphyrRect)) ;
rects[i].x1 -= a_win->drawable.x;
rects[i].x2 -= a_win->drawable.x;
@@ -436,7 +436,7 @@ ephyrDRIClipNotify (WindowPtr a_win,
is_ok = hostx_set_window_bounding_rectangles
(pair->remote,
rects,
- REGION_NUM_RECTS (&a_win->clipList)) ;
+ RegionNumRects (&a_win->clipList)) ;
is_ok = TRUE ;
out:
@@ -1168,12 +1168,12 @@ ProcXF86DRIGetDrawableInfo (register ClientPtr client)
return BadMatch ;
}
EPHYR_LOG ("clip list of xephyr gl drawable:\n") ;
- for (i=0; i < REGION_NUM_RECTS (&window->clipList); i++) {
+ for (i=0; i < RegionNumRects (&window->clipList); i++) {
EPHYR_LOG ("x1:%d, y1:%d, x2:%d, y2:%d\n",
- REGION_RECTS (&window->clipList)[i].x1,
- REGION_RECTS (&window->clipList)[i].y1,
- REGION_RECTS (&window->clipList)[i].x2,
- REGION_RECTS (&window->clipList)[i].y2) ;
+ RegionRects (&window->clipList)[i].x1,
+ RegionRects (&window->clipList)[i].y1,
+ RegionRects (&window->clipList)[i].x2,
+ RegionRects (&window->clipList)[i].y2) ;
}
if (!ephyrDRIGetDrawableInfo (stuff->screen,
diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c
index 65127ceb9..69a89ae61 100644
--- a/hw/kdrive/ephyr/ephyrvideo.c
+++ b/hw/kdrive/ephyr/ephyrvideo.c
@@ -946,8 +946,8 @@ ephyrPutImage (KdScreenInfo *a_info,
a_drw_x, a_drw_y, a_drw_w, a_drw_h,
a_src_x, a_src_y, a_src_w, a_src_h,
a_width, a_height, a_buf,
- (EphyrHostBox*)REGION_RECTS (a_clipping_region),
- REGION_NUM_RECTS (a_clipping_region))) {
+ (EphyrHostBox*)RegionRects (a_clipping_region),
+ RegionNumRects (a_clipping_region))) {
EPHYR_LOG_ERROR ("EphyrHostXVPutImage() failed\n") ;
goto out ;
}
@@ -1025,8 +1025,8 @@ ephyrReputImage (KdScreenInfo *a_info,
port_priv->src_w, port_priv->src_h,
port_priv->image_width, port_priv->image_height,
port_priv->image_buf,
- (EphyrHostBox*)REGION_RECTS (a_clipping_region),
- REGION_NUM_RECTS (a_clipping_region))) {
+ (EphyrHostBox*)RegionRects (a_clipping_region),
+ RegionNumRects (a_clipping_region))) {
EPHYR_LOG_ERROR ("ephyrHostXVPutImage() failed\n") ;
goto out ;
}
@@ -1064,7 +1064,7 @@ ephyrPutVideo (KdScreenInfo *a_info,
dst_box.y2 = a_drw_y + a_drw_h;
if (!DoSimpleClip (&dst_box,
- REGION_EXTENTS (pScreen->pScreen, a_clipping_region),
+ RegionExtents(a_clipping_region),
&clipped_area)) {
EPHYR_LOG_ERROR ("failed to simple clip\n") ;
goto out ;
@@ -1115,7 +1115,7 @@ ephyrGetVideo (KdScreenInfo *a_info,
dst_box.y2 = a_drw_y + a_drw_h;
if (!DoSimpleClip (&dst_box,
- REGION_EXTENTS (pScreen->pScreen, a_clipping_region),
+ RegionExtents(a_clipping_region),
&clipped_area)) {
EPHYR_LOG_ERROR ("failed to simple clip\n") ;
goto out ;
@@ -1166,7 +1166,7 @@ ephyrPutStill (KdScreenInfo *a_info,
dst_box.y2 = a_drw_y + a_drw_h;
if (!DoSimpleClip (&dst_box,
- REGION_EXTENTS (pScreen->pScreen, a_clipping_region),
+ RegionExtents(a_clipping_region),
&clipped_area)) {
EPHYR_LOG_ERROR ("failed to simple clip\n") ;
goto out ;
@@ -1217,7 +1217,7 @@ ephyrGetStill (KdScreenInfo *a_info,
dst_box.y2 = a_drw_y + a_drw_h;
if (!DoSimpleClip (&dst_box,
- REGION_EXTENTS (pScreen->pScreen, a_clipping_region),
+ RegionExtents(a_clipping_region),
&clipped_area)) {
EPHYR_LOG_ERROR ("failed to simple clip\n") ;
goto out ;
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 7993f9bd1..27596e467 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -121,8 +121,8 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
{
RegionPtr borderVisible;
- borderVisible = REGION_CREATE(pScreen, NullBox, 1);
- REGION_SUBTRACT(pScreen, borderVisible,
+ borderVisible = RegionCreate(NullBox, 1);
+ RegionSubtract(borderVisible,
&pWin->borderClip, &pWin->winSize);
pWin->valdata->before.borderVisible = borderVisible;
}
@@ -138,15 +138,15 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
box.y2 = pScreen->height;
pWin->drawable.width = pScreen->width;
pWin->drawable.height = pScreen->height;
- REGION_INIT (pScreen, &pWin->winSize, &box, 1);
- REGION_INIT (pScreen, &pWin->borderSize, &box, 1);
- REGION_RESET(pScreen, &pWin->borderClip, &box);
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionInit(&pWin->winSize, &box, 1);
+ RegionInit(&pWin->borderSize, &box, 1);
+ RegionReset(&pWin->borderClip, &box);
+ RegionBreak(&pWin->clipList);
}
else
{
- REGION_EMPTY(pScreen, &pWin->borderClip);
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionEmpty(&pWin->borderClip);
+ RegionBreak(&pWin->clipList);
}
ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
@@ -836,8 +836,8 @@ KdCreateWindow (WindowPtr pWin)
if (!pScreenPriv->enabled)
{
- REGION_EMPTY (pWin->drawable.pScreen, &pWin->borderClip);
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionEmpty(&pWin->borderClip);
+ RegionBreak(&pWin->clipList);
}
}
#endif
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index c81d7daaa..99ab2d824 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -268,9 +268,9 @@ KdXVFreeAdaptor(XvAdaptorPtr pAdaptor)
pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr;
if(pPriv) {
if(pPriv->clientClip)
- REGION_DESTROY(pAdaptor->pScreen, pPriv->clientClip);
+ RegionDestroy(pPriv->clientClip);
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
- REGION_DESTROY(pAdaptor->pScreen, pPriv->pCompositeClip);
+ RegionDestroy(pPriv->pCompositeClip);
free(pPriv);
}
}
@@ -607,18 +607,18 @@ KdXVUpdateCompositeClip(XvPortRecPrivatePtr portPriv)
return;
}
- pCompositeClip = REGION_CREATE(pWin->pScreen, NullBox, 1);
- REGION_COPY(pWin->pScreen, pCompositeClip, portPriv->clientClip);
- REGION_TRANSLATE(pWin->pScreen, pCompositeClip,
+ pCompositeClip = RegionCreate(NullBox, 1);
+ RegionCopy(pCompositeClip, portPriv->clientClip);
+ RegionTranslate(pCompositeClip,
portPriv->pDraw->x + portPriv->clipOrg.x,
portPriv->pDraw->y + portPriv->clipOrg.y);
- REGION_INTERSECT(pWin->pScreen, pCompositeClip, pregWin, pCompositeClip);
+ RegionIntersect(pCompositeClip, pregWin, pCompositeClip);
portPriv->pCompositeClip = pCompositeClip;
portPriv->FreeCompositeClip = TRUE;
if(freeCompClip) {
- REGION_DESTROY(pWin->pScreen, pregWin);
+ RegionDestroy(pregWin);
}
}
@@ -633,17 +633,17 @@ KdXVCopyClip(
/* copy the new clip if it exists */
if((pGC->clientClipType == CT_REGION) && pGC->clientClip) {
if(!portPriv->clientClip)
- portPriv->clientClip = REGION_CREATE(pGC->pScreen, NullBox, 1);
+ portPriv->clientClip = RegionCreate(NullBox, 1);
/* Note: this is in window coordinates */
- REGION_COPY(pGC->pScreen, portPriv->clientClip, pGC->clientClip);
+ RegionCopy(portPriv->clientClip, pGC->clientClip);
} else if(portPriv->clientClip) { /* free the old clientClip */
- REGION_DESTROY(pGC->pScreen, portPriv->clientClip);
+ RegionDestroy(portPriv->clientClip);
portPriv->clientClip = NULL;
}
/* get rid of the old clip list */
if(portPriv->pCompositeClip && portPriv->FreeCompositeClip) {
- REGION_DESTROY(pWin->pScreen, portPriv->pCompositeClip);
+ RegionDestroy(portPriv->pCompositeClip);
}
portPriv->clipOrg = pGC->clipOrg;
@@ -670,18 +670,18 @@ KdXVRegetVideo(XvPortRecPrivatePtr portPriv)
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
/* clip to the window composite clip */
- REGION_INIT(portPriv->pDraw->pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(portPriv->pDraw->pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(portPriv->pDraw->pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionInit(&ClipRegion, NullBox, 1);
+ RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip);
/* that's all if it's totally obscured */
- if(!REGION_NOTEMPTY(portPriv->pDraw->pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto CLIP_VIDEO_BAILOUT;
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(portPriv->pDraw->pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->GetVideo)(portPriv->screen, portPriv->pDraw,
@@ -706,8 +706,8 @@ CLIP_VIDEO_BAILOUT:
if(!portPriv->FreeCompositeClip)
portPriv->pCompositeClip = NULL;
- REGION_UNINIT(portPriv->pDraw->pScreen, &WinRegion);
- REGION_UNINIT(portPriv->pDraw->pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -734,9 +734,9 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv)
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
/* clip to the window composite clip */
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionInit(&ClipRegion, NullBox, 1);
+ RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip);
/* clip and translate to the viewport */
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
@@ -748,21 +748,21 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv)
VPBox.x2 = screen->width;
VPBox.y2 = screen->height;
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg);
- REGION_UNINIT(pScreen, &VPReg);
+ RegionInit(&VPReg, &VPBox, 1);
+ RegionIntersect(&ClipRegion, &ClipRegion, &VPReg);
+ RegionUninit(&VPReg);
}
/* that's all if it's totally obscured */
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto CLIP_VIDEO_BAILOUT;
}
/* bailout if we have to clip but the hardware doesn't support it */
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
- BoxPtr clipBox = REGION_RECTS(&ClipRegion);
- if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
+ BoxPtr clipBox = RegionRects(&ClipRegion);
+ if( (RegionNumRects(&ClipRegion) != 1) ||
(clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
@@ -772,7 +772,7 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv)
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->PutVideo)(portPriv->screen, portPriv->pDraw,
@@ -796,8 +796,8 @@ CLIP_VIDEO_BAILOUT:
if(!portPriv->FreeCompositeClip)
portPriv->pCompositeClip = NULL;
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -823,9 +823,9 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv)
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
/* clip to the window composite clip */
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionInit(&ClipRegion, NullBox, 1);
+ RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip);
/* clip and translate to the viewport */
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
@@ -837,21 +837,21 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv)
VPBox.x2 = screen->width;
VPBox.y2 = screen->height;
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg);
- REGION_UNINIT(pScreen, &VPReg);
+ RegionInit(&VPReg, &VPBox, 1);
+ RegionIntersect(&ClipRegion, &ClipRegion, &VPReg);
+ RegionUninit(&VPReg);
}
/* that's all if it's totally obscured */
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto CLIP_VIDEO_BAILOUT;
}
/* bailout if we have to clip but the hardware doesn't support it */
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
- BoxPtr clipBox = REGION_RECTS(&ClipRegion);
- if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
+ BoxPtr clipBox = RegionRects(&ClipRegion);
+ if( (RegionNumRects(&ClipRegion) != 1) ||
(clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
@@ -861,7 +861,7 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv)
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->ReputImage)(portPriv->screen, portPriv->pDraw,
@@ -882,8 +882,8 @@ CLIP_VIDEO_BAILOUT:
if(!portPriv->FreeCompositeClip)
portPriv->pCompositeClip = NULL;
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -1021,7 +1021,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
XvPortRecPrivatePtr pPriv;
Bool AreasExposed;
- AreasExposed = (WinPriv && reg1 && REGION_NOTEMPTY(pScreen, reg1));
+ AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1));
pScreen->WindowExposures = ScreenPriv->WindowExposures;
(*pScreen->WindowExposures)(pWin, reg1, reg2);
@@ -1089,7 +1089,7 @@ KdXVClipNotify(WindowPtr pWin, int dx, int dy)
pPriv = WinPriv->PortRec;
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
- REGION_DESTROY(pScreen, pPriv->pCompositeClip);
+ RegionDestroy(pPriv->pCompositeClip);
pPriv->pCompositeClip = NULL;
@@ -1220,7 +1220,7 @@ KdXVDisable(ScreenPtr pScreen)
pPriv->isOn = XV_OFF;
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
- REGION_DESTROY(pScreen, pPriv->pCompositeClip);
+ RegionDestroy(pPriv->pCompositeClip);
pPriv->pCompositeClip = NULL;
@@ -1330,9 +1330,9 @@ KdXVPutStill(
WinBox.x2 = WinBox.x1 + drw_w;
WinBox.y2 = WinBox.y1 + drw_h;
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionInit(&ClipRegion, NullBox, 1);
+ RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip);
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
RegionRec VPReg;
@@ -1343,23 +1343,23 @@ KdXVPutStill(
VPBox.x2 = screen->width;
VPBox.y2 = screen->height;
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg);
- REGION_UNINIT(pScreen, &VPReg);
+ RegionInit(&VPReg, &VPBox, 1);
+ RegionIntersect(&ClipRegion, &ClipRegion, &VPReg);
+ RegionUninit(&VPReg);
}
if(portPriv->pDraw) {
KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
}
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto PUT_STILL_BAILOUT;
}
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
- BoxPtr clipBox = REGION_RECTS(&ClipRegion);
- if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
+ BoxPtr clipBox = RegionRects(&ClipRegion);
+ if( (RegionNumRects(&ClipRegion) != 1) ||
(clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
@@ -1369,7 +1369,7 @@ KdXVPutStill(
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->PutStill)(portPriv->screen, pDraw,
@@ -1398,8 +1398,8 @@ PUT_STILL_BAILOUT:
portPriv->isOn = XV_PENDING;
}
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -1483,21 +1483,21 @@ KdXVGetStill(
WinBox.x2 = WinBox.x1 + drw_w;
WinBox.y2 = WinBox.y1 + drw_h;
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionInit(&ClipRegion, NullBox, 1);
+ RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip);
if(portPriv->pDraw) {
KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
}
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto GET_STILL_BAILOUT;
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->GetStill)(portPriv->screen, pDraw,
@@ -1513,8 +1513,8 @@ GET_STILL_BAILOUT:
portPriv->isOn = XV_PENDING;
}
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -1630,9 +1630,9 @@ KdXVPutImage(
WinBox.x2 = WinBox.x1 + drw_w;
WinBox.y2 = WinBox.y1 + drw_h;
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionInit(&ClipRegion, NullBox, 1);
+ RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip);
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
RegionRec VPReg;
@@ -1643,23 +1643,23 @@ KdXVPutImage(
VPBox.x2 = pScreen->width;
VPBox.y2 = pScreen->height;
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg);
- REGION_UNINIT(pScreen, &VPReg);
+ RegionInit(&VPReg, &VPBox, 1);
+ RegionIntersect(&ClipRegion, &ClipRegion, &VPReg);
+ RegionUninit(&VPReg);
}
if(portPriv->pDraw) {
KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
}
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto PUT_IMAGE_BAILOUT;
}
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
- BoxPtr clipBox = REGION_RECTS(&ClipRegion);
- if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
+ BoxPtr clipBox = RegionRects(&ClipRegion);
+ if( (RegionNumRects(&ClipRegion) != 1) ||
(clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
@@ -1669,7 +1669,7 @@ KdXVPutImage(
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->PutImage)(portPriv->screen, pDraw,
@@ -1698,8 +1698,8 @@ PUT_IMAGE_BAILOUT:
portPriv->isOn = XV_PENDING;
}
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -1869,8 +1869,8 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
GCPtr pGC;
ChangeGCVal val[2];
xRectangle *rects, *r;
- BoxPtr pBox = REGION_RECTS (pRgn);
- int nBox = REGION_NUM_RECTS (pRgn);
+ BoxPtr pBox = RegionRects (pRgn);
+ int nBox = RegionNumRects (pRgn);
rects = malloc(nBox * sizeof (xRectangle));
if (!rects)
@@ -1897,7 +1897,7 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
ValidateGC (pDraw, pGC);
(*pGC->ops->PolyFillRect) (pDraw, pGC,
- REGION_NUM_RECTS (pRgn), rects);
+ RegionNumRects (pRgn), rects);
FreeScratchGC (pGC);
bail1:
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 1aad2d100..7867a428b 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1085,8 +1085,8 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
{
RegionPtr borderVisible;
- borderVisible = REGION_CREATE(pScreen, NullBox, 1);
- REGION_SUBTRACT(pScreen, borderVisible,
+ borderVisible = RegionCreate(NullBox, 1);
+ RegionSubtract(borderVisible,
&pWin->borderClip, &pWin->winSize);
pWin->valdata->before.borderVisible = borderVisible;
}
@@ -1105,18 +1105,18 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_INIT (pScreen, &pWin->winSize, &box, 1);
- REGION_INIT (pScreen, &pWin->borderSize, &box, 1);
+ RegionInit(&pWin->winSize, &box, 1);
+ RegionInit(&pWin->borderSize, &box, 1);
if (WasViewable)
- REGION_RESET(pScreen, &pWin->borderClip, &box);
+ RegionReset(&pWin->borderClip, &box);
pWin->drawable.width = pScreen->width;
pWin->drawable.height = pScreen->height;
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionBreak(&pWin->clipList);
}
else
{
- REGION_EMPTY(pScreen, &pWin->borderClip);
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionEmpty(&pWin->borderClip);
+ RegionBreak(&pWin->clipList);
}
ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c
index a142abebc..d883ab36a 100644
--- a/hw/xfree86/common/xf86fbman.c
+++ b/hw/xfree86/common/xf86fbman.c
@@ -363,8 +363,8 @@ AllocateArea(
if(granularity <= 1) granularity = 0;
- boxp = REGION_RECTS(offman->FreeBoxes);
- num = REGION_NUM_RECTS(offman->FreeBoxes);
+ boxp = RegionRects(offman->FreeBoxes);
+ num = RegionNumRects(offman->FreeBoxes);
/* look through the free boxes */
for(i = 0; i < num; i++, boxp++) {
@@ -407,9 +407,9 @@ AllocateArea(
/* bye, bye */
(*link->area.RemoveAreaCallback)(&link->area);
- REGION_INIT(pScreen, &NewReg, &(link->area.box), 1);
- REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &NewReg);
- REGION_UNINIT(pScreen, &NewReg);
+ RegionInit(&NewReg, &(link->area.box), 1);
+ RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &NewReg);
+ RegionUninit(&NewReg);
area = &(link->area);
break;
@@ -427,9 +427,9 @@ AllocateArea(
area->RemoveAreaCallback = removeCB;
area->devPrivate.ptr = privData;
- REGION_INIT(pScreen, &NewReg, &(area->box), 1);
- REGION_SUBTRACT(pScreen, offman->FreeBoxes, offman->FreeBoxes, &NewReg);
- REGION_UNINIT(pScreen, &NewReg);
+ RegionInit(&NewReg, &(area->box), 1);
+ RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &NewReg);
+ RegionUninit(&NewReg);
}
return area;
@@ -477,9 +477,9 @@ localFreeOffscreenArea(FBAreaPtr area)
}
/* put the area back into the pool */
- REGION_INIT(pScreen, &FreedRegion, &(pLink->area.box), 1);
- REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedRegion);
- REGION_UNINIT(pScreen, &FreedRegion);
+ RegionInit(&FreedRegion, &(pLink->area.box), 1);
+ RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedRegion);
+ RegionUninit(&FreedRegion);
if(pLinkPrev)
pLinkPrev->next = pLink->next;
@@ -536,12 +536,12 @@ localResizeOffscreenArea(
(resize->box.x2 == OrigArea.x2))
return TRUE;
- REGION_INIT(pScreen, &FreedReg, &OrigArea, 1);
- REGION_INIT(pScreen, &NewReg, &(resize->box), 1);
- REGION_SUBTRACT(pScreen, &FreedReg, &FreedReg, &NewReg);
- REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
- REGION_UNINIT(pScreen, &FreedReg);
- REGION_UNINIT(pScreen, &NewReg);
+ RegionInit(&FreedReg, &OrigArea, 1);
+ RegionInit(&NewReg, &(resize->box), 1);
+ RegionSubtract(&FreedReg, &FreedReg, &NewReg);
+ RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
+ RegionUninit(&FreedReg);
+ RegionUninit(&NewReg);
SendCallFreeBoxCallbacks(offman);
@@ -551,8 +551,8 @@ localResizeOffscreenArea(
/* otherwise we remove the old region */
- REGION_INIT(pScreen, &FreedReg, &OrigArea, 1);
- REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
+ RegionInit(&FreedReg, &OrigArea, 1);
+ RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
/* remove the old link */
if(pLinkPrev)
@@ -589,8 +589,8 @@ localResizeOffscreenArea(
offman->NumUsedAreas--;
} else {
/* reinstate the old region */
- REGION_SUBTRACT(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
- REGION_UNINIT(pScreen, &FreedReg);
+ RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
+ RegionUninit(&FreedReg);
pLink->next = offman->UsedAreas;
offman->UsedAreas = pLink;
@@ -598,7 +598,7 @@ localResizeOffscreenArea(
}
- REGION_UNINIT(pScreen, &FreedReg);
+ RegionUninit(&FreedReg);
SendCallFreeBoxCallbacks(offman);
@@ -636,47 +636,47 @@ localQueryLargestOffscreenArea(
if(offman->NumUsedAreas) {
FBLinkPtr pLink;
RegionRec tmpRegion;
- newRegion = REGION_CREATE(pScreen, NULL, 1);
- REGION_COPY(pScreen, newRegion, offman->InitialBoxes);
+ newRegion = RegionCreate(NULL, 1);
+ RegionCopy(newRegion, offman->InitialBoxes);
pLink = offman->UsedAreas;
while(pLink) {
if(!pLink->area.RemoveAreaCallback) {
- REGION_INIT(pScreen, &tmpRegion, &(pLink->area.box), 1);
- REGION_SUBTRACT(pScreen, newRegion, newRegion, &tmpRegion);
- REGION_UNINIT(pScreen, &tmpRegion);
+ RegionInit(&tmpRegion, &(pLink->area.box), 1);
+ RegionSubtract(newRegion, newRegion, &tmpRegion);
+ RegionUninit(&tmpRegion);
}
pLink = pLink->next;
}
- nbox = REGION_NUM_RECTS(newRegion);
- pbox = REGION_RECTS(newRegion);
+ nbox = RegionNumRects(newRegion);
+ pbox = RegionRects(newRegion);
break;
}
case 1:
if(offman->NumUsedAreas) {
FBLinkPtr pLink;
RegionRec tmpRegion;
- newRegion = REGION_CREATE(pScreen, NULL, 1);
- REGION_COPY(pScreen, newRegion, offman->FreeBoxes);
+ newRegion = RegionCreate(NULL, 1);
+ RegionCopy(newRegion, offman->FreeBoxes);
pLink = offman->UsedAreas;
while(pLink) {
if(pLink->area.RemoveAreaCallback) {
- REGION_INIT(pScreen, &tmpRegion, &(pLink->area.box), 1);
- REGION_APPEND(pScreen, newRegion, &tmpRegion);
- REGION_UNINIT(pScreen, &tmpRegion);
+ RegionInit(&tmpRegion, &(pLink->area.box), 1);
+ RegionAppend(newRegion, &tmpRegion);
+ RegionUninit(&tmpRegion);
}
pLink = pLink->next;
}
- nbox = REGION_NUM_RECTS(newRegion);
- pbox = REGION_RECTS(newRegion);
+ nbox = RegionNumRects(newRegion);
+ pbox = RegionRects(newRegion);
break;
}
default:
- nbox = REGION_NUM_RECTS(offman->FreeBoxes);
- pbox = REGION_RECTS(offman->FreeBoxes);
+ nbox = RegionNumRects(offman->FreeBoxes);
+ pbox = RegionRects(offman->FreeBoxes);
break;
}
@@ -719,7 +719,7 @@ localQueryLargestOffscreenArea(
}
if(newRegion)
- REGION_DESTROY(pScreen, newRegion);
+ RegionDestroy(newRegion);
return TRUE;
}
@@ -741,9 +741,9 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen)
if(pLink->area.RemoveAreaCallback) {
(*pLink->area.RemoveAreaCallback)(&pLink->area);
- REGION_INIT(pScreen, &FreedRegion, &(pLink->area.box), 1);
- REGION_APPEND(pScreen, offman->FreeBoxes, &FreedRegion);
- REGION_UNINIT(pScreen, &FreedRegion);
+ RegionInit(&FreedRegion, &(pLink->area.box), 1);
+ RegionAppend(offman->FreeBoxes, &FreedRegion);
+ RegionUninit(&FreedRegion);
if(pPrev)
pPrev->next = pLink->next;
@@ -761,7 +761,7 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen)
}
if(anyUsed) {
- REGION_VALIDATE(pScreen, offman->FreeBoxes, &anyUsed);
+ RegionValidate(offman->FreeBoxes, &anyUsed);
SendCallFreeBoxCallbacks(offman);
}
@@ -924,7 +924,7 @@ localAllocateOffscreenLinear(
return NULL;
/* No linear available, so try and pinch some from the XY areas */
- extents = REGION_EXTENTS(pScreen, offman->InitialBoxes);
+ extents = RegionExtents(offman->InitialBoxes);
pitch = extents->x2 - extents->x1;
if (gran > 1) {
@@ -1055,7 +1055,7 @@ localResizeOffscreenLinear(FBLinearPtr resize, int length)
BoxPtr extents;
int pitch, w, h;
- extents = REGION_EXTENTS(pScreen, offman->InitialBoxes);
+ extents = RegionExtents(offman->InitialBoxes);
pitch = extents->x2 - extents->x1;
if(length < pitch) { /* special case */
@@ -1121,7 +1121,7 @@ localQueryLargestOffscreenLinear(
offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
xf86FBScreenKey);
- extents = REGION_EXTENTS(pScreen, offman->InitialBoxes);
+ extents = RegionExtents(offman->InitialBoxes);
if((extents->x2 - extents->x1) == w)
*size = w * h;
return TRUE;
@@ -1171,8 +1171,8 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen)
free(tmp2);
}
- REGION_DESTROY(pScreen, offman->InitialBoxes);
- REGION_DESTROY(pScreen, offman->FreeBoxes);
+ RegionDestroy(offman->InitialBoxes);
+ RegionDestroy(offman->FreeBoxes);
free(offman->FreeBoxesUpdateCallback);
free(offman->devPrivates);
@@ -1206,15 +1206,15 @@ xf86InitFBManager(
if (FullBox->y2 < FullBox->y1) return FALSE;
if (FullBox->x2 < FullBox->x1) return FALSE;
- REGION_INIT(pScreen, &ScreenRegion, &ScreenBox, 1);
- REGION_INIT(pScreen, &FullRegion, FullBox, 1);
+ RegionInit(&ScreenRegion, &ScreenBox, 1);
+ RegionInit(&FullRegion, FullBox, 1);
- REGION_SUBTRACT(pScreen, &FullRegion, &FullRegion, &ScreenRegion);
+ RegionSubtract(&FullRegion, &FullRegion, &ScreenRegion);
ret = xf86InitFBManagerRegion(pScreen, &FullRegion);
- REGION_UNINIT(pScreen, &ScreenRegion);
- REGION_UNINIT(pScreen, &FullRegion);
+ RegionUninit(&ScreenRegion);
+ RegionUninit(&FullRegion);
return ret;
}
@@ -1249,17 +1249,17 @@ xf86InitFBManagerArea(
}
/* Factor out virtual resolution */
- pRegion = RECTS_TO_REGION(pScreen, nRect, Rect, 0);
+ pRegion = RegionFromRects(nRect, Rect, 0);
if (pRegion) {
- if (!REGION_NAR(pRegion)) {
+ if (!RegionNar(pRegion)) {
Rect[2].x = Rect[2].y = 0;
Rect[2].width = pScrn->virtualX;
Rect[2].height = pScrn->virtualY;
- pScreenRegion = RECTS_TO_REGION(pScreen, 1, &Rect[2], 0);
+ pScreenRegion = RegionFromRects(1, &Rect[2], 0);
if (pScreenRegion) {
- if (!REGION_NAR(pScreenRegion)) {
- REGION_SUBTRACT(pScreen, pRegion, pRegion, pScreenRegion);
+ if (!RegionNar(pScreenRegion)) {
+ RegionSubtract(pRegion, pRegion, pScreenRegion);
ret = xf86InitFBManagerRegion(pScreen, pRegion);
@@ -1301,11 +1301,11 @@ xf86InitFBManagerArea(
}
}
- REGION_DESTROY(pScreen, pScreenRegion);
+ RegionDestroy(pScreenRegion);
}
}
- REGION_DESTROY(pScreen, pRegion);
+ RegionDestroy(pRegion);
}
return ret;
@@ -1318,7 +1318,7 @@ xf86InitFBManagerRegion(
){
FBManagerPtr offman;
- if(REGION_NIL(FullRegion))
+ if(RegionNil(FullRegion))
return FALSE;
if(!xf86RegisterOffscreenManager(pScreen, &xf86FBManFuncs))
@@ -1332,11 +1332,11 @@ xf86InitFBManagerRegion(
offman->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = xf86FBCloseScreen;
- offman->InitialBoxes = REGION_CREATE(pScreen, NULL, 1);
- offman->FreeBoxes = REGION_CREATE(pScreen, NULL, 1);
+ offman->InitialBoxes = RegionCreate(NULL, 1);
+ offman->FreeBoxes = RegionCreate(NULL, 1);
- REGION_COPY(pScreen, offman->InitialBoxes, FullRegion);
- REGION_COPY(pScreen, offman->FreeBoxes, FullRegion);
+ RegionCopy(offman->InitialBoxes, FullRegion);
+ RegionCopy(offman->FreeBoxes, FullRegion);
offman->pScreen = pScreen;
offman->UsedAreas = NULL;
@@ -1415,7 +1415,7 @@ xf86AllocateLinearOffscreenArea (
offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
xf86FBScreenKey);
- extents = REGION_EXTENTS(pScreen, offman->InitialBoxes);
+ extents = RegionExtents(offman->InitialBoxes);
w = extents->x2 - extents->x1;
if (gran > 1) {
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index efed677af..36e325f6a 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -322,9 +322,9 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor)
pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr;
if(pPriv) {
if(pPriv->clientClip)
- REGION_DESTROY(pAdaptor->pScreen, pPriv->clientClip);
+ RegionDestroy(pPriv->clientClip);
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
- REGION_DESTROY(pAdaptor->pScreen, pPriv->pCompositeClip);
+ RegionDestroy(pPriv->pCompositeClip);
free(pPriv);
}
}
@@ -658,18 +658,18 @@ xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv)
return;
}
- pCompositeClip = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, pCompositeClip, portPriv->clientClip);
- REGION_TRANSLATE(pScreen, pCompositeClip,
+ pCompositeClip = RegionCreate(NullBox, 1);
+ RegionCopy(pCompositeClip, portPriv->clientClip);
+ RegionTranslate(pCompositeClip,
portPriv->pDraw->x + portPriv->clipOrg.x,
portPriv->pDraw->y + portPriv->clipOrg.y);
- REGION_INTERSECT(pScreen, pCompositeClip, pregWin, pCompositeClip);
+ RegionIntersect(pCompositeClip, pregWin, pCompositeClip);
portPriv->pCompositeClip = pCompositeClip;
portPriv->FreeCompositeClip = TRUE;
if(freeCompClip) {
- REGION_DESTROY(pScreen, pregWin);
+ RegionDestroy(pregWin);
}
}
@@ -684,17 +684,17 @@ xf86XVCopyClip(
/* copy the new clip if it exists */
if((pGC->clientClipType == CT_REGION) && pGC->clientClip) {
if(!portPriv->clientClip)
- portPriv->clientClip = REGION_CREATE(pScreen, NullBox, 1);
+ portPriv->clientClip = RegionCreate(NullBox, 1);
/* Note: this is in window coordinates */
- REGION_COPY(pScreen, portPriv->clientClip, pGC->clientClip);
+ RegionCopy(portPriv->clientClip, pGC->clientClip);
} else if(portPriv->clientClip) { /* free the old clientClip */
- REGION_DESTROY(pScreen, portPriv->clientClip);
+ RegionDestroy(portPriv->clientClip);
portPriv->clientClip = NULL;
}
/* get rid of the old clip list */
if(portPriv->pCompositeClip && portPriv->FreeCompositeClip) {
- REGION_DESTROY(pScreen, portPriv->pCompositeClip);
+ RegionDestroy(portPriv->pCompositeClip);
}
portPriv->clipOrg = pGC->clipOrg;
@@ -723,18 +723,18 @@ xf86XVRegetVideo(XvPortRecPrivatePtr portPriv)
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
/* clip to the window composite clip */
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_NULL(pScreen, &ClipRegion);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionNull(&ClipRegion);
+ RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip);
/* that's all if it's totally obscured */
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto CLIP_VIDEO_BAILOUT;
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->GetVideo)(portPriv->pScrn,
@@ -760,8 +760,8 @@ CLIP_VIDEO_BAILOUT:
if(!portPriv->FreeCompositeClip)
portPriv->pCompositeClip = NULL;
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -788,9 +788,9 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv)
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
/* clip to the window composite clip */
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_NULL(pScreen, &ClipRegion);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionNull(&ClipRegion);
+ RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip);
/* clip and translate to the viewport */
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
@@ -802,21 +802,21 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv)
VPBox.x2 = portPriv->pScrn->frameX1 + 1;
VPBox.y2 = portPriv->pScrn->frameY1 + 1;
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
- REGION_UNINIT(pScreen, &VPReg);
+ RegionInit(&VPReg, &VPBox, 1);
+ RegionIntersect(&ClipRegion, &ClipRegion, &VPReg);
+ RegionUninit(&VPReg);
}
/* that's all if it's totally obscured */
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto CLIP_VIDEO_BAILOUT;
}
/* bailout if we have to clip but the hardware doesn't support it */
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
- BoxPtr clipBox = REGION_RECTS(&ClipRegion);
- if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
+ BoxPtr clipBox = RegionRects(&ClipRegion);
+ if( (RegionNumRects(&ClipRegion) != 1) ||
(clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
@@ -826,7 +826,7 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv)
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->PutVideo)(portPriv->pScrn,
@@ -851,8 +851,8 @@ CLIP_VIDEO_BAILOUT:
if(!portPriv->FreeCompositeClip)
portPriv->pCompositeClip = NULL;
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -878,9 +878,9 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
/* clip to the window composite clip */
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_NULL(pScreen, &ClipRegion);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionNull(&ClipRegion);
+ RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip);
/* clip and translate to the viewport */
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
@@ -892,21 +892,21 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
VPBox.x2 = portPriv->pScrn->frameX1 + 1;
VPBox.y2 = portPriv->pScrn->frameY1 + 1;
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
- REGION_UNINIT(pScreen, &VPReg);
+ RegionInit(&VPReg, &VPBox, 1);
+ RegionIntersect(&ClipRegion, &ClipRegion, &VPReg);
+ RegionUninit(&VPReg);
}
/* that's all if it's totally obscured */
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto CLIP_VIDEO_BAILOUT;
}
/* bailout if we have to clip but the hardware doesn't support it */
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
- BoxPtr clipBox = REGION_RECTS(&ClipRegion);
- if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
+ BoxPtr clipBox = RegionRects(&ClipRegion);
+ if( (RegionNumRects(&ClipRegion) != 1) ||
(clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
@@ -916,7 +916,7 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->ReputImage)(portPriv->pScrn,
@@ -938,8 +938,8 @@ CLIP_VIDEO_BAILOUT:
if(!portPriv->FreeCompositeClip)
portPriv->pCompositeClip = NULL;
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -1060,7 +1060,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
XvPortRecPrivatePtr pPriv;
Bool AreasExposed;
- AreasExposed = (WinPriv && reg1 && REGION_NOTEMPTY(pScreen, reg1));
+ AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1));
pScreen->WindowExposures = ScreenPriv->WindowExposures;
(*pScreen->WindowExposures)(pWin, reg1, reg2);
@@ -1131,7 +1131,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
if(!pPriv) goto next;
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
- REGION_DESTROY(pScreen, pPriv->pCompositeClip);
+ RegionDestroy(pPriv->pCompositeClip);
pPriv->pCompositeClip = NULL;
@@ -1268,7 +1268,7 @@ xf86XVLeaveVT(int index, int flags)
pPriv->isOn = XV_OFF;
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
- REGION_DESTROY(pScreen, pPriv->pCompositeClip);
+ RegionDestroy(pPriv->pCompositeClip);
pPriv->pCompositeClip = NULL;
@@ -1309,7 +1309,7 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
if(!pPriv->type && (pPriv->isOn != XV_OFF)) { /* overlaid still/image */
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
- REGION_DESTROY(pScreen, pPriv->pCompositeClip);
+ RegionDestroy(pPriv->pCompositeClip);
pPriv->pCompositeClip = NULL;
@@ -1432,9 +1432,9 @@ xf86XVPutStill(
WinBox.x2 = WinBox.x1 + drw_w;
WinBox.y2 = WinBox.y1 + drw_h;
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_NULL(pScreen, &ClipRegion);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionNull(&ClipRegion);
+ RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip);
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
RegionRec VPReg;
@@ -1445,23 +1445,23 @@ xf86XVPutStill(
VPBox.x2 = portPriv->pScrn->frameX1 + 1;
VPBox.y2 = portPriv->pScrn->frameY1 + 1;
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
- REGION_UNINIT(pScreen, &VPReg);
+ RegionInit(&VPReg, &VPBox, 1);
+ RegionIntersect(&ClipRegion, &ClipRegion, &VPReg);
+ RegionUninit(&VPReg);
}
if(portPriv->pDraw) {
xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
}
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto PUT_STILL_BAILOUT;
}
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
- BoxPtr clipBox = REGION_RECTS(&ClipRegion);
- if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
+ BoxPtr clipBox = RegionRects(&ClipRegion);
+ if( (RegionNumRects(&ClipRegion) != 1) ||
(clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
@@ -1471,7 +1471,7 @@ xf86XVPutStill(
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->PutStill)(portPriv->pScrn,
@@ -1500,8 +1500,8 @@ PUT_STILL_BAILOUT:
portPriv->isOn = XV_PENDING;
}
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -1584,21 +1584,21 @@ xf86XVGetStill(
WinBox.x2 = WinBox.x1 + drw_w;
WinBox.y2 = WinBox.y1 + drw_h;
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_NULL(pScreen, &ClipRegion);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionNull(&ClipRegion);
+ RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip);
if(portPriv->pDraw) {
xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
}
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto GET_STILL_BAILOUT;
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->GetStill)(portPriv->pScrn,
@@ -1615,8 +1615,8 @@ GET_STILL_BAILOUT:
portPriv->isOn = XV_PENDING;
}
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -1732,9 +1732,9 @@ xf86XVPutImage(
WinBox.x2 = WinBox.x1 + drw_w;
WinBox.y2 = WinBox.y1 + drw_h;
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_NULL(pScreen, &ClipRegion);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
+ RegionInit(&WinRegion, &WinBox, 1);
+ RegionNull(&ClipRegion);
+ RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip);
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
RegionRec VPReg;
@@ -1745,9 +1745,9 @@ xf86XVPutImage(
VPBox.x2 = portPriv->pScrn->frameX1 + 1;
VPBox.y2 = portPriv->pScrn->frameY1 + 1;
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
- REGION_UNINIT(pScreen, &VPReg);
+ RegionInit(&VPReg, &VPBox, 1);
+ RegionIntersect(&ClipRegion, &ClipRegion, &VPReg);
+ RegionUninit(&VPReg);
}
/* If we are changing windows, unregister our port in the old window */
@@ -1758,14 +1758,14 @@ xf86XVPutImage(
ret = xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
if(ret != Success) goto PUT_IMAGE_BAILOUT;
- if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
+ if(!RegionNotEmpty(&ClipRegion)) {
clippedAway = TRUE;
goto PUT_IMAGE_BAILOUT;
}
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
- BoxPtr clipBox = REGION_RECTS(&ClipRegion);
- if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
+ BoxPtr clipBox = RegionRects(&ClipRegion);
+ if( (RegionNumRects(&ClipRegion) != 1) ||
(clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
@@ -1775,7 +1775,7 @@ xf86XVPutImage(
}
if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) {
- REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
+ RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion);
}
ret = (*portPriv->AdaptorRec->PutImage)(portPriv->pScrn,
@@ -1803,8 +1803,8 @@ PUT_IMAGE_BAILOUT:
portPriv->isOn = XV_PENDING;
}
- REGION_UNINIT(pScreen, &WinRegion);
- REGION_UNINIT(pScreen, &ClipRegion);
+ RegionUninit(&WinRegion);
+ RegionUninit(&ClipRegion);
return ret;
}
@@ -1834,8 +1834,8 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
WindowPtr pWin = (WindowPtr)pDraw;
XF86XVWindowPtr pPriv = GET_XF86XV_WINDOW(pWin);
GCPtr pGC = NULL;
- BoxPtr pbox = REGION_RECTS(clipboxes);
- int i, nbox = REGION_NUM_RECTS(clipboxes);
+ BoxPtr pbox = RegionRects(clipboxes);
+ int i, nbox = RegionNumRects(clipboxes);
xRectangle *rects;
if(!xf86Screens[pScreen->myNum]->vtSema) return;
@@ -1860,7 +1860,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
ValidateGC(pDraw, pGC);
}
- REGION_TRANSLATE(pDraw->pScreen, clipboxes, -pDraw->x, -pDraw->y);
+ RegionTranslate(clipboxes, -pDraw->x, -pDraw->y);
rects = malloc(nbox * sizeof(xRectangle));
@@ -1883,8 +1883,8 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
{
DrawablePtr root = &pScreen->root->drawable;
ChangeGCVal pval[2];
- BoxPtr pbox = REGION_RECTS(clipboxes);
- int i, nbox = REGION_NUM_RECTS(clipboxes);
+ BoxPtr pbox = RegionRects(clipboxes);
+ int i, nbox = RegionNumRects(clipboxes);
xRectangle *rects;
GCPtr gc;
@@ -1936,7 +1936,7 @@ xf86XVClipVideoHelper(
){
double xsw, xdw, ysw, ydw;
INT32 delta;
- BoxPtr extents = REGION_EXTENTS(DummyScreen, reg);
+ BoxPtr extents = RegionExtents(reg);
int diff;
xsw = (*xb - *xa) << 16;
@@ -1998,9 +1998,9 @@ xf86XVClipVideoHelper(
(dst->y1 > extents->y1) || (dst->y2 < extents->y2))
{
RegionRec clipReg;
- REGION_INIT(DummyScreen, &clipReg, dst, 1);
- REGION_INTERSECT(DummyScreen, reg, reg, &clipReg);
- REGION_UNINIT(DummyScreen, &clipReg);
+ RegionInit(&clipReg, dst, 1);
+ RegionIntersect(reg, reg, &clipReg);
+ RegionUninit(&clipReg);
}
return TRUE;
}
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index f7cea5ede..63c77ded6 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1157,7 +1157,7 @@ DRIDCNTreeTraversal(WindowPtr pWin, pointer data)
ScreenPtr pScreen = pWin->drawable.pScreen;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- if (REGION_NUM_RECTS(&pWin->clipList) > 0) {
+ if (RegionNumRects(&pWin->clipList) > 0) {
WindowPtr *pDRIWindows = (WindowPtr*)data;
int i = 0;
@@ -1269,7 +1269,7 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable,
pDRIDrawablePriv->pScreen = pScreen;
pDRIDrawablePriv->refCount = 1;
pDRIDrawablePriv->drawableIndex = -1;
- pDRIDrawablePriv->nrects = REGION_NUM_RECTS(&pWin->clipList);
+ pDRIDrawablePriv->nrects = RegionNumRects(&pWin->clipList);
/* save private off of preallocated index */
dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey,
@@ -1288,8 +1288,8 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable,
drmUpdateDrawableInfo(pDRIPriv->drmFD,
pDRIDrawablePriv->hwDrawable,
DRM_DRAWABLE_CLIPRECTS,
- REGION_NUM_RECTS(&pWin->clipList),
- REGION_RECTS(&pWin->clipList));
+ RegionNumRects(&pWin->clipList),
+ RegionRects(&pWin->clipList));
*hHWDrawable = pDRIDrawablePriv->hwDrawable;
}
}
@@ -1502,8 +1502,8 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
#endif
*W = (int)(pWin->drawable.width);
*H = (int)(pWin->drawable.height);
- *numClipRects = REGION_NUM_RECTS(&pWin->clipList);
- *pClipRects = (drm_clip_rect_t *)REGION_RECTS(&pWin->clipList);
+ *numClipRects = RegionNumRects(&pWin->clipList);
+ *pClipRects = (drm_clip_rect_t *)RegionRects(&pWin->clipList);
if (!*numClipRects && pDRIPriv->fullscreen) {
/* use fake full-screen clip rect */
@@ -1883,10 +1883,10 @@ DRITreeTraversal(WindowPtr pWin, pointer data)
ScreenPtr pScreen = pWin->drawable.pScreen;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- if(REGION_NUM_RECTS(&(pWin->clipList)) > 0) {
+ if(RegionNumRects(&(pWin->clipList)) > 0) {
RegionPtr reg = (RegionPtr)data;
- REGION_UNION(pScreen, reg, reg, &(pWin->clipList));
+ RegionUnion(reg, reg, &(pWin->clipList));
pDRIPriv->nrWalked++;
}
@@ -1932,21 +1932,21 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
if(pDRIPriv->nrWindowsVisible > 0) {
RegionRec reg;
- REGION_NULL(pScreen, &reg);
+ RegionNull(&reg);
pDRIPriv->nrWalked = 0;
TraverseTree(pWin, DRITreeTraversal, (pointer)(&reg));
- if(REGION_NOTEMPTY(pScreen, &reg)) {
- REGION_TRANSLATE(pScreen, &reg, ptOldOrg.x - pWin->drawable.x,
+ if(RegionNotEmpty(&reg)) {
+ RegionTranslate(&reg, ptOldOrg.x - pWin->drawable.x,
ptOldOrg.y - pWin->drawable.y);
- REGION_INTERSECT(pScreen, &reg, &reg, prgnSrc);
+ RegionIntersect(&reg, &reg, prgnSrc);
/* The MoveBuffers interface is not ideal */
(*pDRIPriv->pDriverInfo->MoveBuffers)(pWin, ptOldOrg, &reg,
pDRIPriv->pDriverInfo->ddxDrawableTableEntry);
}
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
}
/* call lower wrapped functions */
@@ -2122,7 +2122,7 @@ DRIClipNotify(WindowPtr pWin, int dx, int dy)
if(!pDRIPriv) return;
if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) {
- int nrects = REGION_NUM_RECTS(&pWin->clipList);
+ int nrects = RegionNumRects(&pWin->clipList);
if(!pDRIPriv->windowsTouched) {
DRILockTree(pScreen);
@@ -2143,7 +2143,7 @@ DRIClipNotify(WindowPtr pWin, int dx, int dy)
drmUpdateDrawableInfo(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable,
DRM_DRAWABLE_CLIPRECTS,
- nrects, REGION_RECTS(&pWin->clipList));
+ nrects, RegionRects(&pWin->clipList));
}
/* call lower wrapped functions */
@@ -2368,9 +2368,9 @@ DRIMoveBuffersHelper(
BoxRec tmpBox;
int y, nbox;
- extents = REGION_EXTENTS(pScreen, reg);
- nbox = REGION_NUM_RECTS(reg);
- pbox = REGION_RECTS(reg);
+ extents = RegionExtents(reg);
+ nbox = RegionNumRects(reg);
+ pbox = RegionRects(reg);
if((dy > 0) && (dy < (extents->y2 - extents->y1))) {
*ydir = -1;
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 45a8271a0..3c8d3a82d 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -461,7 +461,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
box.y1 = 0;
box.x2 = pPriv->width;
box.y2 = pPriv->height;
- REGION_INIT(pDraw->pScreen, &region, &box, 0);
+ RegionInit(&region, &box, 0);
DRI2CopyRegion(pDraw, &region, DRI2BufferFakeFrontLeft,
DRI2BufferFrontLeft);
@@ -614,7 +614,7 @@ DRI2CanFlip(DrawablePtr pDraw)
pWinPixmap = pScreen->GetWindowPixmap(pWin);
if (pRootPixmap != pWinPixmap)
return FALSE;
- if (!REGION_EQUAL(pScreen, &pWin->clipList, &pRoot->winSize))
+ if (!RegionEqual(&pWin->clipList, &pRoot->winSize))
return FALSE;
return TRUE;
@@ -710,7 +710,7 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame,
box.y1 = 0;
box.x2 = pDraw->width;
box.y2 = pDraw->height;
- REGION_INIT(pScreen, &region, &box, 0);
+ RegionInit(&region, &box, 0);
DRI2CopyRegion(pDraw, &region, DRI2BufferFakeFrontLeft,
DRI2BufferFrontLeft);
@@ -782,7 +782,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
box.y1 = 0;
box.x2 = pDraw->width;
box.y2 = pDraw->height;
- REGION_INIT(pScreen, &region, &box, 0);
+ RegionInit(&region, &box, 0);
pPriv->swapsPending++;
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 065ba480c..60003d502 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -3155,9 +3155,9 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
&crtc_box);
if (crtc) {
- REGION_INIT (pScreen, &crtc_region_local, &crtc_box, 1);
+ RegionInit(&crtc_region_local, &crtc_box, 1);
crtc_region = &crtc_region_local;
- REGION_INTERSECT (pScreen, crtc_region, crtc_region, reg);
+ RegionIntersect(crtc_region, crtc_region, reg);
}
*crtc_ret = crtc;
}
@@ -3166,7 +3166,7 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
crtc_region, width, height);
if (crtc_region != reg)
- REGION_UNINIT (pScreen, &crtc_region_local);
+ RegionUninit(&crtc_region_local);
return ret;
}
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index e3683a8ed..4cc99ad21 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -81,8 +81,8 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
PictFormatPtr format = compWindowFormat (screen->root);
int error;
PicturePtr src, dst;
- int n = REGION_NUM_RECTS(region);
- BoxPtr b = REGION_RECTS(region);
+ int n = RegionNumRects(region);
+ BoxPtr b = RegionRects(region);
XID include_inferiors = IncludeInferiors;
src = CreatePicture (None,
@@ -167,10 +167,10 @@ xf86CrtcDamageShadow (xf86CrtcPtr crtc)
if (damage_box.y1 < 0) damage_box.y1 = 0;
if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width;
if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height;
- REGION_INIT (pScreen, &damage_region, &damage_box, 1);
+ RegionInit(&damage_region, &damage_box, 1);
DamageRegionAppend (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
&damage_region);
- REGION_UNINIT (pScreen, &damage_region);
+ RegionUninit(&damage_region);
crtc->shadowClear = TRUE;
}
@@ -217,7 +217,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
return FALSE;
xf86RotatePrepare (pScreen);
region = DamageRegion(damage);
- if (REGION_NOTEMPTY(pScreen, region))
+ if (RegionNotEmpty(region))
{
int c;
SourceValidateProcPtr SourceValidate;
@@ -240,14 +240,14 @@ xf86RotateRedisplay(ScreenPtr pScreen)
RegionRec crtc_damage;
/* compute portion of damage that overlaps crtc */
- REGION_INIT(pScreen, &crtc_damage, &crtc->bounds, 1);
- REGION_INTERSECT (pScreen, &crtc_damage, &crtc_damage, region);
+ RegionInit(&crtc_damage, &crtc->bounds, 1);
+ RegionIntersect(&crtc_damage, &crtc_damage, region);
/* update damaged region */
- if (REGION_NOTEMPTY(pScreen, &crtc_damage))
+ if (RegionNotEmpty(&crtc_damage))
xf86RotateCrtcRedisplay (crtc, &crtc_damage);
- REGION_UNINIT (pScreen, &crtc_damage);
+ RegionUninit(&crtc_damage);
}
}
pScreen->SourceValidate = SourceValidate;
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index fd5f26c0e..a0e4b9e36 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -272,18 +272,18 @@ ShadowCopyWindow(
RegionRec rgnDst;
if (pPriv->vtSema) {
- REGION_NULL(pWin->drawable.pScreen, &rgnDst);
- REGION_COPY(pWin->drawable.pScreen, &rgnDst, prgn);
+ RegionNull(&rgnDst);
+ RegionCopy(&rgnDst, prgn);
- REGION_TRANSLATE(pWin->drawable.pScreen, &rgnDst,
+ RegionTranslate(&rgnDst,
pWin->drawable.x - ptOldOrg.x,
pWin->drawable.y - ptOldOrg.y);
- REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, &rgnDst);
- if ((num = REGION_NUM_RECTS(&rgnDst))) {
+ RegionIntersect(&rgnDst, &pWin->borderClip, &rgnDst);
+ if ((num = RegionNumRects(&rgnDst))) {
if(pPriv->preRefresh)
- (*pPriv->preRefresh)(pPriv->pScrn, num, REGION_RECTS(&rgnDst));
+ (*pPriv->preRefresh)(pPriv->pScrn, num, RegionRects(&rgnDst));
} else {
- REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
}
}
@@ -293,8 +293,8 @@ ShadowCopyWindow(
if (num) {
if (pPriv->postRefresh)
- (*pPriv->postRefresh)(pPriv->pScrn, num, REGION_RECTS(&rgnDst));
- REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
+ (*pPriv->postRefresh)(pPriv->pScrn, num, RegionRects(&rgnDst));
+ RegionUninit(&rgnDst);
}
}
@@ -1353,37 +1353,37 @@ ShadowFontToBox(BoxPtr BB, DrawablePtr pDrawable, GCPtr pGC, int x, int y,
}
right += pFont->info.maxbounds.rightSideBearing;
BB->x1 =
- max(pDrawable->x + x - left, (REGION_EXTENTS(pGC->pScreen,
+ max(pDrawable->x + x - left, (RegionExtents(
&((WindowPtr) pDrawable)->winSize))->x1);
BB->y1 =
max(pDrawable->y + y - ascent,
- (REGION_EXTENTS(pGC->pScreen,
+ (RegionExtents(
&((WindowPtr) pDrawable)->winSize))->y1);
BB->x2 =
min(pDrawable->x + x + right,
- (REGION_EXTENTS(pGC->pScreen,
+ (RegionExtents(
&((WindowPtr) pDrawable)->winSize))->x2);
BB->y2 =
min(pDrawable->y + y + descent,
- (REGION_EXTENTS(pGC->pScreen,
+ (RegionExtents(
&((WindowPtr) pDrawable)->winSize))->y2);
} else {
ShadowTextExtent(pFont, count, chars, wide ? (FONTLASTROW(pFont) == 0)
? Linear16Bit : TwoD16Bit : Linear8Bit, BB);
BB->x1 =
- max(pDrawable->x + x + BB->x1, (REGION_EXTENTS(pGC->pScreen,
+ max(pDrawable->x + x + BB->x1, (RegionExtents(
&((WindowPtr) pDrawable)->winSize))->x1);
BB->y1 =
max(pDrawable->y + y + BB->y1,
- (REGION_EXTENTS(pGC->pScreen,
+ (RegionExtents(
&((WindowPtr) pDrawable)->winSize))->y1);
BB->x2 =
min(pDrawable->x + x + BB->x2,
- (REGION_EXTENTS(pGC->pScreen,
+ (RegionExtents(
&((WindowPtr) pDrawable)->winSize))->x2);
BB->y2 =
min(pDrawable->y + y + BB->y2,
- (REGION_EXTENTS(pGC->pScreen,
+ (RegionExtents(
&((WindowPtr) pDrawable)->winSize))->y2);
}
}
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(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
if(!nbox)
return TRUE;
@@ -298,7 +298,7 @@ XAADoComposite (
}
/* WriteBitmap sets the Sync flag */
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
@@ -340,11 +340,11 @@ XAADoComposite (
width, height))
return TRUE;
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
if(!nbox) {
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
@@ -355,7 +355,7 @@ XAADoComposite (
((PixmapPtr)(pMask->pDrawable))->devKind,
w, h, flags))
{
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return FALSE;
}
@@ -371,7 +371,7 @@ XAADoComposite (
}
SET_SYNC_FLAG(infoRec);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
} else {
@@ -409,11 +409,11 @@ XAADoComposite (
width, height))
return TRUE;
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
if(!nbox) {
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
@@ -423,7 +423,7 @@ XAADoComposite (
((PixmapPtr)(pSrc->pDrawable))->devKind,
w, h, flags))
{
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return FALSE;
}
@@ -440,7 +440,7 @@ XAADoComposite (
}
SET_SYNC_FLAG(infoRec);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
@@ -476,16 +476,16 @@ XAACompositeSrcCopy (PicturePtr pSrc,
width, height))
return;
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
if(!nbox) {
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return;
}
pptSrc = malloc(sizeof(DDXPointRec) * nbox);
if (!pptSrc) {
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return;
}
xoff = xSrc - xDst;
@@ -502,7 +502,7 @@ XAACompositeSrcCopy (PicturePtr pSrc,
pptSrc);
free(pptSrc);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
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
diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index 277718ba3..194ec630a 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -93,7 +93,7 @@ xnestCollectExposures(void)
Box.x2 = Box.x1 + X.xexpose.width;
Box.y2 = Box.y1 + X.xexpose.height;
- REGION_INIT(pWin->drawable.pScreen, &Rgn, &Box, 1);
+ RegionInit(&Rgn, &Box, 1);
miSendExposures(pWin, &Rgn, Box.x2, Box.y2);
}
diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c
index 4082bfc57..2cd555c58 100644
--- a/hw/xnest/GC.c
+++ b/hw/xnest/GC.c
@@ -210,10 +210,10 @@ xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects)
break;
case CT_REGION:
- nRects = REGION_NUM_RECTS((RegionPtr)pValue);
+ nRects = RegionNumRects((RegionPtr)pValue);
size = nRects * sizeof(*pRects);
pRects = (XRectangle *) malloc(size);
- pBox = REGION_RECTS((RegionPtr)pValue);
+ pBox = RegionRects((RegionPtr)pValue);
for (i = nRects; i-- > 0; ) {
pRects[i].x = pBox[i].x1;
pRects[i].y = pBox[i].y1;
@@ -277,7 +277,7 @@ xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects)
* other parts of server can only deal with CT_NONE,
* CT_PIXMAP and CT_REGION client clips.
*/
- pGC->clientClip = (pointer) RECTS_TO_REGION(pGC->pScreen, nRects,
+ pGC->clientClip = (pointer) RegionFromRects(nRects,
(xRectangle *)pValue, type);
free(pValue);
pValue = pGC->clientClip;
@@ -313,7 +313,7 @@ xnestDestroyClipHelper(GCPtr pGC)
break;
case CT_REGION:
- REGION_DESTROY(pGC->pScreen, pGC->clientClip);
+ RegionDestroy(pGC->clientClip);
break;
}
}
@@ -331,8 +331,8 @@ xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc)
break;
case CT_REGION:
- pRgn = REGION_CREATE(pGCDst->pScreen, NULL, 1);
- REGION_COPY(pGCDst->pScreen, pRgn, pGCSrc->clientClip);
+ pRgn = RegionCreate(NULL, 1);
+ RegionCopy(pRgn, pGCSrc->clientClip);
xnestChangeClip(pGCDst, CT_REGION, pRgn, 0);
break;
}
diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c
index ad9668ec1..6b76fc28b 100644
--- a/hw/xnest/GCOps.c
+++ b/hw/xnest/GCOps.c
@@ -131,8 +131,8 @@ xnestBitBlitHelper(GCPtr pGC)
BoxRec Box;
Bool pending, overlap;
- pReg = REGION_CREATE(pGC->pScreen, NULL, 1);
- pTmpReg = REGION_CREATE(pGC->pScreen, NULL, 1);
+ pReg = RegionCreate(NULL, 1);
+ pTmpReg = RegionCreate(NULL, 1);
if(!pReg || !pTmpReg) return NullRegion;
pending = True;
@@ -149,15 +149,15 @@ xnestBitBlitHelper(GCPtr pGC)
Box.y1 = event.xgraphicsexpose.y;
Box.x2 = event.xgraphicsexpose.x + event.xgraphicsexpose.width;
Box.y2 = event.xgraphicsexpose.y + event.xgraphicsexpose.height;
- REGION_RESET(pGC->pScreen, pTmpReg, &Box);
- REGION_APPEND(pGC->pScreen, pReg, pTmpReg);
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
pending = event.xgraphicsexpose.count;
break;
}
}
- REGION_DESTROY(pGC->pScreen, pTmpReg);
- REGION_VALIDATE(pGC->pScreen, pReg, &overlap);
+ RegionDestroy(pTmpReg);
+ RegionValidate(pReg, &overlap);
return(pReg);
}
}
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index 583f877f3..bf0648088 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -97,8 +97,8 @@ xnestPixmapToRegion(PixmapPtr pPixmap)
pPixmap->drawable.width, pPixmap->drawable.height,
1, XYPixmap);
- pReg = REGION_CREATE(pPixmap->drawable.pScreen, NULL, 1);
- pTmpReg = REGION_CREATE(pPixmap->drawable.pScreen, NULL, 1);
+ pReg = RegionCreate(NULL, 1);
+ pTmpReg = RegionCreate(NULL, 1);
if(!pReg || !pTmpReg) {
XDestroyImage(ximage);
return NullRegion;
@@ -118,8 +118,8 @@ xnestPixmapToRegion(PixmapPtr pPixmap)
else if (currentPixel == 0L) {
/* right edge */
Box.x2 = x;
- REGION_RESET(pPixmap->drawable.pScreen, pTmpReg, &Box);
- REGION_APPEND(pPixmap->drawable.pScreen, pReg, pTmpReg);
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
}
previousPixel = currentPixel;
}
@@ -127,15 +127,15 @@ xnestPixmapToRegion(PixmapPtr pPixmap)
if (previousPixel != 0L) {
/* right edge because of the end of pixmap */
Box.x2 = pPixmap->drawable.width;
- REGION_RESET(pPixmap->drawable.pScreen, pTmpReg, &Box);
- REGION_APPEND(pPixmap->drawable.pScreen, pReg, pTmpReg);
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
}
}
- REGION_DESTROY(pPixmap->drawable.pScreen, pTmpReg);
+ RegionDestroy(pTmpReg);
XDestroyImage(ximage);
- REGION_VALIDATE(pPixmap->drawable.pScreen, pReg, &overlap);
+ RegionValidate(pReg, &overlap);
return(pReg);
}
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index 11d53694e..fab2f3981 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -135,9 +135,9 @@ xnestCreateWindow(WindowPtr pWin)
if (pWin->nextSib)
xnestWindowPriv(pWin->nextSib)->sibling_above = xnestWindow(pWin);
xnestWindowPriv(pWin)->bounding_shape =
- REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
+ RegionCreate(NULL, 1);
xnestWindowPriv(pWin)->clip_shape =
- REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
+ RegionCreate(NULL, 1);
if (!pWin->parent) /* only the root window will have the right colormap */
xnestSetInstalledColormapWindows(pWin->drawable.pScreen);
@@ -151,9 +151,9 @@ xnestDestroyWindow(WindowPtr pWin)
if (pWin->nextSib)
xnestWindowPriv(pWin->nextSib)->sibling_above =
xnestWindowPriv(pWin)->sibling_above;
- REGION_DESTROY(pWin->drawable.pScreen,
+ RegionDestroy(
xnestWindowPriv(pWin)->bounding_shape);
- REGION_DESTROY(pWin->drawable.pScreen,
+ RegionDestroy(
xnestWindowPriv(pWin)->clip_shape);
XDestroyWindow(xnestDisplay, xnestWindow(pWin));
xnestWindowPriv(pWin)->window = None;
@@ -415,7 +415,7 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed)
event.xexpose.type = ProcessedExpose;
- if (RECT_IN_REGION(pWin->drawable.pScreen, pRgn, &Box) != rgnIN)
+ if (RegionContainsRect(pRgn, &Box) != rgnIN)
XPutBackEvent(xnestDisplay, &event);
}
@@ -439,11 +439,11 @@ xnestRegionEqual(RegionPtr pReg1, RegionPtr pReg2)
if (pReg1 == NullRegion || pReg2 == NullRegion) return False;
- pBox1 = REGION_RECTS(pReg1);
- n1 = REGION_NUM_RECTS(pReg1);
+ pBox1 = RegionRects(pReg1);
+ n1 = RegionNumRects(pReg1);
- pBox2 = REGION_RECTS(pReg2);
- n2 = REGION_NUM_RECTS(pReg2);
+ pBox2 = RegionRects(pReg2);
+ n2 = RegionNumRects(pReg2);
if (n1 != n2) return False;
@@ -466,13 +466,13 @@ xnestShapeWindow(WindowPtr pWin)
wBoundingShape(pWin))) {
if (wBoundingShape(pWin)) {
- REGION_COPY(pWin->drawable.pScreen,
+ RegionCopy(
xnestWindowPriv(pWin)->bounding_shape, wBoundingShape(pWin));
reg = XCreateRegion();
- pBox = REGION_RECTS(xnestWindowPriv(pWin)->bounding_shape);
+ pBox = RegionRects(xnestWindowPriv(pWin)->bounding_shape);
for (i = 0;
- i < REGION_NUM_RECTS(xnestWindowPriv(pWin)->bounding_shape);
+ i < RegionNumRects(xnestWindowPriv(pWin)->bounding_shape);
i++) {
rect.x = pBox[i].x1;
rect.y = pBox[i].y1;
@@ -485,7 +485,7 @@ xnestShapeWindow(WindowPtr pWin)
XDestroyRegion(reg);
}
else {
- REGION_EMPTY(pWin->drawable.pScreen,
+ RegionEmpty(
xnestWindowPriv(pWin)->bounding_shape);
XShapeCombineMask(xnestDisplay, xnestWindow(pWin),
@@ -497,13 +497,13 @@ xnestShapeWindow(WindowPtr pWin)
wClipShape(pWin))) {
if (wClipShape(pWin)) {
- REGION_COPY(pWin->drawable.pScreen,
+ RegionCopy(
xnestWindowPriv(pWin)->clip_shape, wClipShape(pWin));
reg = XCreateRegion();
- pBox = REGION_RECTS(xnestWindowPriv(pWin)->clip_shape);
+ pBox = RegionRects(xnestWindowPriv(pWin)->clip_shape);
for (i = 0;
- i < REGION_NUM_RECTS(xnestWindowPriv(pWin)->clip_shape);
+ i < RegionNumRects(xnestWindowPriv(pWin)->clip_shape);
i++) {
rect.x = pBox[i].x1;
rect.y = pBox[i].y1;
@@ -516,7 +516,7 @@ xnestShapeWindow(WindowPtr pWin)
XDestroyRegion(reg);
}
else {
- REGION_EMPTY(pWin->drawable.pScreen,
+ RegionEmpty(
xnestWindowPriv(pWin)->clip_shape);
XShapeCombineMask(xnestDisplay, xnestWindow(pWin),
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 7453eccdf..1d99d36bf 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -817,8 +817,8 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
{
RegionPtr borderVisible;
- borderVisible = REGION_CREATE(pScreen, NullBox, 1);
- REGION_SUBTRACT(pScreen, borderVisible,
+ borderVisible = RegionCreate(NullBox, 1);
+ RegionSubtract(borderVisible,
&pWin->borderClip, &pWin->winSize);
pWin->valdata->before.borderVisible = borderVisible;
}
@@ -837,13 +837,13 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_RESET(pScreen, &pWin->borderClip, &box);
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionReset(&pWin->borderClip, &box);
+ RegionBreak(&pWin->clipList);
}
else
{
- REGION_EMPTY(pScreen, &pWin->borderClip);
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionEmpty(&pWin->borderClip);
+ RegionBreak(&pWin->clipList);
}
ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
@@ -852,8 +852,8 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
{
if (pWin->backStorage)
{
- pOldClip = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, pOldClip, &pWin->clipList);
+ pOldClip = RegionCreate(NullBox, 1);
+ RegionCopy(pOldClip, &pWin->clipList);
}
if (pWin->firstChild)
@@ -882,7 +882,7 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
(pWin, 0, 0, pOldClip,
pWin->drawable.x, pWin->drawable.y);
if (WasViewable)
- REGION_DESTROY(pScreen, pOldClip);
+ RegionDestroy(pOldClip);
if (bsExposed)
{
RegionPtr valExposed = NullRegion;
@@ -891,8 +891,8 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
valExposed = &pWin->valdata->after.exposed;
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
if (valExposed)
- REGION_EMPTY(pScreen, valExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionEmpty(valExposed);
+ RegionDestroy(bsExposed);
}
}
if (WasViewable)
diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c
index 3b14581d0..d9b2e0338 100644
--- a/hw/xquartz/xpr/dri.c
+++ b/hw/xquartz/xpr/dri.c
@@ -347,8 +347,8 @@ DRIUpdateSurface(DRIDrawablePrivPtr pDRIDrawablePriv, DrawablePtr pDraw)
wc.height = pWin->drawable.height + 2 * pWin->borderWidth;
wc.bit_gravity = XP_GRAVITY_NONE;
- wc.shape_nrects = REGION_NUM_RECTS(&pWin->clipList);
- wc.shape_rects = REGION_RECTS(&pWin->clipList);
+ wc.shape_nrects = RegionNumRects(&pWin->clipList);
+ wc.shape_rects = RegionRects(&pWin->clipList);
wc.shape_tx = - (pTopWin->drawable.x - pTopWin->borderWidth);
wc.shape_ty = - (pTopWin->drawable.y - pTopWin->borderWidth);
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index 6dc2c87fa..9f5d8a637 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -163,8 +163,8 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
if (pShape != NULL)
{
- wc.shape_nrects = REGION_NUM_RECTS(pShape);
- wc.shape_rects = REGION_RECTS(pShape);
+ wc.shape_nrects = RegionNumRects(pShape);
+ wc.shape_rects = RegionRects(pShape);
wc.shape_tx = wc.shape_ty = 0;
mask |= XP_SHAPE;
}
@@ -306,8 +306,8 @@ xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
if (pShape != NULL)
{
- wc.shape_nrects = REGION_NUM_RECTS(pShape);
- wc.shape_rects = REGION_RECTS(pShape);
+ wc.shape_nrects = RegionNumRects(pShape);
+ wc.shape_rects = RegionRects(pShape);
}
else
{
diff --git a/hw/xwin/winfillsp.c b/hw/xwin/winfillsp.c
index 702f34f96..1e8e3e6f1 100644
--- a/hw/xwin/winfillsp.c
+++ b/hw/xwin/winfillsp.c
@@ -80,8 +80,8 @@ winFillSpansNativeGDI (DrawablePtr pDrawable,
int fullX1, fullX2, fullY1;
HRGN hrgn = NULL, combined = NULL;
- nbox = REGION_NUM_RECTS (pClip);
- pbox = REGION_RECTS (pClip);
+ nbox = RegionNumRects (pClip);
+ pbox = RegionRects (pClip);
if (!nbox) return;
@@ -97,7 +97,7 @@ winFillSpansNativeGDI (DrawablePtr pDrawable,
pbox++;
}
- pextent = REGION_EXTENTS (pGC->pScreen, pClip);
+ pextent = RegionExtents(pClip);
extentX1 = pextent->x1;
extentY1 = pextent->y1;
extentX2 = pextent->x2;
diff --git a/hw/xwin/wingc.c b/hw/xwin/wingc.c
index 1f3775263..196b5b5dd 100644
--- a/hw/xwin/wingc.c
+++ b/hw/xwin/wingc.c
@@ -210,7 +210,7 @@ winDestroyGCNativeGDI (GCPtr pGC)
winScreenPriv(pGC->pScreen);
if (pGC->freeCompClip)
- REGION_DESTROY (pGC->pScreen, pGC->pCompositeClip);
+ RegionDestroy(pGC->pCompositeClip);
/* Free the memory DC */
if (pGCPriv->hdcMem != NULL)
diff --git a/hw/xwin/winmultiwindowshape.c b/hw/xwin/winmultiwindowshape.c
index 597eab62c..9b4910b9c 100644
--- a/hw/xwin/winmultiwindowshape.c
+++ b/hw/xwin/winmultiwindowshape.c
@@ -117,15 +117,15 @@ winReshapeMultiWindow (WindowPtr pWin)
if (!wBoundingShape (pWin))
return;
- REGION_NULL(pWin->drawable.pScreen, &rrNewShape);
- REGION_COPY(pWin->drawable.pScreen, &rrNewShape, wBoundingShape(pWin));
- REGION_TRANSLATE(pWin->drawable.pScreen,
+ RegionNull(&rrNewShape);
+ RegionCopy(&rrNewShape, wBoundingShape(pWin));
+ RegionTranslate(
&rrNewShape,
pWin->borderWidth,
pWin->borderWidth);
- nRects = REGION_NUM_RECTS(&rrNewShape);
- pShape = REGION_RECTS(&rrNewShape);
+ nRects = RegionNumRects(&rrNewShape);
+ pShape = RegionRects(&rrNewShape);
/* Don't do anything if there are no rectangles in the region */
if (nRects > 0)
@@ -205,7 +205,7 @@ winReshapeMultiWindow (WindowPtr pWin)
pWinPriv->hRgn = hRgn;
}
- REGION_UNINIT(pWin->drawable.pScreen, &rrNewShape);
+ RegionUninit(&rrNewShape);
return;
}
diff --git a/hw/xwin/winsetsp.c b/hw/xwin/winsetsp.c
index f894d6cda..d1bf90b57 100644
--- a/hw/xwin/winsetsp.c
+++ b/hw/xwin/winsetsp.c
@@ -54,8 +54,8 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
int nbox;
BoxPtr pbox;
- nbox = REGION_NUM_RECTS (pGC->pCompositeClip);
- pbox = REGION_RECTS (pGC->pCompositeClip);
+ nbox = RegionNumRects (pGC->pCompositeClip);
+ pbox = RegionRects (pGC->pCompositeClip);
if (!nbox) return;
diff --git a/hw/xwin/winshaddd.c b/hw/xwin/winshaddd.c
index 85dc10f53..8dd1084e6 100644
--- a/hw/xwin/winshaddd.c
+++ b/hw/xwin/winshaddd.c
@@ -525,8 +525,8 @@ winShadowUpdateDD (ScreenPtr pScreen,
HRESULT ddrval = DD_OK;
RECT rcDest, rcSrc;
POINT ptOrigin;
- DWORD dwBox = REGION_NUM_RECTS (damage);
- BoxPtr pBox = REGION_RECTS (damage);
+ DWORD dwBox = RegionNumRects (damage);
+ BoxPtr pBox = RegionRects (damage);
HRGN hrgnTemp = NULL, hrgnCombined = NULL;
/*
@@ -588,7 +588,7 @@ winShadowUpdateDD (ScreenPtr pScreen,
}
else
{
- BoxPtr pBoxExtents = REGION_EXTENTS (pScreen, damage);
+ BoxPtr pBoxExtents = RegionExtents(damage);
/* Compute a GDI region from the damaged region */
hrgnCombined = CreateRectRgn (pBox->x1, pBox->y1, pBox->x2, pBox->y2);
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index e78fbd9e6..5ca3e4f62 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -601,8 +601,8 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
HRESULT ddrval = DD_OK;
RECT rcDest, rcSrc;
POINT ptOrigin;
- DWORD dwBox = REGION_NUM_RECTS (damage);
- BoxPtr pBox = REGION_RECTS (damage);
+ DWORD dwBox = RegionNumRects (damage);
+ BoxPtr pBox = RegionRects (damage);
HRGN hrgnTemp = NULL, hrgnCombined = NULL;
/*
@@ -677,7 +677,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
}
else
{
- BoxPtr pBoxExtents = REGION_EXTENTS (pScreen, damage);
+ BoxPtr pBoxExtents = RegionExtents(damage);
/* Compute a GDI region from the damaged region */
hrgnCombined = CreateRectRgn (pBox->x1, pBox->y1, pBox->x2, pBox->y2);
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index d38e4f76b..96d149c2b 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -499,8 +499,8 @@ winShadowUpdateGDI (ScreenPtr pScreen,
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
RegionPtr damage = shadowDamage(pBuf);
- DWORD dwBox = REGION_NUM_RECTS (damage);
- BoxPtr pBox = REGION_RECTS (damage);
+ DWORD dwBox = RegionNumRects (damage);
+ BoxPtr pBox = RegionRects (damage);
int x, y, w, h;
HRGN hrgnTemp = NULL, hrgnCombined = NULL;
#ifdef XWIN_UPDATESTATS
@@ -508,7 +508,7 @@ winShadowUpdateGDI (ScreenPtr pScreen,
static DWORD s_dwTotalUpdates = 0;
static DWORD s_dwTotalBoxes = 0;
#endif
- BoxPtr pBoxExtents = REGION_EXTENTS (pScreen, damage);
+ BoxPtr pBoxExtents = RegionExtents(damage);
/*
* Return immediately if the app is not active
diff --git a/hw/xwin/winvideo.c b/hw/xwin/winvideo.c
index 4cdb3c485..0438e5f54 100755
--- a/hw/xwin/winvideo.c
+++ b/hw/xwin/winvideo.c
@@ -185,7 +185,7 @@ winSetupImageVideo (ScreenPtr pScreen)
#if 0
/* gotta uninit this someplace */
- REGION_NULL(pScreen, &pPriv->clip);
+ RegionNull(&pPriv->clip);
#endif
#if 0
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index c225a4495..9749861fd 100755
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -150,8 +150,8 @@ winMWExtWMCreateRgnFromRegion (RegionPtr pShape)
if (pShape == NULL) return NULL;
- nRects = REGION_NUM_RECTS(pShape);
- pRects = REGION_RECTS(pShape);
+ nRects = RegionNumRects(pShape);
+ pRects = RegionRects(pShape);
hRgn = CreateRectRgn (0, 0, 0, 0);
if (hRgn == NULL)
diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c
index 9348d5c1c..bc0614dc1 100644
--- a/hw/xwin/winwindow.c
+++ b/hw/xwin/winwindow.c
@@ -147,22 +147,22 @@ winCopyWindowNativeGDI (WindowPtr pWin,
pwinRoot = pWin->drawable.pScreen->root;
/* Create a region for the destination */
- prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
+ prgnDst = RegionCreate(NULL, 1);
/* Calculate the shift from the source to the destination */
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
/* Translate the region from the destination to the source? */
- REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
- REGION_INTERSECT(pWin->drawable.pScreen, prgnDst, &pWin->borderClip,
+ RegionTranslate(prgnSrc, -dx, -dy);
+ RegionIntersect(prgnDst, &pWin->borderClip,
prgnSrc);
/* Get a pointer to the first box in the region to be copied */
- pBox = REGION_RECTS(prgnDst);
+ pBox = RegionRects(prgnDst);
/* Get the number of boxes in the region */
- nbox = REGION_NUM_RECTS(prgnDst);
+ nbox = RegionNumRects(prgnDst);
/* Allocate source points for each box */
if(!(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec))))
@@ -179,7 +179,7 @@ winCopyWindowNativeGDI (WindowPtr pWin,
}
/* Setup loop pointers again */
- pBoxDst = REGION_RECTS(prgnDst);
+ pBoxDst = RegionRects(prgnDst);
ppt = pptSrc;
#if 0
@@ -205,7 +205,7 @@ winCopyWindowNativeGDI (WindowPtr pWin,
/* Cleanup the regions, etc. */
free(pptSrc);
- REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
+ RegionDestroy(prgnDst);
}
@@ -593,13 +593,13 @@ winReshapeRootless (WindowPtr pWin)
if (!wBoundingShape (pWin))
return;
- REGION_NULL(pScreen, &rrNewShape);
- REGION_COPY(pScreen, &rrNewShape, wBoundingShape(pWin));
- REGION_TRANSLATE(pScreen, &rrNewShape, pWin->borderWidth,
+ RegionNull(&rrNewShape);
+ RegionCopy(&rrNewShape, wBoundingShape(pWin));
+ RegionTranslate(&rrNewShape, pWin->borderWidth,
pWin->borderWidth);
- nRects = REGION_NUM_RECTS(&rrNewShape);
- pShape = REGION_RECTS(&rrNewShape);
+ nRects = RegionNumRects(&rrNewShape);
+ pShape = RegionRects(&rrNewShape);
if (nRects > 0)
{
@@ -631,7 +631,7 @@ winReshapeRootless (WindowPtr pWin)
pWinPriv->hRgn = hRgn;
}
- REGION_UNINIT(pScreen, &rrNewShape);
+ RegionUninit(&rrNewShape);
return;
}
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
index 99329c383..5935ac453 100755
--- a/hw/xwin/winwindowswm.c
+++ b/hw/xwin/winwindowswm.c
@@ -495,11 +495,11 @@ ProcWindowsWMFrameDraw (register ClientPtr client)
/* wBoundingShape is relative to *inner* origin of window.
Translate by borderWidth to get the outside-relative position. */
- REGION_NULL(pScreen, &newShape);
- REGION_COPY(pScreen, &newShape, wBoundingShape(pWin));
- REGION_TRANSLATE(pScreen, &newShape, pWin->borderWidth, pWin->borderWidth);
+ RegionNull(&newShape);
+ RegionCopy(&newShape, wBoundingShape(pWin));
+ RegionTranslate(&newShape, pWin->borderWidth, pWin->borderWidth);
winMWExtWMReshapeFrame (pRLWinPriv, &newShape);
- REGION_UNINIT(pScreen, &newShape);
+ RegionUninit(&newShape);
}
#if CYGMULTIWINDOW_DEBUG
ErrorF ("ProcWindowsWMFrameDraw - done\n");