aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/render/mipict.c
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/render/mipict.c
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/render/mipict.c')
-rw-r--r--nx-X11/programs/Xserver/render/mipict.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/nx-X11/programs/Xserver/render/mipict.c b/nx-X11/programs/Xserver/render/mipict.c
index cf9c27f01..ae7cf5a6d 100644
--- a/nx-X11/programs/Xserver/render/mipict.c
+++ b/nx-X11/programs/Xserver/render/mipict.c
@@ -48,7 +48,7 @@ void
miDestroyPicture (PicturePtr pPicture)
{
if (pPicture->freeCompClip)
- REGION_DESTROY(pPicture->pDrawable->pScreen, pPicture->pCompositeClip);
+ RegionDestroy(pPicture->pCompositeClip);
}
void
@@ -65,7 +65,7 @@ miDestroyPictureClip (PicturePtr pPicture)
* we know we'll never have a list of rectangles, since ChangeClip
* immediately turns them into a region
*/
- REGION_DESTROY(pPicture->pDrawable->pScreen, pPicture->clientClip);
+ RegionDestroy(pPicture->clientClip);
break;
}
pPicture->clientClip = NULL;
@@ -86,7 +86,7 @@ miChangePictureClip (PicturePtr pPicture,
switch (type) {
case CT_PIXMAP:
/* convert the pixmap to a region */
- clientClip = (void *) BITMAP_TO_REGION(pScreen, (PixmapPtr) value);
+ clientClip = (void *) BitmapToRegion(pScreen, (PixmapPtr) value);
if (!clientClip)
return BadAlloc;
clientClipType = CT_REGION;
@@ -101,7 +101,7 @@ miChangePictureClip (PicturePtr pPicture,
clientClipType = CT_NONE;
break;
default:
- clientClip = (void *) RECTS_TO_REGION(pScreen, n,
+ clientClip = (void *) RegionFromRects(n,
(xRectangle *) value,
type);
if (!clientClip)
@@ -162,7 +162,7 @@ miValidatePicture (PicturePtr pPicture,
if (pPicture->clientClipType == CT_NONE)
{
if (freeCompClip)
- REGION_DESTROY(pScreen, pPicture->pCompositeClip);
+ RegionDestroy(pPicture->pCompositeClip);
pPicture->pCompositeClip = pregWin;
pPicture->freeCompClip = freeTmpClip;
}
@@ -177,30 +177,30 @@ miValidatePicture (PicturePtr pPicture,
* clip. if neither is real, create a new region.
*/
- REGION_TRANSLATE(pScreen, pPicture->clientClip,
+ RegionTranslate(pPicture->clientClip,
pDrawable->x + pPicture->clipOrigin.x,
pDrawable->y + pPicture->clipOrigin.y);
if (freeCompClip)
{
- REGION_INTERSECT(pScreen, pPicture->pCompositeClip,
+ RegionIntersect(pPicture->pCompositeClip,
pregWin, pPicture->clientClip);
if (freeTmpClip)
- REGION_DESTROY(pScreen, pregWin);
+ RegionDestroy(pregWin);
}
else if (freeTmpClip)
{
- REGION_INTERSECT(pScreen, pregWin, pregWin, pPicture->clientClip);
+ RegionIntersect(pregWin, pregWin, pPicture->clientClip);
pPicture->pCompositeClip = pregWin;
}
else
{
- pPicture->pCompositeClip = REGION_CREATE(pScreen, NullBox, 0);
- REGION_INTERSECT(pScreen, pPicture->pCompositeClip,
+ pPicture->pCompositeClip = RegionCreate(NullBox, 0);
+ RegionIntersect(pPicture->pCompositeClip,
pregWin, pPicture->clientClip);
}
pPicture->freeCompClip = TRUE;
- REGION_TRANSLATE(pScreen, pPicture->clientClip,
+ RegionTranslate(pPicture->clientClip,
-(pDrawable->x + pPicture->clipOrigin.x),
-(pDrawable->y + pPicture->clipOrigin.y));
}
@@ -218,31 +218,31 @@ miValidatePicture (PicturePtr pPicture,
if (pPicture->freeCompClip)
{
- REGION_RESET(pScreen, pPicture->pCompositeClip, &pixbounds);
+ RegionReset(pPicture->pCompositeClip, &pixbounds);
}
else
{
pPicture->freeCompClip = TRUE;
- pPicture->pCompositeClip = REGION_CREATE(pScreen, &pixbounds, 1);
+ pPicture->pCompositeClip = RegionCreate(&pixbounds, 1);
}
if (pPicture->clientClipType == CT_REGION)
{
if(pDrawable->x || pDrawable->y) {
- REGION_TRANSLATE(pScreen, pPicture->clientClip,
+ RegionTranslate(pPicture->clientClip,
pDrawable->x + pPicture->clipOrigin.x,
pDrawable->y + pPicture->clipOrigin.y);
- REGION_INTERSECT(pScreen, pPicture->pCompositeClip,
+ RegionIntersect(pPicture->pCompositeClip,
pPicture->pCompositeClip, pPicture->clientClip);
- REGION_TRANSLATE(pScreen, pPicture->clientClip,
+ RegionTranslate(pPicture->clientClip,
-(pDrawable->x + pPicture->clipOrigin.x),
-(pDrawable->y + pPicture->clipOrigin.y));
} else {
- REGION_TRANSLATE(pScreen, pPicture->pCompositeClip,
+ RegionTranslate(pPicture->pCompositeClip,
-pPicture->clipOrigin.x, -pPicture->clipOrigin.y);
- REGION_INTERSECT(pScreen, pPicture->pCompositeClip,
+ RegionIntersect(pPicture->pCompositeClip,
pPicture->pCompositeClip, pPicture->clientClip);
- REGION_TRANSLATE(pScreen, pPicture->pCompositeClip,
+ RegionTranslate(pPicture->pCompositeClip,
pPicture->clipOrigin.x, pPicture->clipOrigin.y);
}
}
@@ -274,11 +274,11 @@ miClipPictureReg (RegionPtr pRegion,
int dx,
int dy)
{
- if (REGION_NUM_RECTS(pRegion) == 1 &&
- REGION_NUM_RECTS(pClip) == 1)
+ if (RegionNumRects(pRegion) == 1 &&
+ RegionNumRects(pClip) == 1)
{
- BoxPtr pRbox = REGION_RECTS(pRegion);
- BoxPtr pCbox = REGION_RECTS(pClip);
+ BoxPtr pRbox = RegionRects(pRegion);
+ BoxPtr pCbox = RegionRects(pClip);
int v;
if (pRbox->x1 < (v = pCbox->x1 + dx))
@@ -292,21 +292,21 @@ miClipPictureReg (RegionPtr pRegion,
if (pRbox->x1 >= pRbox->x2 ||
pRbox->y1 >= pRbox->y2)
{
- REGION_EMPTY(pScreen, pRegion);
+ RegionEmpty(pRegion);
}
}
- else if (!REGION_NOTEMPTY (pScreen, pClip))
+ else if (!RegionNotEmpty(pClip))
return FALSE;
else
{
if (dx || dy)
- REGION_TRANSLATE(pScreen, pRegion, -dx, -dy);
- if (!REGION_INTERSECT (pScreen, pRegion, pRegion, pClip))
+ RegionTranslate(pRegion, -dx, -dy);
+ if (!RegionIntersect(pRegion, pRegion, pClip))
return FALSE;
if (dx || dy)
- REGION_TRANSLATE(pScreen, pRegion, dx, dy);
+ RegionTranslate(pRegion, dx, dy);
}
- return REGION_NOTEMPTY(pScreen, pRegion);
+ return RegionNotEmpty(pRegion);
}
static __inline Bool
@@ -322,13 +322,13 @@ miClipPictureSrc (RegionPtr pRegion,
{
if (pPicture->clientClipType != CT_NONE)
{
- REGION_TRANSLATE(pScreen, pRegion,
+ RegionTranslate(pRegion,
dx - pPicture->clipOrigin.x,
dy - pPicture->clipOrigin.y);
- if (!REGION_INTERSECT (pScreen, pRegion, pRegion,
+ if (!RegionIntersect(pRegion, pRegion,
(RegionPtr) pPicture->clientClip))
return FALSE;
- REGION_TRANSLATE(pScreen, pRegion,
+ RegionTranslate(pRegion,
- (dx - pPicture->clipOrigin.x),
- (dy - pPicture->clipOrigin.y));
}
@@ -432,13 +432,13 @@ miComputeCompositeRegion (RegionPtr pRegion,
if (pRegion->extents.x1 >= pRegion->extents.x2 ||
pRegion->extents.y1 >= pRegion->extents.y2)
{
- REGION_EMPTY (pDst->pDrawable->pScreen, pRegion);
+ RegionEmpty(pRegion);
return FALSE;
}
/* clip against dst */
if (!miClipPictureReg (pRegion, pDst->pCompositeClip, 0, 0))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
if (pDst->alphaMap)
@@ -447,14 +447,14 @@ miComputeCompositeRegion (RegionPtr pRegion,
-pDst->alphaOrigin.x,
-pDst->alphaOrigin.y))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
}
/* clip against src */
if (!miClipPictureSrc (pRegion, pSrc, xDst - xSrc, yDst - ySrc))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
if (pSrc->alphaMap)
@@ -463,7 +463,7 @@ miComputeCompositeRegion (RegionPtr pRegion,
xDst - (xSrc + pSrc->alphaOrigin.x),
yDst - (ySrc + pSrc->alphaOrigin.y)))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
}
@@ -472,7 +472,7 @@ miComputeCompositeRegion (RegionPtr pRegion,
{
if (!miClipPictureSrc (pRegion, pMask, xDst - xMask, yDst - yMask))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
if (pMask->alphaMap)
@@ -481,7 +481,7 @@ miComputeCompositeRegion (RegionPtr pRegion,
xDst - (xMask + pMask->alphaOrigin.x),
yDst - (yMask + pMask->alphaOrigin.y)))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
}