diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/GCOps.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/GCOps.c | 72 |
1 files changed, 34 insertions, 38 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c index 25f5fa6d7..5f753ffe4 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); } @@ -594,8 +594,6 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, unsigned int format; unsigned long planeMask = 0xffffffff; - int oldDstxyValue; - RegionPtr pDstRegion; int skip = 0; @@ -651,8 +649,6 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, } } - oldDstxyValue = dsty; - if (dsty + pDstDrawable->y + height > 32767) { #ifdef WARNING @@ -1032,12 +1028,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 +1049,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, nxagentFreeRegion(pDstDrawable, pDstRegion); } - REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion); + RegionUninit(&corruptedRegion); nxagentFreeRegion(pSrcDrawable, pSrcRegion); } @@ -1615,24 +1611,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 +1668,7 @@ void nxagentPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, } } - REGION_DESTROY(pDrawable -> pScreen, rectRegion); + RegionDestroy(rectRegion); } if ((pDrawable)->type == DRAWABLE_PIXMAP) |