summaryrefslogtreecommitdiff
path: root/fb
diff options
context:
space:
mode:
Diffstat (limited to 'fb')
-rw-r--r--fb/fb.h2
-rw-r--r--fb/fb24_32.c8
-rw-r--r--fb/fbarc.c2
-rw-r--r--fb/fbbits.h4
-rw-r--r--fb/fbfill.c2
-rw-r--r--fb/fbfillrect.c6
-rw-r--r--fb/fbfillsp.c6
-rw-r--r--fb/fbgc.c2
-rw-r--r--fb/fbglyph.c4
-rw-r--r--fb/fbimage.c8
-rw-r--r--fb/fbline.c4
-rw-r--r--fb/fboverlay.c42
-rw-r--r--fb/fbpict.c6
-rw-r--r--fb/fbpixmap.c10
-rw-r--r--fb/fbpoint.c2
-rw-r--r--fb/fbpush.c4
-rw-r--r--fb/fbseg.c4
-rw-r--r--fb/fbsetsp.c4
-rw-r--r--fb/fbwindow.c14
19 files changed, 67 insertions, 67 deletions
diff --git a/fb/fb.h b/fb/fb.h
index e2222a5c7..7ab4adf69 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -739,7 +739,7 @@ typedef struct {
*/
#define fbWindowEnabled(pWin) \
- REGION_NOTEMPTY((pWin)->drawable.pScreen, \
+ RegionNotEmpty(\
&(pWin)->drawable.pScreen->root->borderClip)
#define fbDrawableEnabled(pDrawable) \
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index 1ebd598a8..2e600edc0 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -335,8 +335,8 @@ fb24_32SetSpans (DrawablePtr pDrawable,
{
d = dst + (ppt->y + dstYoff) * dstStride;
s = (CARD8 *) src;
- n = REGION_NUM_RECTS(pClip);
- pbox = REGION_RECTS (pClip);
+ n = RegionNumRects(pClip);
+ pbox = RegionRects (pClip);
while (n--)
{
if (pbox->y1 > ppt->y)
@@ -399,8 +399,8 @@ fb24_32PutZImage (DrawablePtr pDrawable,
dstStride *= sizeof(FbBits);
dst = (CARD8 *) dstBits;
- for (nbox = REGION_NUM_RECTS (pClip),
- pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects (pClip),
+ pbox = RegionRects(pClip);
nbox--;
pbox++)
{
diff --git a/fb/fbarc.c b/fb/fbarc.c
index 3a8a2c56a..33e44b0c6 100644
--- a/fb/fbarc.c
+++ b/fb/fbarc.c
@@ -102,7 +102,7 @@ fbPolyArc (DrawablePtr pDrawable,
y2 = box.y1 + (int)parcs->height + 1;
box.y2 = y2;
if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) &&
- (RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) ) {
+ (RegionContainsRect(cclip, &box) == rgnIN) ) {
#ifdef FB_ACCESS_WRAPPER
if (!wrapped) {
fbPrepareAccess (pDrawable);
diff --git a/fb/fbbits.h b/fb/fbbits.h
index 44991f106..8bf1a0290 100644
--- a/fb/fbbits.h
+++ b/fb/fbbits.h
@@ -670,7 +670,7 @@ POLYLINE (DrawablePtr pDrawable,
int xoff = pDrawable->x;
int yoff = pDrawable->y;
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);
- BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC));
+ BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC));
FbBits *dst;
int dstStride;
@@ -807,7 +807,7 @@ POLYSEGMENT (DrawablePtr pDrawable,
int xoff = pDrawable->x;
int yoff = pDrawable->y;
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);
- BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC));
+ BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC));
FbBits *dst;
int dstStride;
diff --git a/fb/fbfill.c b/fb/fbfill.c
index 831b1ce76..801a0d0a9 100644
--- a/fb/fbfill.c
+++ b/fb/fbfill.c
@@ -185,7 +185,7 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
- for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip);
nbox--;
pbox++)
{
diff --git a/fb/fbfillrect.c b/fb/fbfillrect.c
index 4e4edb3fd..7fc03f9a5 100644
--- a/fb/fbfillrect.c
+++ b/fb/fbfillrect.c
@@ -44,7 +44,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
xorg = pDrawable->x;
yorg = pDrawable->y;
- pextent = REGION_EXTENTS(pGC->pScreen, pClip);
+ pextent = RegionExtents(pClip);
extentX1 = pextent->x1;
extentY1 = pextent->y1;
extentX2 = pextent->x2;
@@ -71,7 +71,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
if ((fullX1 >= fullX2) || (fullY1 >= fullY2))
continue;
- n = REGION_NUM_RECTS (pClip);
+ n = RegionNumRects (pClip);
if (n == 1)
{
fbFill (pDrawable,
@@ -80,7 +80,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
}
else
{
- pbox = REGION_RECTS(pClip);
+ pbox = RegionRects(pClip);
/*
* clip the rectangle to each box in the clip region
* this is logically equivalent to calling Intersect()
diff --git a/fb/fbfillsp.c b/fb/fbfillsp.c
index 5d2147213..194bfc88b 100644
--- a/fb/fbfillsp.c
+++ b/fb/fbfillsp.c
@@ -41,7 +41,7 @@ fbFillSpans (DrawablePtr pDrawable,
int fullX1, fullX2, fullY1;
int partX1, partX2;
- pextent = REGION_EXTENTS(pGC->pScreen, pClip);
+ pextent = RegionExtents(pClip);
extentX1 = pextent->x1;
extentY1 = pextent->y1;
extentX2 = pextent->x2;
@@ -66,7 +66,7 @@ fbFillSpans (DrawablePtr pDrawable,
if (fullX1 >= fullX2)
continue;
- nbox = REGION_NUM_RECTS (pClip);
+ nbox = RegionNumRects (pClip);
if (nbox == 1)
{
fbFill (pDrawable,
@@ -75,7 +75,7 @@ fbFillSpans (DrawablePtr pDrawable,
}
else
{
- pbox = REGION_RECTS(pClip);
+ pbox = RegionRects(pClip);
while(nbox--)
{
if (pbox->y1 <= fullY1 && fullY1 < pbox->y2)
diff --git a/fb/fbgc.c b/fb/fbgc.c
index fda391b14..e3e923675 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -213,7 +213,7 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
)
{
miComputeCompositeClip (pGC, pDrawable);
- pPriv->oneRect = REGION_NUM_RECTS(fbGetCompositeClip(pGC)) == 1;
+ pPriv->oneRect = RegionNumRects(fbGetCompositeClip(pGC)) == 1;
}
#ifdef FB_24_32BIT
diff --git a/fb/fbglyph.c b/fb/fbglyph.c
index 2c19b742f..44fe80fc9 100644
--- a/fb/fbglyph.c
+++ b/fb/fbglyph.c
@@ -39,7 +39,7 @@ fbGlyphIn (RegionPtr pRegion,
int height)
{
BoxRec box;
- BoxPtr pExtents = REGION_EXTENTS (dummyScreen, pRegion);
+ BoxPtr pExtents = RegionExtents(pRegion);
/*
* Check extents by hand to avoid 16 bit overflows
@@ -56,7 +56,7 @@ fbGlyphIn (RegionPtr pRegion,
box.x2 = x + width;
box.y1 = y;
box.y2 = y + height;
- return RECT_IN_REGION (dummyScreen, pRegion, &box) == rgnIN;
+ return RegionContainsRect(pRegion, &box) == rgnIN;
}
#ifdef FB_24BIT
diff --git a/fb/fbimage.c b/fb/fbimage.c
index 2b9ac27c0..da1e8bcc4 100644
--- a/fb/fbimage.c
+++ b/fb/fbimage.c
@@ -134,8 +134,8 @@ fbPutZImage (DrawablePtr pDrawable,
fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
- for (nbox = REGION_NUM_RECTS (pClip),
- pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects (pClip),
+ pbox = RegionRects(pClip);
nbox--;
pbox++)
{
@@ -224,8 +224,8 @@ fbPutXYImage (DrawablePtr pDrawable,
}
}
- for (nbox = REGION_NUM_RECTS (pClip),
- pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects (pClip),
+ pbox = RegionRects(pClip);
nbox--;
pbox++)
{
diff --git a/fb/fbline.c b/fb/fbline.c
index 2cee123ae..fa80573e2 100644
--- a/fb/fbline.c
+++ b/fb/fbline.c
@@ -117,7 +117,7 @@ fbPolyLine (DrawablePtr pDrawable,
#ifndef FBNOPIXADDR
if (pGC->fillStyle == FillSolid &&
pGC->lineStyle == LineSolid &&
- REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1)
+ RegionNumRects (fbGetCompositeClip(pGC)) == 1)
{
switch (pDrawable->bitsPerPixel) {
case 8: line = fbPolyline8; break;
@@ -154,7 +154,7 @@ fbPolySegment (DrawablePtr pDrawable,
#ifndef FBNOPIXADDR
if (pGC->fillStyle == FillSolid &&
pGC->lineStyle == LineSolid &&
- REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1)
+ RegionNumRects (fbGetCompositeClip(pGC)) == 1)
{
switch (pDrawable->bitsPerPixel) {
case 8: seg = fbPolySegment8; break;
diff --git a/fb/fboverlay.c b/fb/fboverlay.c
index 3eb1b032d..392e27f39 100644
--- a/fb/fboverlay.c
+++ b/fb/fboverlay.c
@@ -75,7 +75,7 @@ fbOverlayCreateWindow(WindowPtr pWin)
*/
if (!pWin->parent)
{
- REGION_EMPTY (pWin->drawable.pScreen,
+ RegionEmpty(
&pScrPriv->layer[i].u.run.region);
}
return TRUE;
@@ -93,7 +93,7 @@ fbOverlayCloseScreen (int iScreen, ScreenPtr pScreen)
for (i = 0; i < pScrPriv->nlayers; i++)
{
(*pScreen->DestroyPixmap)(pScrPriv->layer[i].u.run.pixmap);
- REGION_UNINIT (pScreen, &pScrPriv->layer[i].u.run.region);
+ RegionUninit(&pScrPriv->layer[i].u.run.region);
}
return TRUE;
}
@@ -147,7 +147,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen)
pbits))
return FALSE;
pScrPriv->layer[i].u.run.pixmap = pPixmap;
- REGION_INIT(pScreen, &pScrPriv->layer[i].u.run.region, &box, 0);
+ RegionInit(&pScrPriv->layer[i].u.run.region, &box, 0);
}
pScreen->devPrivate = pScrPriv->layer[0].u.run.pixmap;
return TRUE;
@@ -175,24 +175,24 @@ fbOverlayUpdateLayerRegion (ScreenPtr pScreen,
int i;
RegionRec rgnNew;
- if (!prgn || !REGION_NOTEMPTY(pScreen, prgn))
+ if (!prgn || !RegionNotEmpty(prgn))
return;
for (i = 0; i < pScrPriv->nlayers; i++)
{
if (i == layer)
{
/* add new piece to this fb */
- REGION_UNION (pScreen,
+ RegionUnion(
&pScrPriv->layer[i].u.run.region,
&pScrPriv->layer[i].u.run.region,
prgn);
}
- else if (REGION_NOTEMPTY (pScreen,
+ else if (RegionNotEmpty(
&pScrPriv->layer[i].u.run.region))
{
/* paint new piece with chroma key */
- REGION_NULL (pScreen, &rgnNew);
- REGION_INTERSECT (pScreen,
+ RegionNull(&rgnNew);
+ RegionIntersect(
&rgnNew,
prgn,
&pScrPriv->layer[i].u.run.region);
@@ -200,9 +200,9 @@ fbOverlayUpdateLayerRegion (ScreenPtr pScreen,
&rgnNew,
pScrPriv->layer[i].key,
i);
- REGION_UNINIT(pScreen, &rgnNew);
+ RegionUninit(&rgnNew);
/* remove piece from other fbs */
- REGION_SUBTRACT (pScreen,
+ RegionSubtract(
&pScrPriv->layer[i].u.run.region,
&pScrPriv->layer[i].u.run.region,
prgn);
@@ -232,21 +232,21 @@ fbOverlayCopyWindow(WindowPtr pWin,
/*
* Clip to existing bits
*/
- REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
- REGION_NULL (pScreen, &rgnDst);
- REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
- REGION_TRANSLATE(pScreen, &rgnDst, dx, dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
+ RegionNull(&rgnDst);
+ RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
+ RegionTranslate(&rgnDst, dx, dy);
/*
* Compute the portion of each fb affected by this copy
*/
for (i = 0; i < pScrPriv->nlayers; i++)
{
- REGION_NULL (pScreen, &layerRgn[i]);
- REGION_INTERSECT(pScreen, &layerRgn[i], &rgnDst,
+ RegionNull(&layerRgn[i]);
+ RegionIntersect(&layerRgn[i], &rgnDst,
&pScrPriv->layer[i].u.run.region);
- if (REGION_NOTEMPTY (pScreen, &layerRgn[i]))
+ if (RegionNotEmpty(&layerRgn[i]))
{
- REGION_TRANSLATE(pScreen, &layerRgn[i], -dx, -dy);
+ RegionTranslate(&layerRgn[i], -dx, -dy);
pPixmap = pScrPriv->layer[i].u.run.pixmap;
miCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0,
@@ -259,12 +259,12 @@ fbOverlayCopyWindow(WindowPtr pWin,
*/
for (i = 0; i < pScrPriv->nlayers; i++)
{
- if (REGION_NOTEMPTY (pScreen, &layerRgn[i]))
+ if (RegionNotEmpty(&layerRgn[i]))
fbOverlayUpdateLayerRegion (pScreen, i, &layerRgn[i]);
- REGION_UNINIT(pScreen, &layerRgn[i]);
+ RegionUninit(&layerRgn[i]);
}
- REGION_UNINIT(pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
}
void
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 896d33ebb..26cdc0d84 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -77,8 +77,8 @@ fbWalkCompositeRegion (CARD8 op,
xMask, yMask, xDst, yDst, width, height))
return;
- n = REGION_NUM_RECTS (&region);
- pbox = REGION_RECTS (&region);
+ n = RegionNumRects (&region);
+ pbox = RegionRects (&region);
while (n--)
{
h = pbox->y2 - pbox->y1;
@@ -138,7 +138,7 @@ fbWalkCompositeRegion (CARD8 op,
}
pbox++;
}
- REGION_UNINIT (pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
}
void
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index cbaab3365..625ce715b 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -116,7 +116,7 @@ if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \
if ((reg)->data->numRects == (reg)->data->size) \
{ \
RegionRectAlloc(reg, 1); \
- fr = REGION_BOXPTR(reg); \
+ fr = RegionBoxptr(reg); \
r = fr + (reg)->data->numRects; \
} \
r->x1 = (rx1); \
@@ -153,10 +153,10 @@ fbPixmapToRegion(PixmapPtr pPix)
FbBits *pwLine;
int nWidth;
- pReg = REGION_CREATE(pPix->drawable.pScreen, NULL, 1);
+ pReg = RegionCreate(NULL, 1);
if(!pReg)
return NullRegion;
- FirstRect = REGION_BOXPTR(pReg);
+ FirstRect = RegionBoxptr(pReg);
rects = FirstRect;
fbPrepareAccess(&pPix->drawable);
@@ -304,8 +304,8 @@ fbPixmapToRegion(PixmapPtr pPix)
pReg->extents.x1 = pReg->extents.x2 = 0;
else
{
- pReg->extents.y1 = REGION_BOXPTR(pReg)->y1;
- pReg->extents.y2 = REGION_END(pReg)->y2;
+ pReg->extents.y1 = RegionBoxptr(pReg)->y1;
+ pReg->extents.y2 = RegionEnd(pReg)->y2;
if (pReg->data->numRects == 1)
{
free(pReg->data);
diff --git a/fb/fbpoint.c b/fb/fbpoint.c
index c0ea8ba5b..f260a69ca 100644
--- a/fb/fbpoint.c
+++ b/fb/fbpoint.c
@@ -154,7 +154,7 @@ fbPolyPoint (DrawablePtr pDrawable,
case 32: dots = fbDots32; break;
}
#endif
- for (nBox = REGION_NUM_RECTS (pClip), pBox = REGION_RECTS (pClip);
+ for (nBox = RegionNumRects (pClip), pBox = RegionRects (pClip);
nBox--; pBox++)
(*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit,
pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor);
diff --git a/fb/fbpush.c b/fb/fbpush.c
index 891572f0d..9d827181d 100644
--- a/fb/fbpush.c
+++ b/fb/fbpush.c
@@ -190,8 +190,8 @@ fbPushImage (DrawablePtr pDrawable,
BoxPtr pbox;
int x1, y1, x2, y2;
- for (nbox = REGION_NUM_RECTS (pClip),
- pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects (pClip),
+ pbox = RegionRects(pClip);
nbox--;
pbox++)
{
diff --git a/fb/fbseg.c b/fb/fbseg.c
index 999be1cda..7cc38a20c 100644
--- a/fb/fbseg.c
+++ b/fb/fbseg.c
@@ -624,8 +624,8 @@ fbSegment (DrawablePtr pDrawable,
unsigned int oc1; /* outcode of point 1 */
unsigned int oc2; /* outcode of point 2 */
- nBox = REGION_NUM_RECTS (pClip);
- pBox = REGION_RECTS (pClip);
+ nBox = RegionNumRects (pClip);
+ pBox = RegionRects (pClip);
bres = fbSelectBres (pDrawable, pGC);
diff --git a/fb/fbsetsp.c b/fb/fbsetsp.c
index 227ba4c62..61dc4dc30 100644
--- a/fb/fbsetsp.c
+++ b/fb/fbsetsp.c
@@ -60,8 +60,8 @@ fbSetSpans (DrawablePtr pDrawable,
xoff = (int) (((long) src) & (FB_MASK >> 3));
s = (FbBits *) (src - xoff);
xoff <<= 3;
- n = REGION_NUM_RECTS(pClip);
- pbox = REGION_RECTS (pClip);
+ n = RegionNumRects(pClip);
+ pbox = RegionRects (pClip);
while (n--)
{
if (pbox->y1 > ppt->y)
diff --git a/fb/fbwindow.c b/fb/fbwindow.c
index 46c033448..bb0384d91 100644
--- a/fb/fbwindow.c
+++ b/fb/fbwindow.c
@@ -128,15 +128,15 @@ fbCopyWindow(WindowPtr pWin,
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
- REGION_NULL (pWin->drawable.pScreen, &rgnDst);
+ RegionNull(&rgnDst);
- REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
+ RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
#ifdef COMPOSITE
if (pPixmap->screen_x || pPixmap->screen_y)
- REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
+ RegionTranslate(&rgnDst,
-pPixmap->screen_x, -pPixmap->screen_y);
#endif
@@ -144,7 +144,7 @@ fbCopyWindow(WindowPtr pWin,
0,
&rgnDst, dx, dy, fbCopyWindowProc, 0, 0);
- REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
fbValidateDrawable (&pWin->drawable);
}
@@ -211,8 +211,8 @@ fbFillRegionSolid (DrawablePtr pDrawable,
FbStride dstStride;
int dstBpp;
int dstXoff, dstYoff;
- int n = REGION_NUM_RECTS(pRegion);
- BoxPtr pbox = REGION_RECTS(pRegion);
+ int n = RegionNumRects(pRegion);
+ BoxPtr pbox = RegionRects(pRegion);
#ifndef FB_ACCESS_WRAPPER
int try_mmx = 0;