aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xace.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/xace.c')
-rw-r--r--xorg-server/Xext/xace.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/xorg-server/Xext/xace.c b/xorg-server/Xext/xace.c
index 648de53fe..bc621ff85 100644
--- a/xorg-server/Xext/xace.c
+++ b/xorg-server/Xext/xace.c
@@ -243,24 +243,21 @@ XaceCensorImage(
unsigned int format,
char *pBuf)
{
- ScreenPtr pScreen;
RegionRec imageRegion; /* region representing x,y,w,h */
RegionRec censorRegion; /* region to obliterate */
BoxRec imageBox;
int nRects;
- pScreen = pDraw->pScreen;
-
imageBox.x1 = x;
imageBox.y1 = y;
imageBox.x2 = x + w;
imageBox.y2 = y + h;
- REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
- REGION_NULL(pScreen, &censorRegion);
+ RegionInit(&imageRegion, &imageBox, 1);
+ RegionNull(&censorRegion);
/* censorRegion = imageRegion - visibleRegion */
- REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion);
- nRects = REGION_NUM_RECTS(&censorRegion);
+ RegionSubtract(&censorRegion, &imageRegion, pVisibleRegion);
+ nRects = RegionNumRects(&censorRegion);
if (nRects > 0)
{ /* we have something to censor */
GCPtr pScratchGC = NULL;
@@ -280,7 +277,7 @@ XaceCensorImage(
failed = TRUE;
goto failSafe;
}
- for (pBox = REGION_RECTS(&censorRegion), i = 0;
+ for (pBox = RegionRects(&censorRegion), i = 0;
i < nRects;
i++, pBox++)
{
@@ -324,14 +321,14 @@ XaceCensorImage(
/* Censoring was not completed above. To be safe, wipe out
* all the image data so that nothing trusted gets out.
*/
- bzero(pBuf, (int)(widthBytesLine * h));
+ memset(pBuf, 0, (int)(widthBytesLine * h));
}
- if (pRects) free(pRects);
+ free(pRects);
if (pScratchGC) FreeScratchGC(pScratchGC);
if (pPix) FreeScratchPixmapHeader(pPix);
}
- REGION_UNINIT(pScreen, &imageRegion);
- REGION_UNINIT(pScreen, &censorRegion);
+ RegionUninit(&imageRegion);
+ RegionUninit(&censorRegion);
} /* XaceCensorImage */
/*