aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi/mibitblt.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
commitd1e4f4b8546c7955c66dd023bfd6ef437db9d21d (patch)
tree529985e77bfc95aa95fe5b540e8f42b0ef041206 /xorg-server/mi/mibitblt.c
parent13919cf85a6ca41d97238de13344aba59e0f7680 (diff)
parent4c61bf84b11e26e6f22648668c95ea760a379163 (diff)
downloadvcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.gz
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.bz2
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/mi/mibitblt.c')
-rw-r--r--xorg-server/mi/mibitblt.c53
1 files changed, 24 insertions, 29 deletions
diff --git a/xorg-server/mi/mibitblt.c b/xorg-server/mi/mibitblt.c
index b1e188d5a..3374ae385 100644
--- a/xorg-server/mi/mibitblt.c
+++ b/xorg-server/mi/mibitblt.c
@@ -116,7 +116,7 @@ miCopyArea(DrawablePtr pSrcDrawable,
box.x2 = pSrcDrawable->x + (int) pSrcDrawable->width;
box.y2 = pSrcDrawable->y + (int) pSrcDrawable->height;
- prgnSrcClip = REGION_CREATE(pGC->pScreen, &box, 1);
+ prgnSrcClip = RegionCreate(&box, 1);
realSrcClip = 1;
}
else
@@ -145,17 +145,14 @@ miCopyArea(DrawablePtr pSrcDrawable,
pptFirst = ppt = malloc(heightSrc * sizeof(DDXPointRec));
pwidthFirst = pwidth = malloc(heightSrc * sizeof(unsigned int));
- numRects = REGION_NUM_RECTS(prgnSrcClip);
- boxes = REGION_RECTS(prgnSrcClip);
+ numRects = RegionNumRects(prgnSrcClip);
+ boxes = RegionRects(prgnSrcClip);
ordering = malloc(numRects * sizeof(unsigned int));
if(!pptFirst || !pwidthFirst || !ordering)
{
- if (ordering)
- free(ordering);
- if (pwidthFirst)
- free(pwidthFirst);
- if (pptFirst)
- free(pptFirst);
+ free(ordering);
+ free(pwidthFirst);
+ free(pptFirst);
return NULL;
}
@@ -259,7 +256,7 @@ miCopyArea(DrawablePtr pSrcDrawable,
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn,
widthSrc, heightSrc, xOut, yOut, (unsigned long)0);
if(realSrcClip)
- REGION_DESTROY(pGC->pScreen, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
free(ordering);
free(pwidthFirst);
@@ -382,7 +379,7 @@ miGetPlane(
pOut += delta;
}
}
- return(result);
+ return result;
}
@@ -433,8 +430,8 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
pwidth = pwidthFirst = malloc(h * sizeof(int));
if(!pptFirst || !pwidthFirst)
{
- if (pwidthFirst) free(pwidthFirst);
- if (pptFirst) free(pptFirst);
+ free(pwidthFirst);
+ free(pptFirst);
FreeScratchGC(pGCT);
return;
}
@@ -443,9 +440,9 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
to destroy what it's sent. note that this means we don't
have to free prgnSrcClip ourselves.
*/
- prgnSrcClip = REGION_CREATE(pGCT->pScreen, NULL, 0);
- REGION_COPY(pGCT->pScreen, prgnSrcClip, prgnSrc);
- REGION_TRANSLATE(pGCT->pScreen, prgnSrcClip, srcx, 0);
+ prgnSrcClip = RegionCreate(NULL, 0);
+ RegionCopy(prgnSrcClip, prgnSrc);
+ RegionTranslate(prgnSrcClip, srcx, 0);
(*pGCT->funcs->ChangeClip)(pGCT, CT_REGION, prgnSrcClip, 0);
ValidateGC((DrawablePtr)pPixmap, pGCT);
@@ -578,7 +575,7 @@ miCopyPlane( DrawablePtr pSrcDrawable,
box.x2 = box.x1;
if (box.y1 > box.y2)
box.y2 = box.y1;
- prgnSrc = REGION_CREATE(pGC->pScreen, &box, 1);
+ prgnSrc = RegionCreate(&box, 1);
if (pSrcDrawable->type != DRAWABLE_PIXMAP) {
/* clip to visible drawable */
@@ -586,15 +583,15 @@ miCopyPlane( DrawablePtr pSrcDrawable,
if (pGC->subWindowMode == IncludeInferiors)
{
RegionPtr clipList = NotClippedByChildren ((WindowPtr) pSrcDrawable);
- REGION_INTERSECT(pGC->pScreen, prgnSrc, prgnSrc, clipList);
- REGION_DESTROY(pGC->pScreen, clipList);
+ RegionIntersect(prgnSrc, prgnSrc, clipList);
+ RegionDestroy(clipList);
} else
- REGION_INTERSECT(pGC->pScreen, prgnSrc, prgnSrc,
+ RegionIntersect(prgnSrc, prgnSrc,
&((WindowPtr)pSrcDrawable)->clipList);
}
- box = *REGION_EXTENTS(pGC->pScreen, prgnSrc);
- REGION_TRANSLATE(pGC->pScreen, prgnSrc, -box.x1, -box.y1);
+ box = *RegionExtents(prgnSrc);
+ RegionTranslate(prgnSrc, -box.x1, -box.y1);
if ((box.x2 > box.x1) && (box.y2 > box.y1))
{
@@ -618,7 +615,7 @@ miCopyPlane( DrawablePtr pSrcDrawable,
}
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy,
width, height, dstx, dsty, bitPlane);
- REGION_DESTROY(pGC->pScreen, prgnSrc);
+ RegionDestroy(prgnSrc);
return prgnExposed;
}
@@ -761,11 +758,11 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth,
box.y1 = 0;
box.x2 = w;
box.y2 = h;
- prgnSrc = REGION_CREATE(pGC->pScreen, &box, 1);
+ prgnSrc = RegionCreate(&box, 1);
miOpqStipDrawable(pDraw, pGC, prgnSrc, (MiBits *) pImage,
leftPad, w, h, x, y);
- REGION_DESTROY(pGC->pScreen, prgnSrc);
+ RegionDestroy(prgnSrc);
break;
case XYPixmap:
@@ -801,10 +798,8 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth,
pwidth = pwidthFirst = malloc(h * sizeof(int));
if(!pptFirst || !pwidthFirst)
{
- if (pwidthFirst)
- free(pwidthFirst);
- if (pptFirst)
- free(pptFirst);
+ free(pwidthFirst);
+ free(pptFirst);
return;
}
if (pGC->miTranslate)