summaryrefslogtreecommitdiff
path: root/render/picture.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-05-21 15:05:48 -0700
committerKeith Packard <keithp@keithp.com>2010-06-05 18:59:00 -0700
commit2dc138922b7588515d5f2447e4b9dcdc0bef15e0 (patch)
tree004ca1d730f94a78150c30b3fbc0c87af31f2895 /render/picture.c
parentd17e726e89ef644310de77b960b715c2d11088da (diff)
Rename region macros to eliminate screen argument
This is a combination of 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 tree: $ 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. The hand-done changes involve removing functions from dix/region.c that duplicate inline functions in include/regionstr.h, along with their declarations in regionstr.h, mi.h and mispans.h. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'render/picture.c')
-rw-r--r--render/picture.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/render/picture.c b/render/picture.c
index 211fa38b3..ca5e18e74 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -1298,7 +1298,7 @@ SetPictureClipRects (PicturePtr pPicture,
RegionPtr clientClip;
int result;
- clientClip = RECTS_TO_REGION(pScreen,
+ clientClip = RegionFromRects(
nRect, rects, CT_UNSORTED);
if (!clientClip)
return BadAlloc;
@@ -1329,14 +1329,14 @@ SetPictureClipRegion (PicturePtr pPicture,
if (pRegion)
{
type = CT_REGION;
- clientClip = REGION_CREATE (pScreen,
- REGION_EXTENTS(pScreen, pRegion),
- REGION_NUM_RECTS(pRegion));
+ clientClip = RegionCreate(
+ RegionExtents(pRegion),
+ RegionNumRects(pRegion));
if (!clientClip)
return BadAlloc;
- if (!REGION_COPY (pSCreen, clientClip, pRegion))
+ if (!RegionCopy(clientClip, pRegion))
{
- REGION_DESTROY (pScreen, clientClip);
+ RegionDestroy(clientClip);
return BadAlloc;
}
}
@@ -1462,9 +1462,9 @@ CopyPicture (PicturePtr pSrc,
RegionPtr clientClip;
RegionPtr srcClientClip = (RegionPtr)pSrc->clientClip;
- clientClip = REGION_CREATE(pSrc->pDrawable->pScreen,
- REGION_EXTENTS(pSrc->pDrawable->pScreen, srcClientClip),
- REGION_NUM_RECTS(srcClientClip));
+ clientClip = RegionCreate(
+ RegionExtents(srcClientClip),
+ RegionNumRects(srcClientClip));
(*ps->ChangePictureClip)(pDst, CT_REGION, clientClip, 0);
}
break;