From 4c61bf84b11e26e6f22648668c95ea760a379163 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 11 Jun 2010 12:14:52 +0000 Subject: xserver git update 11/6/2010 --- xorg-server/Xext/xace.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'xorg-server/Xext/xace.c') 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 */ /* -- cgit v1.2.3