aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/render/mipict.c
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2016-05-13 06:19:21 +0200
committerMihai Moldovan <ionic@ionic.de>2016-05-13 06:19:21 +0200
commitaba2a534f630f5b65a53e0ea7cdba17b77263f87 (patch)
tree8c4e2be57984a1d9e6143944d080e19f6c3049ec /nx-X11/programs/Xserver/render/mipict.c
parent6c6b6b962654ac3c15d27aafbe583ee74e4f2266 (diff)
parent52dc49607e244c0e39b5d7cbdb8b41755f078aac (diff)
downloadnx-libs-aba2a534f630f5b65a53e0ea7cdba17b77263f87.tar.gz
nx-libs-aba2a534f630f5b65a53e0ea7cdba17b77263f87.tar.bz2
nx-libs-aba2a534f630f5b65a53e0ea7cdba17b77263f87.zip
Merge branch 'sunweaver-pr/nxagent-no-compiler-warnings' into arctica-3.6.x
Attributes GH PR #102: https://github.com/ArcticaProject/nx-libs/pull/102
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;
}
}