diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-03-16 11:11:43 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-05-02 14:53:06 +0200 |
commit | 63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4 (patch) | |
tree | 3d67994a85c5d8c3a929ab315fbcb617baa6423d /nx-X11/programs/Xserver/hw/nxagent/GCOps.c | |
parent | 28ba877803d8383eac282b873b8e0bb50c8db46b (diff) | |
download | nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.gz nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.bz2 nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.zip |
Rename region macros to eliminate screen argument
This is 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 nx-X11/programs/Xserver tree:
$ cd nx-X11/programs/Xserver && ( 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.
v1: Keith Packard <keithp@keithp.com> (X.Org xserver commit: 2dc138922b7588515d5f2447e4b9dcdc0bef15e0)
v2: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (apply fix-region script to nx-libs)
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/GCOps.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/GCOps.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c index 25f5fa6d7..604b1d85a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c @@ -306,12 +306,12 @@ FIXME: The popup could be synchronized with one pSrcRegion -> extents.x2, pSrcRegion -> extents.y2); #endif - REGION_INIT(pSrcDrawable -> pScreen, &corruptedRegion, NullBox, 1); + RegionInit(&corruptedRegion, NullBox, 1); - REGION_INTERSECT(pSrcDrawable -> pScreen, &corruptedRegion, + RegionIntersect(&corruptedRegion, pSrcRegion, nxagentCorruptedRegion(pSrcDrawable)); - if (REGION_NIL(&corruptedRegion) == 0) + if (RegionNil(&corruptedRegion) == 0) { #ifdef TEST fprintf(stderr, "nxagentDeferCopyArea: Forcing the synchronization of source drawable at [%p].\n", @@ -321,7 +321,7 @@ FIXME: The popup could be synchronized with one nxagentSynchronizeRegion(pSrcDrawable, &corruptedRegion, EVENT_BREAK, NULL); } - REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion); + RegionUninit(&corruptedRegion); nxagentFreeRegion(pSrcDrawable, pSrcRegion); @@ -361,7 +361,7 @@ FIXME: The popup could be synchronized with one pClipRegion -> extents.x2, pClipRegion -> extents.y2); #endif - REGION_SUBTRACT(pSrcDrawable -> pScreen, pClipRegion, pClipRegion, nxagentCorruptedRegion(pSrcDrawable)); + RegionSubtract(pClipRegion, pClipRegion, nxagentCorruptedRegion(pSrcDrawable)); #ifdef DEBUG fprintf(stderr, "nxagentDeferCopyArea: Usable copy area source region is [%d,%d,%d,%d].\n", @@ -381,11 +381,11 @@ FIXME: The popup could be synchronized with one #endif - REGION_TRANSLATE(pSrcDrawable -> pScreen, pClipRegion, dstx - srcx, dsty - srcy); + RegionTranslate(pClipRegion, dstx - srcx, dsty - srcy); } else { - REGION_INIT(pDstDrawable -> pScreen, &tmpRegion, NullBox, 1); + RegionInit(&tmpRegion, NullBox, 1); #ifdef DEBUG fprintf(stderr, "nxagentDeferCopyArea: Going to modify the original GC [%p] with clip mask " @@ -396,18 +396,18 @@ FIXME: The popup could be synchronized with one pGC -> clipOrg.x, pGC -> clipOrg.y); #endif - REGION_COPY(pDstDrawable -> pScreen, &tmpRegion, (RegionPtr) pGC -> clientClip); + RegionCopy(&tmpRegion, (RegionPtr) pGC -> clientClip); if (pGC -> clipOrg.x != 0 || pGC -> clipOrg.y != 0) { - REGION_TRANSLATE(pDstDrawable -> pScreen, &tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y); + RegionTranslate(&tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y); } - REGION_TRANSLATE(pSrcDrawable -> pScreen, pClipRegion, dstx - srcx, dsty - srcy); + RegionTranslate(pClipRegion, dstx - srcx, dsty - srcy); - REGION_INTERSECT(pSrcDrawable -> pScreen, pClipRegion, &tmpRegion, pClipRegion); + RegionIntersect(pClipRegion, &tmpRegion, pClipRegion); - REGION_UNINIT(pSrcDrawable -> pScreen, &tmpRegion); + RegionUninit(&tmpRegion); } /* @@ -416,18 +416,18 @@ FIXME: The popup could be synchronized with one * destination that we are not going to copy. */ - REGION_SUBTRACT(pSrcDrawable -> pScreen, pCorruptedRegion, pCorruptedRegion, pClipRegion); + RegionSubtract(pCorruptedRegion, pCorruptedRegion, pClipRegion); #ifdef DEBUG fprintf(stderr, "nxagentDeferCopyArea: Recomputed clip region is [%d,%d,%d,%d][%ld].\n", pClipRegion -> extents.x1, pClipRegion -> extents.y1, pClipRegion -> extents.x2, pClipRegion -> extents.y2, - REGION_NUM_RECTS(pClipRegion)); + RegionNumRects(pClipRegion)); fprintf(stderr, "nxagentDeferCopyArea: Inherited corrupted region is [%d,%d,%d,%d][%ld].\n", pCorruptedRegion -> extents.x1, pCorruptedRegion -> extents.y1, pCorruptedRegion -> extents.x2, pCorruptedRegion -> extents.y2, - REGION_NUM_RECTS(pCorruptedRegion)); + RegionNumRects(pCorruptedRegion)); #endif /* @@ -435,17 +435,17 @@ FIXME: The popup could be synchronized with one * synchronized and the corrupted region. */ - if (REGION_NIL(pClipRegion) == 0) + if (RegionNil(pClipRegion) == 0) { nxagentUnmarkCorruptedRegion(pDstDrawable, pClipRegion); } - if (REGION_NIL(pCorruptedRegion) == 0) + if (RegionNil(pCorruptedRegion) == 0) { nxagentMarkCorruptedRegion(pDstDrawable, pCorruptedRegion); } - if (REGION_NIL(pClipRegion) == 0) + if (RegionNil(pClipRegion) == 0) { GCPtr targetGC; @@ -468,7 +468,7 @@ FIXME: The popup could be synchronized with one GCClipXOrigin | GCClipYOrigin | GCClipMask | GCForeground | GCBackground | GCGraphicsExposures); - if (REGION_NUM_RECTS(pClipRegion) == 1) + if (RegionNumRects(pClipRegion) == 1) { /* * If the region to copy is formed by one @@ -563,12 +563,12 @@ FIXME: The popup could be synchronized with one pSrcRegion -> extents.x2, pSrcRegion -> extents.y2); #endif - REGION_INIT(pSrcDrawable -> pScreen, &corruptedRegion, NullBox, 1); + RegionInit(&corruptedRegion, NullBox, 1); - REGION_INTERSECT(pSrcDrawable -> pScreen, &corruptedRegion, + RegionIntersect(&corruptedRegion, pSrcRegion, nxagentCorruptedRegion(pSrcDrawable)); - if (REGION_NIL(&corruptedRegion) == 0) + if (RegionNil(&corruptedRegion) == 0) { #ifdef TEST fprintf(stderr, "nxagentDeferCopyArea: Forcing the synchronization of source drawable at [%p].\n", @@ -578,7 +578,7 @@ FIXME: The popup could be synchronized with one nxagentSynchronizeRegion(pSrcDrawable, &corruptedRegion /*pSrcRegion*/, NEVER_BREAK, NULL); } - REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion); + RegionUninit(&corruptedRegion); nxagentFreeRegion(pSrcDrawable, pSrcRegion); } @@ -1032,12 +1032,12 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, { pSrcRegion = nxagentCreateRegion(pSrcDrawable, NULL, srcx, srcy, width, height); - REGION_INIT(pSrcDrawable -> pScreen, &corruptedRegion, NullBox, 1); + RegionInit(&corruptedRegion, NullBox, 1); - REGION_INTERSECT(pSrcDrawable -> pScreen, &corruptedRegion, + RegionIntersect(&corruptedRegion, pSrcRegion, nxagentCorruptedRegion(pSrcDrawable)); - if (REGION_NIL(&corruptedRegion) == 0) + if (RegionNil(&corruptedRegion) == 0) { #ifdef TEST fprintf(stderr, "nxagentCopyPlane: Forcing the synchronization of source drawable at [%p].\n", @@ -1053,7 +1053,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, nxagentFreeRegion(pDstDrawable, pDstRegion); } - REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion); + RegionUninit(&corruptedRegion); nxagentFreeRegion(pSrcDrawable, pSrcRegion); } @@ -1615,24 +1615,24 @@ void nxagentPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, if (inheritCorruptedRegion == 1 || nxagentDrawableStatus(pDrawable) == NotSynchronized) { - rectRegion = RECTS_TO_REGION(pDrawable -> pScreen, nRectangles, pRectangles, CT_REGION); + rectRegion = RegionFromRects(nRectangles, pRectangles, CT_REGION); if (pGC -> clientClip != NULL) { RegionRec tmpRegion; - REGION_INIT(pDrawable -> pScreen, &tmpRegion, NullBox, 1); + RegionInit(&tmpRegion, NullBox, 1); - REGION_COPY(pDrawable -> pScreen, &tmpRegion, ((RegionPtr) pGC -> clientClip)); + RegionCopy(&tmpRegion, ((RegionPtr) pGC -> clientClip)); if (pGC -> clipOrg.x != 0 || pGC -> clipOrg.y != 0) { - REGION_TRANSLATE(pDrawable -> pScreen, &tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y); + RegionTranslate(&tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y); } - REGION_INTERSECT(pDrawable -> pScreen, rectRegion, rectRegion, &tmpRegion); + RegionIntersect(rectRegion, rectRegion, &tmpRegion); - REGION_UNINIT(pDrawable -> pScreen, &tmpRegion); + RegionUninit(&tmpRegion); } if (inheritCorruptedRegion == 1) @@ -1672,7 +1672,7 @@ void nxagentPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, } } - REGION_DESTROY(pDrawable -> pScreen, rectRegion); + RegionDestroy(rectRegion); } if ((pDrawable)->type == DRAWABLE_PIXMAP) |