aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/fb
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-03-16 11:11:43 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-05-02 14:53:06 +0200
commit63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4 (patch)
tree3d67994a85c5d8c3a929ab315fbcb617baa6423d /nx-X11/programs/Xserver/fb
parent28ba877803d8383eac282b873b8e0bb50c8db46b (diff)
downloadnx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.gz
nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.bz2
nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.zip
Rename region macros to eliminate screen argument
This is a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole nx-X11/programs/Xserver tree: $ cd nx-X11/programs/Xserver && ( git ls-files | grep -v '^fix-' | xargs ./fix-region; ) And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. v1: Keith Packard <keithp@keithp.com> (X.Org xserver commit: 2dc138922b7588515d5f2447e4b9dcdc0bef15e0) v2: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (apply fix-region script to nx-libs)
Diffstat (limited to 'nx-X11/programs/Xserver/fb')
-rw-r--r--nx-X11/programs/Xserver/fb/fb.h2
-rw-r--r--nx-X11/programs/Xserver/fb/fb24_32.c8
-rw-r--r--nx-X11/programs/Xserver/fb/fbarc.c2
-rw-r--r--nx-X11/programs/Xserver/fb/fbbits.h4
-rw-r--r--nx-X11/programs/Xserver/fb/fbbstore.c8
-rw-r--r--nx-X11/programs/Xserver/fb/fbcompose.c36
-rw-r--r--nx-X11/programs/Xserver/fb/fbcopy.c26
-rw-r--r--nx-X11/programs/Xserver/fb/fbfill.c2
-rw-r--r--nx-X11/programs/Xserver/fb/fbfillrect.c6
-rw-r--r--nx-X11/programs/Xserver/fb/fbfillsp.c6
-rw-r--r--nx-X11/programs/Xserver/fb/fbgc.c2
-rw-r--r--nx-X11/programs/Xserver/fb/fbglyph.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbimage.c8
-rw-r--r--nx-X11/programs/Xserver/fb/fbline.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fboverlay.c42
-rw-r--r--nx-X11/programs/Xserver/fb/fbpict.c6
-rw-r--r--nx-X11/programs/Xserver/fb/fbpixmap.c10
-rw-r--r--nx-X11/programs/Xserver/fb/fbpoint.c2
-rw-r--r--nx-X11/programs/Xserver/fb/fbpseudocolor.c130
-rw-r--r--nx-X11/programs/Xserver/fb/fbpush.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbseg.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbsetsp.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbwindow.c18
23 files changed, 169 insertions, 169 deletions
diff --git a/nx-X11/programs/Xserver/fb/fb.h b/nx-X11/programs/Xserver/fb/fb.h
index b64f3a227..1da5d2470 100644
--- a/nx-X11/programs/Xserver/fb/fb.h
+++ b/nx-X11/programs/Xserver/fb/fb.h
@@ -703,7 +703,7 @@ typedef struct {
*/
#define fbWindowEnabled(pWin) \
- REGION_NOTEMPTY((pWin)->drawable.pScreen, \
+ RegionNotEmpty(\
&WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
#define fbDrawableEnabled(pDrawable) \
diff --git a/nx-X11/programs/Xserver/fb/fb24_32.c b/nx-X11/programs/Xserver/fb/fb24_32.c
index 68e0ef84d..350055c14 100644
--- a/nx-X11/programs/Xserver/fb/fb24_32.c
+++ b/nx-X11/programs/Xserver/fb/fb24_32.c
@@ -338,8 +338,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)
@@ -400,8 +400,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/nx-X11/programs/Xserver/fb/fbarc.c b/nx-X11/programs/Xserver/fb/fbarc.c
index 315aa181c..0b386f70e 100644
--- a/nx-X11/programs/Xserver/fb/fbarc.c
+++ b/nx-X11/programs/Xserver/fb/fbarc.c
@@ -101,7 +101,7 @@ fbPolyArc (DrawablePtr pDrawable,
y2 = box.y1 + (int)parcs->height + 1;
box.y2 = y2;
if ( (x2 <= MAXSHORT) && (y2 <= MAXSHORT) &&
- (RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) )
+ (RegionContainsRect(cclip, &box) == rgnIN) )
(*arc) (dst, dstStride, dstBpp,
parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff,
pPriv->and, pPriv->xor);
diff --git a/nx-X11/programs/Xserver/fb/fbbits.h b/nx-X11/programs/Xserver/fb/fbbits.h
index 7dfff58b4..5cd7ae70f 100644
--- a/nx-X11/programs/Xserver/fb/fbbits.h
+++ b/nx-X11/programs/Xserver/fb/fbbits.h
@@ -668,7 +668,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;
@@ -800,7 +800,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/nx-X11/programs/Xserver/fb/fbbstore.c b/nx-X11/programs/Xserver/fb/fbbstore.c
index 01ec9b7e0..e9eedde5b 100644
--- a/nx-X11/programs/Xserver/fb/fbbstore.c
+++ b/nx-X11/programs/Xserver/fb/fbbstore.c
@@ -39,8 +39,8 @@ fbSaveAreas(PixmapPtr pPixmap,
fbCopyWindowProc (&pWin->drawable,
&pPixmap->drawable,
0,
- REGION_RECTS(prgnSave),
- REGION_NUM_RECTS(prgnSave),
+ RegionRects(prgnSave),
+ RegionNumRects(prgnSave),
xorg, yorg,
FALSE,
FALSE,
@@ -57,8 +57,8 @@ fbRestoreAreas(PixmapPtr pPixmap,
fbCopyWindowProc (&pPixmap->drawable,
&pWin->drawable,
0,
- REGION_RECTS(prgnRestore),
- REGION_NUM_RECTS(prgnRestore),
+ RegionRects(prgnRestore),
+ RegionNumRects(prgnRestore),
-xorg, -yorg,
FALSE,
FALSE,
diff --git a/nx-X11/programs/Xserver/fb/fbcompose.c b/nx-X11/programs/Xserver/fb/fbcompose.c
index f8169995f..07ae9490f 100644
--- a/nx-X11/programs/Xserver/fb/fbcompose.c
+++ b/nx-X11/programs/Xserver/fb/fbcompose.c
@@ -2896,7 +2896,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
if (pict->filter == PictFilterNearest)
{
if (pict->repeatType == RepeatNormal) {
- if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
+ if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
@@ -2927,7 +2927,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
y = MOD(v.vector[1]>>16, pict->pDrawable->height);
x = MOD(v.vector[0]>>16, pict->pDrawable->width);
}
- if (POINT_IN_REGION (0, pict->pCompositeClip, x, y, &box))
+ if (RegionContainsPoint(pict->pCompositeClip, x, y, &box))
buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
else
buffer[i] = 0;
@@ -2938,7 +2938,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
}
}
} else {
- if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
+ if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
@@ -2970,7 +2970,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
y = v.vector[1]>>16;
x = v.vector[0]>>16;
}
- if (POINT_IN_REGION (0, pict->pCompositeClip, x, y, &box))
+ if (RegionContainsPoint(pict->pCompositeClip, x, y, &box))
buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
else
buffer[i] = 0;
@@ -2983,7 +2983,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
}
} else if (pict->filter == PictFilterBilinear) {
if (pict->repeatType == RepeatNormal) {
- if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
+ if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
@@ -3082,14 +3082,14 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
b = bits + (y1 + pict->pDrawable->y)*stride;
- tl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y1, &box)
+ tl = RegionContainsPoint(pict->pCompositeClip, x1, y1, &box)
? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
- tr = POINT_IN_REGION(0, pict->pCompositeClip, x2, y1, &box)
+ tr = RegionContainsPoint(pict->pCompositeClip, x2, y1, &box)
? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
b = bits + (y2 + pict->pDrawable->y)*stride;
- bl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y2, &box)
+ bl = RegionContainsPoint(pict->pCompositeClip, x1, y2, &box)
? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
- br = POINT_IN_REGION(0, pict->pCompositeClip, x2, y2, &box)
+ br = RegionContainsPoint(pict->pCompositeClip, x2, y2, &box)
? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
@@ -3112,7 +3112,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
}
}
} else {
- if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
+ if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
@@ -3209,14 +3209,14 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
b = bits + (y1 + pict->pDrawable->y)*stride;
x_off = x1 + pict->pDrawable->x;
- tl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y1, &box)
+ tl = RegionContainsPoint(pict->pCompositeClip, x1, y1, &box)
? fetch(b, x_off, indexed) : 0;
- tr = POINT_IN_REGION(0, pict->pCompositeClip, x2, y1, &box)
+ tr = RegionContainsPoint(pict->pCompositeClip, x2, y1, &box)
? fetch(b, x_off + 1, indexed) : 0;
b += stride;
- bl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y2, &box)
+ bl = RegionContainsPoint(pict->pCompositeClip, x1, y2, &box)
? fetch(b, x_off, indexed) : 0;
- br = POINT_IN_REGION(0, pict->pCompositeClip, x2, y2, &box)
+ br = RegionContainsPoint(pict->pCompositeClip, x2, y2, &box)
? fetch(b, x_off + 1, indexed) : 0;
ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
@@ -3274,7 +3274,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
for (x = x1; x < x2; x++) {
if (*p) {
int tx = (pict->repeatType == RepeatNormal) ? MOD (x, pict->pDrawable->width) : x;
- if (POINT_IN_REGION (0, pict->pCompositeClip, tx, ty, &box)) {
+ if (RegionContainsPoint(pict->pCompositeClip, tx, ty, &box)) {
FbBits *b = bits + (ty + pict->pDrawable->y)*stride;
CARD32 c = fetch(b, tx + pict->pDrawable->x, indexed);
@@ -3563,8 +3563,8 @@ fbCompositeGeneral (CARD8 op,
if (width > SCANLINE_BUFFER_LENGTH)
scanline_buffer = (CARD32 *) malloc(width * 3 * sizeof(CARD32));
- n = REGION_NUM_RECTS (&region);
- pbox = REGION_RECTS (&region);
+ n = RegionNumRects (&region);
+ pbox = RegionRects (&region);
while (n--)
{
h = pbox->y2 - pbox->y1;
@@ -3618,7 +3618,7 @@ fbCompositeGeneral (CARD8 op,
}
pbox++;
}
- REGION_UNINIT (pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
if (scanline_buffer != _scanline_buffer)
free(scanline_buffer);
diff --git a/nx-X11/programs/Xserver/fb/fbcopy.c b/nx-X11/programs/Xserver/fb/fbcopy.c
index 1e7b93435..f68811ebb 100644
--- a/nx-X11/programs/Xserver/fb/fbcopy.c
+++ b/nx-X11/programs/Xserver/fb/fbcopy.c
@@ -306,8 +306,8 @@ fbCopyRegion (DrawablePtr pSrcDrawable,
int nbox;
BoxPtr pboxNew1, pboxNew2, pboxBase, pboxNext, pboxTmp;
- pbox = REGION_RECTS(pDstRegion);
- nbox = REGION_NUM_RECTS(pDstRegion);
+ pbox = RegionRects(pDstRegion);
+ nbox = RegionNumRects(pDstRegion);
/* XXX we have to err on the side of safety when both are windows,
* because we don't know if IncludeInferiors is being used.
@@ -466,7 +466,7 @@ fbDoCopy (DrawablePtr pSrcDrawable,
* VT is inactive, make sure the region isn't empty
*/
if (!((WindowPtr) pSrcDrawable)->parent &&
- REGION_NOTEMPTY (pSrcDrawable->pScreen,
+ RegionNotEmpty(
&((WindowPtr) pSrcDrawable)->borderClip))
{
/*
@@ -548,9 +548,9 @@ fbDoCopy (DrawablePtr pSrcDrawable,
blown region and call intersect */
cclip = fbGetCompositeClip(pGC);
- if (REGION_NUM_RECTS(cclip) == 1)
+ if (RegionNumRects(cclip) == 1)
{
- BoxPtr pBox = REGION_RECTS(cclip);
+ BoxPtr pBox = RegionRects(cclip);
if (box_x1 < pBox->x1) box_x1 = pBox->x1;
if (box_x2 > pBox->x2) box_x2 = pBox->x2;
@@ -563,7 +563,7 @@ fbDoCopy (DrawablePtr pSrcDrawable,
/* Check to see if the region is empty */
if (box_x1 >= box_x2 || box_y1 >= box_y2)
{
- REGION_NULL(pGC->pScreen, &rgnDst);
+ RegionNull(&rgnDst);
}
else
{
@@ -572,25 +572,25 @@ fbDoCopy (DrawablePtr pSrcDrawable,
box.y1 = box_y1;
box.x2 = box_x2;
box.y2 = box_y2;
- REGION_INIT(pGC->pScreen, &rgnDst, &box, 1);
+ RegionInit(&rgnDst, &box, 1);
}
/* Clip against complex source if needed */
if (!fastSrc)
{
- REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip);
- REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy);
+ RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip);
+ RegionTranslate(&rgnDst, -dx, -dy);
}
/* Clip against complex dest if needed */
if (!fastDst)
{
- REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst,
+ RegionIntersect(&rgnDst, &rgnDst,
fbGetCompositeClip(pGC));
}
/* Do bit blitting */
- numRects = REGION_NUM_RECTS(&rgnDst);
+ numRects = RegionNumRects(&rgnDst);
if (numRects && widthSrc && heightSrc)
fbCopyRegion (pSrcDrawable, pDstDrawable, pGC,
&rgnDst, dx, dy, copyProc, bitPlane, closure);
@@ -604,9 +604,9 @@ fbDoCopy (DrawablePtr pSrcDrawable,
xOut - pDstDrawable->x,
yOut - pDstDrawable->y,
(unsigned long) bitPlane);
- REGION_UNINIT(pGC->pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
if (freeSrcClip)
- REGION_DESTROY(pGC->pScreen, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
fbValidateDrawable (pDstDrawable);
return prgnExposed;
}
diff --git a/nx-X11/programs/Xserver/fb/fbfill.c b/nx-X11/programs/Xserver/fb/fbfill.c
index c61ff3b4c..be6723c01 100644
--- a/nx-X11/programs/Xserver/fb/fbfill.c
+++ b/nx-X11/programs/Xserver/fb/fbfill.c
@@ -184,7 +184,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/nx-X11/programs/Xserver/fb/fbfillrect.c b/nx-X11/programs/Xserver/fb/fbfillrect.c
index 2a60da165..37a7b20f7 100644
--- a/nx-X11/programs/Xserver/fb/fbfillrect.c
+++ b/nx-X11/programs/Xserver/fb/fbfillrect.c
@@ -47,7 +47,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;
@@ -74,7 +74,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
if ((fullX1 >= fullX2) || (fullY1 >= fullY2))
continue;
- n = REGION_NUM_RECTS (pClip);
+ n = RegionNumRects (pClip);
if (n == 1)
{
fbFill (pDrawable,
@@ -83,7 +83,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/nx-X11/programs/Xserver/fb/fbfillsp.c b/nx-X11/programs/Xserver/fb/fbfillsp.c
index e2bb71e3a..5d465482f 100644
--- a/nx-X11/programs/Xserver/fb/fbfillsp.c
+++ b/nx-X11/programs/Xserver/fb/fbfillsp.c
@@ -44,7 +44,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;
@@ -69,7 +69,7 @@ fbFillSpans (DrawablePtr pDrawable,
if (fullX1 >= fullX2)
continue;
- nbox = REGION_NUM_RECTS (pClip);
+ nbox = RegionNumRects (pClip);
if (nbox == 1)
{
fbFill (pDrawable,
@@ -78,7 +78,7 @@ fbFillSpans (DrawablePtr pDrawable,
}
else
{
- pbox = REGION_RECTS(pClip);
+ pbox = RegionRects(pClip);
while(nbox--)
{
if (pbox->y1 <= fullY1 && fullY1 < pbox->y2)
diff --git a/nx-X11/programs/Xserver/fb/fbgc.c b/nx-X11/programs/Xserver/fb/fbgc.c
index fdd7a319c..a980023ef 100644
--- a/nx-X11/programs/Xserver/fb/fbgc.c
+++ b/nx-X11/programs/Xserver/fb/fbgc.c
@@ -211,7 +211,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/nx-X11/programs/Xserver/fb/fbglyph.c b/nx-X11/programs/Xserver/fb/fbglyph.c
index bb0dda669..3c0913cf8 100644
--- a/nx-X11/programs/Xserver/fb/fbglyph.c
+++ b/nx-X11/programs/Xserver/fb/fbglyph.c
@@ -41,7 +41,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
@@ -58,7 +58,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/nx-X11/programs/Xserver/fb/fbimage.c b/nx-X11/programs/Xserver/fb/fbimage.c
index 96bd8cf95..06b501b41 100644
--- a/nx-X11/programs/Xserver/fb/fbimage.c
+++ b/nx-X11/programs/Xserver/fb/fbimage.c
@@ -140,8 +140,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++)
{
@@ -228,8 +228,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/nx-X11/programs/Xserver/fb/fbline.c b/nx-X11/programs/Xserver/fb/fbline.c
index 8e99dd99f..0a9954998 100644
--- a/nx-X11/programs/Xserver/fb/fbline.c
+++ b/nx-X11/programs/Xserver/fb/fbline.c
@@ -119,7 +119,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;
@@ -156,7 +156,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/nx-X11/programs/Xserver/fb/fboverlay.c b/nx-X11/programs/Xserver/fb/fboverlay.c
index 81c54316f..49623ba4f 100644
--- a/nx-X11/programs/Xserver/fb/fboverlay.c
+++ b/nx-X11/programs/Xserver/fb/fboverlay.c
@@ -74,7 +74,7 @@ fbOverlayCreateWindow(WindowPtr pWin)
*/
if (!pWin->parent)
{
- REGION_EMPTY (pWin->drawable.pScreen,
+ RegionEmpty(
&pScrPriv->layer[i].u.run.region);
}
return TRUE;
@@ -92,7 +92,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;
}
@@ -146,7 +146,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;
@@ -174,24 +174,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);
@@ -199,9 +199,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);
@@ -231,21 +231,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;
fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0,
@@ -258,12 +258,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/nx-X11/programs/Xserver/fb/fbpict.c b/nx-X11/programs/Xserver/fb/fbpict.c
index 5ab3756b9..330c55de3 100644
--- a/nx-X11/programs/Xserver/fb/fbpict.c
+++ b/nx-X11/programs/Xserver/fb/fbpict.c
@@ -1248,8 +1248,8 @@ fbComposite (CARD8 op,
height))
return;
- n = REGION_NUM_RECTS (&region);
- pbox = REGION_RECTS (&region);
+ n = RegionNumRects (&region);
+ pbox = RegionRects (&region);
while (n--)
{
h = pbox->y2 - pbox->y1;
@@ -1309,7 +1309,7 @@ fbComposite (CARD8 op,
}
pbox++;
}
- REGION_UNINIT (pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
}
#endif /* RENDER */
diff --git a/nx-X11/programs/Xserver/fb/fbpixmap.c b/nx-X11/programs/Xserver/fb/fbpixmap.c
index 7ea288cb1..6c2cafd94 100644
--- a/nx-X11/programs/Xserver/fb/fbpixmap.c
+++ b/nx-X11/programs/Xserver/fb/fbpixmap.c
@@ -119,7 +119,7 @@ if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \
if ((reg)->data->numRects == (reg)->data->size) \
{ \
miRectAlloc(reg, 1); \
- fr = REGION_BOXPTR(reg); \
+ fr = RegionBoxptr(reg); \
r = fr + (reg)->data->numRects; \
} \
r->x1 = (rx1); \
@@ -156,10 +156,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;
pwLine = (FbBits *) pPix->devPrivate.ptr;
@@ -305,8 +305,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)
{
xfree(pReg->data);
diff --git a/nx-X11/programs/Xserver/fb/fbpoint.c b/nx-X11/programs/Xserver/fb/fbpoint.c
index 5229d6970..06d8662ba 100644
--- a/nx-X11/programs/Xserver/fb/fbpoint.c
+++ b/nx-X11/programs/Xserver/fb/fbpoint.c
@@ -157,7 +157,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/nx-X11/programs/Xserver/fb/fbpseudocolor.c b/nx-X11/programs/Xserver/fb/fbpseudocolor.c
index 469f3ea08..51f21ed21 100644
--- a/nx-X11/programs/Xserver/fb/fbpseudocolor.c
+++ b/nx-X11/programs/Xserver/fb/fbpseudocolor.c
@@ -166,10 +166,10 @@ int xxGeneration;
# define PRINT_RECTS(rec) {\
int i;\
BoxPtr box;\
- ErrorF("RECTS: %i\n",REGION_NUM_RECTS(&rec));\
- if (REGION_NUM_RECTS(&rec) > 1) { \
- for (i = 0; i < REGION_NUM_RECTS(&rec); i++ ) {\
- box = REGION_BOX(&rec,i);\
+ ErrorF("RECTS: %i\n",RegionNumRects(&rec));\
+ if (RegionNumRects(&rec) > 1) { \
+ for (i = 0; i < RegionNumRects(&rec); i++ ) {\
+ box = RegionBox(&rec,i);\
ErrorF("x1: %hi x2: %hi y1: %hi y2: %hi\n", \
box->x1,box->x2,box->y1,box->y2);\
}\
@@ -308,8 +308,8 @@ xxCreateScreenResources(ScreenPtr pScreen)
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_NULL(pScreen, &pScrPriv->region);
- REGION_INIT(pScreen, &pScrPriv->bRegion, &box, 0);
+ RegionNull(&pScrPriv->region);
+ RegionInit(&pScrPriv->bRegion, &box, 0);
return TRUE;
}
@@ -323,7 +323,7 @@ xxCloseScreen (int iScreen, ScreenPtr pScreen)
(*pScreen->DestroyPixmap)(pScrPriv->pPixmap);
/* We don't need to free the baseColormap as FreeClientResourcess
will have taken care of it. */
- REGION_UNINIT (pScreen, &pScrPriv->region);
+ RegionUninit(&pScrPriv->region);
unwrap (pScrPriv,pScreen, CloseScreen);
ret = pScreen->CloseScreen(iScreen,pScreen);
@@ -678,7 +678,7 @@ xxCreateWindow(WindowPtr pWin)
pWin->devPrivates[fbWinPrivateIndex].ptr = (void *) pScrPriv->pPixmap;
PRINT_RECTS(pScrPriv->region);
if (!pWin->parent) {
- REGION_EMPTY (pWin->drawable.pScreen, &pScrPriv->region);
+ RegionEmpty(&pScrPriv->region);
}
PRINT_RECTS(pScrPriv->region);
@@ -694,11 +694,11 @@ xxWalkChildren(WindowPtr pWin, RegionPtr pReg, PixmapPtr pPixmap)
do {
if (fbGetWindowPixmap(pCurWin) == pPixmap) {
DBG("WalkWindow Add\n");
- REGION_UNION(pWin->drawable.pScreen,pReg,pReg,
+ RegionUnion(pReg,pReg,
&pCurWin->borderClip);
} else {
DBG("WalkWindow Sub\n");
- REGION_SUBTRACT(pWin->drawable.pScreen,pReg,pReg,
+ RegionSubtract(pReg,pReg,
&pCurWin->borderClip);
}
if (pCurWin->lastChild)
@@ -713,7 +713,7 @@ xxPickMyWindows(WindowPtr pWin, RegionPtr pRgn)
xxScrPriv(pScreen);
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
- REGION_UNION(pWin->drawable.pScreen,pRgn,pRgn,&pWin->borderClip);
+ RegionUnion(pRgn,pRgn,&pWin->borderClip);
}
if (pWin->lastChild)
xxWalkChildren(pWin->lastChild,pRgn,pScrPriv->pPixmap);
@@ -736,11 +736,11 @@ xxCopyWindow(WindowPtr pWin,
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_NULL(pScreen, &rgn_new);
- REGION_UNION(pScreen, &rgn_new,&rgn_new,prgnSrc);
- REGION_TRANSLATE(pScreen,&rgn_new,-dx,-dy);
+ RegionNull(&rgn_new);
+ RegionUnion(&rgn_new,&rgn_new,prgnSrc);
+ RegionTranslate(&rgn_new,-dx,-dy);
- REGION_NULL(pScreen, &rgn);
+ RegionNull(&rgn);
xxPickMyWindows(pWin,&rgn);
unwrap (pScrPriv, pScreen, CopyWindow);
@@ -749,19 +749,19 @@ xxCopyWindow(WindowPtr pWin,
pWin->devPrivates[fbWinPrivateIndex].ptr = pPixmap;
wrap(pScrPriv, pScreen, CopyWindow, xxCopyWindow);
- REGION_INTERSECT(pScreen,&rgn,&rgn,&rgn_new);
- if (REGION_NOTEMPTY (pScreen,&rgn)) {
+ RegionIntersect(&rgn,&rgn,&rgn_new);
+ if (RegionNotEmpty(&rgn)) {
fbCopyRegion(&pScrPriv->pPixmap->drawable,&pScrPriv->pPixmap->drawable,
0,&rgn,dx,dy,fbCopyWindowProc,0,(void*)0);
- REGION_TRANSLATE(pScreen,&rgn,dx,dy);
- REGION_INTERSECT(pScreen,&rgn_new,&pScrPriv->region,&rgn);
- REGION_SUBTRACT(pScreen,&pScrPriv->region,&pScrPriv->region,&rgn);
- REGION_TRANSLATE(pScreen,&rgn_new,-dx,-dy);
- REGION_UNION(pScreen,&pScrPriv->region,&pScrPriv->region,&rgn_new);
+ RegionTranslate(&rgn,dx,dy);
+ RegionIntersect(&rgn_new,&pScrPriv->region,&rgn);
+ RegionSubtract(&pScrPriv->region,&pScrPriv->region,&rgn);
+ RegionTranslate(&rgn_new,-dx,-dy);
+ RegionUnion(&pScrPriv->region,&pScrPriv->region,&rgn_new);
}
#if 1
- REGION_UNINIT(pScreen,&rgn_new);
- REGION_UNINIT(pScreen,&rgn);
+ RegionUninit(&rgn_new);
+ RegionUninit(&rgn);
#endif
}
@@ -775,14 +775,14 @@ xxWindowExposures (WindowPtr pWin,
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
DBG("WindowExposures\n");
PRINT_RECTS(pScrPriv->region);
- REGION_UNION(pWin->drawable.pScreen,&pScrPriv->region,
+ RegionUnion(&pScrPriv->region,
&pScrPriv->region,
prgn);
PRINT_RECTS(pScrPriv->region);
} else {
DBG("WindowExposures NonPseudo\n");
PRINT_RECTS(pScrPriv->region);
- REGION_SUBTRACT(pWin->drawable.pScreen,&pScrPriv->region,
+ RegionSubtract(&pScrPriv->region,
&pScrPriv->region,
prgn);
PRINT_RECTS(pScrPriv->region);
@@ -800,23 +800,23 @@ xxPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
DBG("xxPaintWindow\n");
- REGION_NULL (pWin->drawable.pScreen, &rgni);
+ RegionNull(&rgni);
#if 0
- REGION_UNION (pWin->drawable.pScreen, &rgni, &rgni, &pWin->borderClip);
- REGION_INTERSECT(pWin->drawable.pScreen, &rgni, &rgni, pRegion);
+ RegionUnion(&rgni, &rgni, &pWin->borderClip);
+ RegionIntersect(&rgni, &rgni, pRegion);
#else
- REGION_UNION (pWin->drawable.pScreen, &rgni, &rgni, pRegion);
+ RegionUnion(&rgni, &rgni, pRegion);
#endif
switch (what) {
case PW_BORDER:
- REGION_SUBTRACT (pWin->drawable.pScreen, &rgni, &rgni, &pWin->winSize);
+ RegionSubtract(&rgni, &rgni, &pWin->winSize);
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
DBG("PaintWindowBorder\n");
- REGION_UNION (pWin->drawable.pScreen, &pScrPriv->region,
+ RegionUnion(&pScrPriv->region,
&pScrPriv->region, &rgni);
} else {
DBG("PaintWindowBorder NoOverlay\n");
- REGION_SUBTRACT (pWin->drawable.pScreen, &pScrPriv->region,
+ RegionSubtract(&pScrPriv->region,
&pScrPriv->region, &rgni);
}
unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBorder);
@@ -829,15 +829,15 @@ xxPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
case None:
break;
default:
- REGION_INTERSECT (pWin->drawable.pScreen, &rgni,
+ RegionIntersect(&rgni,
&rgni,&pWin->winSize);
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
DBG("PaintWindowBackground\n");
- REGION_UNION (pWin->drawable.pScreen, &pScrPriv->region,
+ RegionUnion(&pScrPriv->region,
&pScrPriv->region, &rgni);
} else {
DBG("PaintWindowBackground NoOverlay\n");
- REGION_SUBTRACT (pWin->drawable.pScreen, &pScrPriv->region,
+ RegionSubtract(&pScrPriv->region,
&pScrPriv->region, &rgni);
}
break;
@@ -852,7 +852,7 @@ xxPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
PRINT_RECTS(rgni);
PRINT_RECTS(pScrPriv->region);
#if 1
- REGION_UNINIT(pWin->drawable.pScreen,&rgni);
+ RegionUninit(&rgni);
#endif
}
@@ -862,8 +862,8 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
{
xxScrPriv(pScreen);
CARD32 mask = (1 << pScrPriv->myDepth) - 1;
- int num = REGION_NUM_RECTS(pReg);
- BoxPtr pbox = REGION_RECTS(pReg);
+ int num = RegionNumRects(pReg);
+ BoxPtr pbox = RegionRects(pReg);
int width, height;
CARD8 *src;
CARD16 *dst, *dst_base;
@@ -905,8 +905,8 @@ xxUpdateCmapPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
{
xxScrPriv(pScreen);
CARD32 mask = (1 << pScrPriv->myDepth) - 1;
- int num = REGION_NUM_RECTS(pReg);
- BoxPtr pbox = REGION_RECTS(pReg);
+ int num = RegionNumRects(pReg);
+ BoxPtr pbox = RegionRects(pReg);
int width, height;
CARD8 *src;
CARD16 *dst, *dst_base;
@@ -950,14 +950,14 @@ xxUpdateCmapPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
static void
xxGetWindowRegion(WindowPtr pWin,RegionPtr winreg)
{
- REGION_NULL(pWin->drawable.pScreen,winreg);
+ RegionNull(winreg);
/* get visible part of the border ...Argh */
- REGION_SUBTRACT(pWin->drawable.pScreen,winreg,&pWin->borderSize,
+ RegionSubtract(winreg,&pWin->borderSize,
&pWin->winSize);
- REGION_INTERSECT(pWin->drawable.pScreen,winreg,winreg,
+ RegionIntersect(winreg,winreg,
&pWin->borderClip);
/* add window interior excluding children */
- REGION_UNION(pWin->drawable.pScreen,winreg,winreg,
+ RegionUnion(winreg,winreg,
&pWin->clipList);
}
@@ -985,18 +985,18 @@ xxUpdateRegion(WindowPtr pWin, void * unused)
if (!pCmapPriv->dirty)
goto CONTINUE;
- REGION_NULL (pScreen, &rgni);
+ RegionNull(&rgni);
/* This will be taken care of when damaged regions are updated */
- REGION_SUBTRACT(pScreen, &rgni, &winreg, &pScrPriv->region);
- if (REGION_NOTEMPTY (pScreen,&rgni))
+ RegionSubtract(&rgni, &winreg, &pScrPriv->region);
+ if (RegionNotEmpty(&rgni))
xxUpdateCmapPseudocolorRegion(pScreen,&rgni, pCmapPriv);
}
CONTINUE:
- REGION_NULL (pScreen, &rgni);
- REGION_INTERSECT (pScreen, &rgni, &winreg, &pScrPriv->region);
+ RegionNull(&rgni);
+ RegionIntersect(&rgni, &winreg, &pScrPriv->region);
- if (REGION_NOTEMPTY (pScreen,&rgni)) {
+ if (RegionNotEmpty(&rgni)) {
if (pmap == (void *) -1) {
pmap =
(ColormapPtr)LookupIDByType(wColormap(pWin),RT_COLORMAP);
@@ -1008,12 +1008,12 @@ xxUpdateRegion(WindowPtr pWin, void * unused)
if (pCmapPriv != (void *)-1)
xxCopyPseudocolorRegion(pScreen,&rgni, pCmapPriv);
- REGION_SUBTRACT(pScreen, &pScrPriv->region, &pScrPriv->region,
+ RegionSubtract(&pScrPriv->region, &pScrPriv->region,
&rgni);
}
#if 1
- REGION_UNINIT(pScreen,&rgni);
- REGION_UNINIT(pScreen,&winreg);
+ RegionUninit(&rgni);
+ RegionUninit(&winreg);
#endif
}
return WT_WALKCHILDREN;
@@ -1033,7 +1033,7 @@ xxUpdateFb(ScreenPtr pScreen)
WalkTree(pScreen,xxUpdateRegion,NULL);
#if 0
- if (REGION_NOTEMPTY (pScreen,&pScrPriv->region)) {
+ if (RegionNotEmpty(&pScrPriv->region)) {
ColormapPtr pmap = (void *) -1;
xxCmapPrivPtr pCmapPriv;
@@ -1042,7 +1042,7 @@ xxUpdateFb(ScreenPtr pScreen)
pCmapPriv = xxGetCmapPriv(pmap);
if (pCmapPriv != (void *)-1)
xxCopyPseudocolorRegion(pScreen,&pScrPriv->region, pCmapPriv);
- REGION_SUBTRACT(pScreen, &pScrPriv->region, &pScrPriv->region,
+ RegionSubtract(&pScrPriv->region, &pScrPriv->region,
&pScrPriv->region);
}
#endif
@@ -1071,7 +1071,7 @@ xxBlockHandler (void * data,
ScreenPtr pScreen = (ScreenPtr) data;
xxScrPriv(pScreen);
- if (REGION_NOTEMPTY (pScreen,&pScrPriv->region) || pScrPriv->colormapDirty)
+ if (RegionNotEmpty(&pScrPriv->region) || pScrPriv->colormapDirty)
xxUpdateFb (pScreen);
}
@@ -1241,15 +1241,15 @@ GCOps xxGCOps = {
if (BOX_NOT_EMPTY(box)) { \
RegionRec region; \
ScreenPtr pScreen = pGC->pScreen;\
- REGION_INIT (pScreen, &region, &box, 1); \
- REGION_INTERSECT(pScreen,&region,&region,\
+ RegionInit(&region, &box, 1); \
+ RegionIntersect(&region,&region,\
(pGC)->pCompositeClip);\
- if (REGION_NOTEMPTY(pScreen,&region)) { \
+ if (RegionNotEmpty(&region)) { \
xxScrPriv(pScreen);\
PRINT_RECTS(pScrPriv->region);\
- REGION_UNION(pScreen,&pScrPriv->region,&pScrPriv->region,&region);\
+ RegionUnion(&pScrPriv->region,&pScrPriv->region,&region);\
PRINT_RECTS(pScrPriv->region);\
- REGION_UNINIT(pScreen,&region);\
+ RegionUninit(&region);\
}\
}\
}
@@ -2234,11 +2234,11 @@ xxPushPixels(
RegionRec region; \
xxScrPriv(pScreen);\
ScreenPtr pScreen = pScreen;\
- REGION_INIT (pScreen, &region, &box, 1); \
+ RegionInit(&region, &box, 1); \
PRINT_RECTS(pScrPriv->region);\
- REGION_UNION(pScreen,&pScrPriv->region,&pScrPriv->region,&region);\
+ RegionUnion(&pScrPriv->region,&pScrPriv->region,&region);\
PRINT_RECTS(pScrPriv->region);\
- REGION_UNINIT(pScreen,&region);\
+ RegionUninit(&region);\
}\
}
diff --git a/nx-X11/programs/Xserver/fb/fbpush.c b/nx-X11/programs/Xserver/fb/fbpush.c
index 8f1336963..78d2e450d 100644
--- a/nx-X11/programs/Xserver/fb/fbpush.c
+++ b/nx-X11/programs/Xserver/fb/fbpush.c
@@ -192,8 +192,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/nx-X11/programs/Xserver/fb/fbseg.c b/nx-X11/programs/Xserver/fb/fbseg.c
index 18a996e0c..2947992a6 100644
--- a/nx-X11/programs/Xserver/fb/fbseg.c
+++ b/nx-X11/programs/Xserver/fb/fbseg.c
@@ -615,8 +615,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/nx-X11/programs/Xserver/fb/fbsetsp.c b/nx-X11/programs/Xserver/fb/fbsetsp.c
index eefc2da82..c7074f036 100644
--- a/nx-X11/programs/Xserver/fb/fbsetsp.c
+++ b/nx-X11/programs/Xserver/fb/fbsetsp.c
@@ -63,8 +63,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/nx-X11/programs/Xserver/fb/fbwindow.c b/nx-X11/programs/Xserver/fb/fbwindow.c
index 1269902b9..5ce7ba729 100644
--- a/nx-X11/programs/Xserver/fb/fbwindow.c
+++ b/nx-X11/programs/Xserver/fb/fbwindow.c
@@ -132,15 +132,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
@@ -148,7 +148,7 @@ fbCopyWindow(WindowPtr pWin,
0,
&rgnDst, dx, dy, fbCopyWindowProc, 0, 0);
- REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
fbValidateDrawable (&pWin->drawable);
}
@@ -215,8 +215,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);
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
@@ -253,8 +253,8 @@ fbFillRegionTiled (DrawablePtr pDrawable,
int tileBpp;
int tileXoff, tileYoff; /* XXX assumed to be zero */
int tileWidth, tileHeight;
- int n = REGION_NUM_RECTS(pRegion);
- BoxPtr pbox = REGION_RECTS(pRegion);
+ int n = RegionNumRects(pRegion);
+ BoxPtr pbox = RegionRects(pRegion);
int xRot = pDrawable->x;
int yRot = pDrawable->y;