From: Pierre Ossman Date: Fri, 1 May 2020 13:30:04 +0000 (+0200) Subject: Stop using legacy region macros X-Git-Tag: v1.10.90~17^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0f4f5573966c70ef56b708a109f07f50c65055e6;p=tigervnc.git Stop using legacy region macros We no longer support such old X servers so start using the current functions. --- diff --git a/unix/xserver/hw/vnc/vncHooks.c b/unix/xserver/hw/vnc/vncHooks.c index 9c24e897..1b6e48b8 100644 --- a/unix/xserver/hw/vnc/vncHooks.c +++ b/unix/xserver/hw/vnc/vncHooks.c @@ -337,12 +337,12 @@ static inline void add_changed(ScreenPtr pScreen, RegionPtr reg) vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate(pScreen); if (vncHooksScreen->ignoreHooks) return; - if (REGION_NIL(reg)) + if (RegionNil(reg)) return; vncAddChanged(pScreen->myNum, - (const struct UpdateRect*)REGION_EXTENTS(pScreen, reg), - REGION_NUM_RECTS(reg), - (const struct UpdateRect*)REGION_RECTS(reg)); + (const struct UpdateRect*)RegionExtents(reg), + RegionNumRects(reg), + (const struct UpdateRect*)RegionRects(reg)); } static inline void add_copied(ScreenPtr pScreen, RegionPtr dst, @@ -351,12 +351,12 @@ static inline void add_copied(ScreenPtr pScreen, RegionPtr dst, vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate(pScreen); if (vncHooksScreen->ignoreHooks) return; - if (REGION_NIL(dst)) + if (RegionNil(dst)) return; vncAddCopied(pScreen->myNum, - (const struct UpdateRect*)REGION_EXTENTS(pScreen, dst), - REGION_NUM_RECTS(dst), - (const struct UpdateRect*)REGION_RECTS(dst), dx, dy); + (const struct UpdateRect*)RegionExtents(dst), + RegionNumRects(dst), + (const struct UpdateRect*)RegionRects(dst), dx, dy); } static inline Bool is_visible(DrawablePtr drawable) @@ -478,15 +478,15 @@ static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, SCREEN_PROLOGUE(pWin->drawable.pScreen, CopyWindow); - REGION_NULL(pScreen, &copied); - REGION_COPY(pScreen, &copied, pOldRegion); + RegionNull(&copied); + RegionCopy(&copied, pOldRegion); screen_box.x1 = 0; screen_box.y1 = 0; screen_box.x2 = pScreen->width; screen_box.y2 = pScreen->height; - REGION_INIT(pScreen, &screen_rgn, &screen_box, 1); + RegionInit(&screen_rgn, &screen_box, 1); dx = pWin->drawable.x - ptOldOrg.x; dy = pWin->drawable.y - ptOldOrg.y; @@ -495,17 +495,17 @@ static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, // We also need to copy with changes to the Window's clipping region. // Finally, make sure we don't get copies to or from regions outside // the framebuffer. - REGION_INTERSECT(pScreen, &copied, &copied, &screen_rgn); - REGION_TRANSLATE(pScreen, &copied, dx, dy); - REGION_INTERSECT(pScreen, &copied, &copied, &screen_rgn); - REGION_INTERSECT(pScreen, &copied, &copied, &pWin->borderClip); + RegionIntersect(&copied, &copied, &screen_rgn); + RegionTranslate(&copied, dx, dy); + RegionIntersect(&copied, &copied, &screen_rgn); + RegionIntersect(&copied, &copied, &pWin->borderClip); (*pScreen->CopyWindow) (pWin, ptOldOrg, pOldRegion); add_copied(pScreen, &copied, dx, dy); - REGION_UNINIT(pScreen, &copied); - REGION_UNINIT(pScreen, &screen_rgn); + RegionUninit(&copied); + RegionUninit(&screen_rgn); SCREEN_EPILOGUE(CopyWindow); } @@ -526,8 +526,8 @@ static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w, box.x2 = w ? (box.x1 + w) : (pWin->drawable.x + pWin->drawable.width); box.y2 = h ? (box.y1 + h) : (pWin->drawable.y + pWin->drawable.height); - REGION_INIT(pScreen, ®, &box, 0); - REGION_INTERSECT(pScreen, ®, ®, &pWin->clipList); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, &pWin->clipList); (*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures); @@ -535,7 +535,7 @@ static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w, add_changed(pScreen, ®); } - REGION_UNINIT(pScreen, ®); + RegionUninit(®); SCREEN_EPILOGUE(ClearToBackground); } @@ -690,19 +690,19 @@ static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, box.y1 = max(pDst->pDrawable->y + yDst, 0); box.x2 = box.x1 + width; box.y2 = box.y1 + height; - REGION_INIT(pScreen, &changed, &box, 0); + RegionInit(&changed, &box, 0); box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_INIT(pScreen, &fbreg, &box, 0); + RegionInit(&fbreg, &box, 0); - REGION_INTERSECT(pScreen, &changed, &changed, &fbreg); + RegionIntersect(&changed, &changed, &fbreg); - REGION_UNINIT(pScreen, &fbreg); + RegionUninit(&fbreg); } else { - REGION_NULL(pScreen, &changed); + RegionNull(&changed); } @@ -711,7 +711,7 @@ static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, add_changed(pScreen, &changed); - REGION_UNINIT(pScreen, &changed); + RegionUninit(&changed); RENDER_EPILOGUE(Composite); } @@ -793,27 +793,27 @@ static void vncHooksGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, RegionRec fbreg; changed = GlyphsToRegion(pScreen, nlists, lists, glyphs); - REGION_TRANSLATE(pScreen, changed, + RegionTranslate(changed, pDst->pDrawable->x, pDst->pDrawable->y); fbbox.x1 = 0; fbbox.y1 = 0; fbbox.x2 = pScreen->width; fbbox.y2 = pScreen->height; - REGION_INIT(pScreen, &fbreg, &fbbox, 0); + RegionInit(&fbreg, &fbbox, 0); - REGION_INTERSECT(pScreen, changed, changed, &fbreg); + RegionIntersect(changed, changed, &fbreg); - REGION_UNINIT(pScreen, &fbreg); + RegionUninit(&fbreg); } else { - changed = REGION_CREATE(pScreen, NullBox, 0); + changed = RegionCreate(NullBox, 0); } (*ps->Glyphs)(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlists, lists, glyphs); add_changed(pScreen, changed); - REGION_DESTROY(pScreen, changed); + RegionDestroy(changed); RENDER_EPILOGUE(Glyphs); } @@ -828,14 +828,14 @@ static void vncHooksCompositeRects(CARD8 op, PicturePtr pDst, if (is_visible(pDst->pDrawable)) { changed = RECTS_TO_REGION(pScreen, nRect, rects, CT_NONE); } else { - changed = REGION_CREATE(pScreen, NullBox, 0); + changed = RegionCreate(NullBox, 0); } (*ps->CompositeRects)(op, pDst, color, nRect, rects); add_changed(pScreen, changed); - REGION_DESTROY(pScreen, changed); + RegionDestroy(changed); RENDER_EPILOGUE(CompositeRects); } @@ -883,26 +883,26 @@ static void vncHooksTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, box.y1 += pDst->pDrawable->y; box.x2 += pDst->pDrawable->x; box.y2 += pDst->pDrawable->y; - REGION_INIT(pScreen, &changed, &box, 0); + RegionInit(&changed, &box, 0); box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_INIT(pScreen, &fbreg, &box, 0); + RegionInit(&fbreg, &box, 0); - REGION_INTERSECT(pScreen, &changed, &changed, &fbreg); + RegionIntersect(&changed, &changed, &fbreg); - REGION_UNINIT(pScreen, &fbreg); + RegionUninit(&fbreg); } else { - REGION_NULL(pScreen, &changed); + RegionNull(&changed); } (*ps->Trapezoids)(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntrap, traps); add_changed(pScreen, &changed); - REGION_UNINIT(pScreen, &changed); + RegionUninit(&changed); RENDER_EPILOGUE(Trapezoids); } @@ -948,26 +948,26 @@ static void vncHooksTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, box.y1 += pDst->pDrawable->y; box.x2 += pDst->pDrawable->x; box.y2 += pDst->pDrawable->y; - REGION_INIT(pScreen, &changed, &box, 0); + RegionInit(&changed, &box, 0); box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_INIT(pScreen, &fbreg, &box, 0); + RegionInit(&fbreg, &box, 0); - REGION_INTERSECT(pScreen, &changed, &changed, &fbreg); + RegionIntersect(&changed, &changed, &fbreg); - REGION_UNINIT(pScreen, &fbreg); + RegionUninit(&fbreg); } else { - REGION_NULL(pScreen, &changed); + RegionNull(&changed); } (*ps->Triangles)(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); add_changed(pScreen, &changed); - REGION_UNINIT(pScreen, &changed); + RegionUninit(&changed); RENDER_EPILOGUE(Triangles); } @@ -1006,26 +1006,26 @@ static void vncHooksTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst, box.y1 += pDst->pDrawable->y; box.x2 += pDst->pDrawable->x; box.y2 += pDst->pDrawable->y; - REGION_INIT(pScreen, &changed, &box, 0); + RegionInit(&changed, &box, 0); box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_INIT(pScreen, &fbreg, &box, 0); + RegionInit(&fbreg, &box, 0); - REGION_INTERSECT(pScreen, &changed, &changed, &fbreg); + RegionIntersect(&changed, &changed, &fbreg); - REGION_UNINIT(pScreen, &fbreg); + RegionUninit(&fbreg); } else { - REGION_NULL(pScreen, &changed); + RegionNull(&changed); } (*ps->TriStrip)(op, pSrc, pDst, maskFormat, xSrc, ySrc, npoint, points); add_changed(pScreen, &changed); - REGION_UNINIT(pScreen, &changed); + RegionUninit(&changed); RENDER_EPILOGUE(TriStrip); } @@ -1064,26 +1064,26 @@ static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, box.y1 += pDst->pDrawable->y; box.x2 += pDst->pDrawable->x; box.y2 += pDst->pDrawable->y; - REGION_INIT(pScreen, &changed, &box, 0); + RegionInit(&changed, &box, 0); box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_INIT(pScreen, &fbreg, &box, 0); + RegionInit(&fbreg, &box, 0); - REGION_INTERSECT(pScreen, &changed, &changed, &fbreg); + RegionIntersect(&changed, &changed, &fbreg); - REGION_UNINIT(pScreen, &fbreg); + RegionUninit(&fbreg); } else { - REGION_NULL(pScreen, &changed); + RegionNull(&changed); } (*ps->TriFan)(op, pSrc, pDst, maskFormat, xSrc, ySrc, npoint, points); add_changed(pScreen, &changed); - REGION_UNINIT(pScreen, &changed); + RegionUninit(&changed); RENDER_EPILOGUE(TriFan); } @@ -1261,17 +1261,17 @@ static void vncHooksFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit, GC_OP_PROLOGUE(pGC, FillSpans); - REGION_NULL(pGC->pScreen, ®); - REGION_COPY(pGC->pScreen, ®, pGC->pCompositeClip); + RegionNull(®); + RegionCopy(®, pGC->pCompositeClip); if (pDrawable->type == DRAWABLE_WINDOW) - REGION_INTERSECT(pScreen, ®, ®, &((WindowPtr)pDrawable)->borderClip); + RegionIntersect(®, ®, &((WindowPtr)pDrawable)->borderClip); (*pGC->ops->FillSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); GC_OP_EPILOGUE(pGC); } @@ -1287,17 +1287,17 @@ static void vncHooksSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc, GC_OP_PROLOGUE(pGC, SetSpans); - REGION_NULL(pGC->pScreen, ®); - REGION_COPY(pGC->pScreen, ®, pGC->pCompositeClip); + RegionNull(®); + RegionCopy(®, pGC->pCompositeClip); if (pDrawable->type == DRAWABLE_WINDOW) - REGION_INTERSECT(pScreen, ®, ®, &((WindowPtr)pDrawable)->borderClip); + RegionIntersect(®, ®, &((WindowPtr)pDrawable)->borderClip); (*pGC->ops->SetSpans) (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); GC_OP_EPILOGUE(pGC); } @@ -1318,15 +1318,15 @@ static void vncHooksPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, box.x2 = box.x1 + w; box.y2 = box.y1 + h; - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); (*pGC->ops->PutImage) (pDrawable, pGC, depth, x, y, w, h, leftPad, format, pBits); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); GC_OP_EPILOGUE(pGC); } @@ -1347,7 +1347,7 @@ static RegionPtr vncHooksCopyArea(DrawablePtr pSrc, DrawablePtr pDst, // Apparently this happens now and then... if ((w == 0) || (h == 0)) - REGION_NULL(pGC->pScreen, &dst); + RegionNull(&dst); else { BoxRec box; @@ -1356,10 +1356,10 @@ static RegionPtr vncHooksCopyArea(DrawablePtr pSrc, DrawablePtr pDst, box.x2 = box.x1 + w; box.y2 = box.y1 + h; - REGION_INIT(pGC->pScreen, &dst, &box, 0); + RegionInit(&dst, &box, 0); } - REGION_INTERSECT(pGC->pScreen, &dst, &dst, pGC->pCompositeClip); + RegionIntersect(&dst, &dst, pGC->pCompositeClip); // The source of the data has to be something that's on screen. if (is_visible(pSrc)) { @@ -1370,24 +1370,24 @@ static RegionPtr vncHooksCopyArea(DrawablePtr pSrc, DrawablePtr pDst, box.x2 = box.x1 + w; box.y2 = box.y1 + h; - REGION_INIT(pGC->pScreen, &src, &box, 0); + RegionInit(&src, &box, 0); if ((pSrc->type == DRAWABLE_WINDOW) && - REGION_NOTEMPTY(pScreen, &((WindowPtr)pSrc)->clipList)) { - REGION_INTERSECT(pScreen, &src, &src, &((WindowPtr)pSrc)->clipList); + RegionNotEmpty(&((WindowPtr)pSrc)->clipList)) { + RegionIntersect(&src, &src, &((WindowPtr)pSrc)->clipList); } - REGION_TRANSLATE(pScreen, &src, + RegionTranslate(&src, dstx + pDst->x - srcx - pSrc->x, dsty + pDst->y - srcy - pSrc->y); } else { - REGION_NULL(pGC->pScreen, &src); + RegionNull(&src); } - REGION_NULL(pGC->pScreen, &changed); + RegionNull(&changed); - REGION_SUBTRACT(pScreen, &changed, &dst, &src); - REGION_INTERSECT(pScreen, &dst, &dst, &src); + RegionSubtract(&changed, &dst, &src); + RegionIntersect(&dst, &dst, &src); ret = (*pGC->ops->CopyArea) (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); @@ -1397,9 +1397,9 @@ static RegionPtr vncHooksCopyArea(DrawablePtr pSrc, DrawablePtr pDst, add_changed(pGC->pScreen, &changed); - REGION_UNINIT(pGC->pScreen, &dst); - REGION_UNINIT(pGC->pScreen, &src); - REGION_UNINIT(pGC->pScreen, &changed); + RegionUninit(&dst); + RegionUninit(&src); + RegionUninit(&changed); GC_OP_EPILOGUE(pGC); @@ -1426,15 +1426,15 @@ static RegionPtr vncHooksCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, box.x2 = box.x1 + w; box.y2 = box.y1 + h; - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); ret = (*pGC->ops->CopyPlane) (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, plane); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); GC_OP_EPILOGUE(pGC); @@ -1490,14 +1490,14 @@ static void vncHooksPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, box.x2 = maxX + 1 + pDrawable->x; box.y2 = maxY + 1 + pDrawable->y; - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); (*pGC->ops->PolyPoint) (pDrawable, pGC, mode, npt, pts); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); out: GC_OP_EPILOGUE(pGC); @@ -1617,13 +1617,13 @@ static void vncHooksPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, } reg = RECTS_TO_REGION(pGC->pScreen, nRegRects, regRects, CT_NONE); - REGION_INTERSECT(pGC->pScreen, reg, reg, pGC->pCompositeClip); + RegionIntersect(reg, reg, pGC->pCompositeClip); (*pGC->ops->Polylines) (pDrawable, pGC, mode, npt, ppts); add_changed(pGC->pScreen, reg); - REGION_DESTROY(pGC->pScreen, reg); + RegionDestroy(reg); out: GC_OP_EPILOGUE(pGC); @@ -1702,13 +1702,13 @@ static void vncHooksPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, } reg = RECTS_TO_REGION(pGC->pScreen, nRegRects, regRects, CT_NONE); - REGION_INTERSECT(pGC->pScreen, reg, reg, pGC->pCompositeClip); + RegionIntersect(reg, reg, pGC->pCompositeClip); (*pGC->ops->PolySegment) (pDrawable, pGC, nseg, segs); add_changed(pGC->pScreen, reg); - REGION_DESTROY(pGC->pScreen, reg); + RegionDestroy(reg); out: GC_OP_EPILOGUE(pGC); @@ -1791,13 +1791,13 @@ static void vncHooksPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects, } reg = RECTS_TO_REGION(pGC->pScreen, nRegRects, regRects, CT_NONE); - REGION_INTERSECT(pGC->pScreen, reg, reg, pGC->pCompositeClip); + RegionIntersect(reg, reg, pGC->pCompositeClip); (*pGC->ops->PolyRectangle) (pDrawable, pGC, nrects, rects); add_changed(pGC->pScreen, reg); - REGION_DESTROY(pGC->pScreen, reg); + RegionDestroy(reg); out: GC_OP_EPILOGUE(pGC); @@ -1866,13 +1866,13 @@ static void vncHooksPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, } reg = RECTS_TO_REGION(pGC->pScreen, nRegRects, regRects, CT_NONE); - REGION_INTERSECT(pGC->pScreen, reg, reg, pGC->pCompositeClip); + RegionIntersect(reg, reg, pGC->pCompositeClip); (*pGC->ops->PolyArc) (pDrawable, pGC, narcs, arcs); add_changed(pGC->pScreen, reg); - REGION_DESTROY(pGC->pScreen, reg); + RegionDestroy(reg); out: GC_OP_EPILOGUE(pGC); @@ -1929,14 +1929,14 @@ static void vncHooksFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, box.x2 = maxX + 1 + pDrawable->x; box.y2 = maxY + 1 + pDrawable->y; - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); (*pGC->ops->FillPolygon) (pDrawable, pGC, shape, mode, count, pts); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); out: GC_OP_EPILOGUE(pGC); @@ -1995,13 +1995,13 @@ static void vncHooksPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrects, } reg = RECTS_TO_REGION(pGC->pScreen, nRegRects, regRects, CT_NONE); - REGION_INTERSECT(pGC->pScreen, reg, reg, pGC->pCompositeClip); + RegionIntersect(reg, reg, pGC->pCompositeClip); (*pGC->ops->PolyFillRect) (pDrawable, pGC, nrects, rects); add_changed(pGC->pScreen, reg); - REGION_DESTROY(pGC->pScreen, reg); + RegionDestroy(reg); out: GC_OP_EPILOGUE(pGC); @@ -2070,13 +2070,13 @@ static void vncHooksPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, } reg = RECTS_TO_REGION(pGC->pScreen, nRegRects, regRects, CT_NONE); - REGION_INTERSECT(pGC->pScreen, reg, reg, pGC->pCompositeClip); + RegionIntersect(reg, reg, pGC->pCompositeClip); (*pGC->ops->PolyFillArc) (pDrawable, pGC, narcs, arcs); add_changed(pGC->pScreen, reg); - REGION_DESTROY(pGC->pScreen, reg); + RegionDestroy(reg); out: GC_OP_EPILOGUE(pGC); @@ -2121,14 +2121,14 @@ static int vncHooksPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, GetTextBoundingRect(pDrawable, pGC->font, x, y, count, &box); - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); ret = (*pGC->ops->PolyText8) (pDrawable, pGC, x, y, count, chars); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); out: GC_OP_EPILOGUE(pGC); @@ -2155,14 +2155,14 @@ static int vncHooksPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, GetTextBoundingRect(pDrawable, pGC->font, x, y, count, &box); - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); ret = (*pGC->ops->PolyText16) (pDrawable, pGC, x, y, count, chars); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); out: GC_OP_EPILOGUE(pGC); @@ -2188,14 +2188,14 @@ static void vncHooksImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, GetTextBoundingRect(pDrawable, pGC->font, x, y, count, &box); - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); (*pGC->ops->ImageText8) (pDrawable, pGC, x, y, count, chars); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); out: GC_OP_EPILOGUE(pGC); @@ -2219,14 +2219,14 @@ static void vncHooksImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, GetTextBoundingRect(pDrawable, pGC->font, x, y, count, &box); - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); (*pGC->ops->ImageText16) (pDrawable, pGC, x, y, count, chars); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); out: GC_OP_EPILOGUE(pGC); @@ -2251,14 +2251,14 @@ static void vncHooksImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, GetTextBoundingRect(pDrawable, pGC->font, x, y, nglyph, &box); - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); (*pGC->ops->ImageGlyphBlt) (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); out: GC_OP_EPILOGUE(pGC); @@ -2283,14 +2283,14 @@ static void vncHooksPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, GetTextBoundingRect(pDrawable, pGC->font, x, y, nglyph, &box); - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); (*pGC->ops->PolyGlyphBlt) (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); out: GC_OP_EPILOGUE(pGC); @@ -2313,14 +2313,14 @@ static void vncHooksPushPixels(GCPtr pGC, PixmapPtr pBitMap, box.x2 = box.x1 + w; box.y2 = box.y1 + h; - REGION_INIT(pGC->pScreen, ®, &box, 0); - REGION_INTERSECT(pGC->pScreen, ®, ®, pGC->pCompositeClip); + RegionInit(®, &box, 0); + RegionIntersect(®, ®, pGC->pCompositeClip); (*pGC->ops->PushPixels) (pGC, pBitMap, pDrawable, w, h, x, y); add_changed(pGC->pScreen, ®); - REGION_UNINIT(pGC->pScreen, ®); + RegionUninit(®); GC_OP_EPILOGUE(pGC); } diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c index 424f8a64..77edbbf3 100644 --- a/unix/xserver/hw/vnc/xvnc.c +++ b/unix/xserver/hw/vnc/xvnc.c @@ -943,8 +943,8 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) { RegionPtr borderVisible; - borderVisible = REGION_CREATE(pScreen, NullBox, 1); - REGION_SUBTRACT(pScreen, borderVisible, + borderVisible = RegionCreate(NullBox, 1); + RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; } @@ -953,7 +953,7 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) } /* - * Use REGION_BREAK to avoid optimizations in ValidateTree + * Use RegionBreak to avoid optimizations in ValidateTree * that assume the root borderClip can't change well, normally * it doesn't...) */ @@ -963,18 +963,18 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_INIT (pScreen, &pWin->winSize, &box, 1); - REGION_INIT (pScreen, &pWin->borderSize, &box, 1); + RegionInit(&pWin->winSize, &box, 1); + RegionInit(&pWin->borderSize, &box, 1); if (WasViewable) - REGION_RESET(pScreen, &pWin->borderClip, &box); + RegionReset(&pWin->borderClip, &box); pWin->drawable.width = pScreen->width; pWin->drawable.height = pScreen->height; - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionBreak(&pWin->clipList); } else { - REGION_EMPTY(pScreen, &pWin->borderClip); - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionEmpty(&pWin->borderClip); + RegionBreak(&pWin->clipList); } ResizeChildrenWinSize (pWin, 0, 0, 0, 0);