diff options
Diffstat (limited to 'hw/xfree86')
28 files changed, 342 insertions, 342 deletions
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 1aad2d100..7867a428b 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1085,8 +1085,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; } @@ -1105,18 +1105,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); diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c index a142abebc..d883ab36a 100644 --- a/hw/xfree86/common/xf86fbman.c +++ b/hw/xfree86/common/xf86fbman.c @@ -363,8 +363,8 @@ AllocateArea( if(granularity <= 1) granularity = 0; - boxp = REGION_RECTS(offman->FreeBoxes); - num = REGION_NUM_RECTS(offman->FreeBoxes); + boxp = RegionRects(offman->FreeBoxes); + num = RegionNumRects(offman->FreeBoxes); /* look through the free boxes */ for(i = 0; i < num; i++, boxp++) { @@ -407,9 +407,9 @@ AllocateArea( /* bye, bye */ (*link->area.RemoveAreaCallback)(&link->area); - REGION_INIT(pScreen, &NewReg, &(link->area.box), 1); - REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &NewReg); - REGION_UNINIT(pScreen, &NewReg); + RegionInit(&NewReg, &(link->area.box), 1); + RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &NewReg); + RegionUninit(&NewReg); area = &(link->area); break; @@ -427,9 +427,9 @@ AllocateArea( area->RemoveAreaCallback = removeCB; area->devPrivate.ptr = privData; - REGION_INIT(pScreen, &NewReg, &(area->box), 1); - REGION_SUBTRACT(pScreen, offman->FreeBoxes, offman->FreeBoxes, &NewReg); - REGION_UNINIT(pScreen, &NewReg); + RegionInit(&NewReg, &(area->box), 1); + RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &NewReg); + RegionUninit(&NewReg); } return area; @@ -477,9 +477,9 @@ localFreeOffscreenArea(FBAreaPtr area) } /* put the area back into the pool */ - REGION_INIT(pScreen, &FreedRegion, &(pLink->area.box), 1); - REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedRegion); - REGION_UNINIT(pScreen, &FreedRegion); + RegionInit(&FreedRegion, &(pLink->area.box), 1); + RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedRegion); + RegionUninit(&FreedRegion); if(pLinkPrev) pLinkPrev->next = pLink->next; @@ -536,12 +536,12 @@ localResizeOffscreenArea( (resize->box.x2 == OrigArea.x2)) return TRUE; - REGION_INIT(pScreen, &FreedReg, &OrigArea, 1); - REGION_INIT(pScreen, &NewReg, &(resize->box), 1); - REGION_SUBTRACT(pScreen, &FreedReg, &FreedReg, &NewReg); - REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg); - REGION_UNINIT(pScreen, &FreedReg); - REGION_UNINIT(pScreen, &NewReg); + RegionInit(&FreedReg, &OrigArea, 1); + RegionInit(&NewReg, &(resize->box), 1); + RegionSubtract(&FreedReg, &FreedReg, &NewReg); + RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg); + RegionUninit(&FreedReg); + RegionUninit(&NewReg); SendCallFreeBoxCallbacks(offman); @@ -551,8 +551,8 @@ localResizeOffscreenArea( /* otherwise we remove the old region */ - REGION_INIT(pScreen, &FreedReg, &OrigArea, 1); - REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg); + RegionInit(&FreedReg, &OrigArea, 1); + RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg); /* remove the old link */ if(pLinkPrev) @@ -589,8 +589,8 @@ localResizeOffscreenArea( offman->NumUsedAreas--; } else { /* reinstate the old region */ - REGION_SUBTRACT(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg); - REGION_UNINIT(pScreen, &FreedReg); + RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &FreedReg); + RegionUninit(&FreedReg); pLink->next = offman->UsedAreas; offman->UsedAreas = pLink; @@ -598,7 +598,7 @@ localResizeOffscreenArea( } - REGION_UNINIT(pScreen, &FreedReg); + RegionUninit(&FreedReg); SendCallFreeBoxCallbacks(offman); @@ -636,47 +636,47 @@ localQueryLargestOffscreenArea( if(offman->NumUsedAreas) { FBLinkPtr pLink; RegionRec tmpRegion; - newRegion = REGION_CREATE(pScreen, NULL, 1); - REGION_COPY(pScreen, newRegion, offman->InitialBoxes); + newRegion = RegionCreate(NULL, 1); + RegionCopy(newRegion, offman->InitialBoxes); pLink = offman->UsedAreas; while(pLink) { if(!pLink->area.RemoveAreaCallback) { - REGION_INIT(pScreen, &tmpRegion, &(pLink->area.box), 1); - REGION_SUBTRACT(pScreen, newRegion, newRegion, &tmpRegion); - REGION_UNINIT(pScreen, &tmpRegion); + RegionInit(&tmpRegion, &(pLink->area.box), 1); + RegionSubtract(newRegion, newRegion, &tmpRegion); + RegionUninit(&tmpRegion); } pLink = pLink->next; } - nbox = REGION_NUM_RECTS(newRegion); - pbox = REGION_RECTS(newRegion); + nbox = RegionNumRects(newRegion); + pbox = RegionRects(newRegion); break; } case 1: if(offman->NumUsedAreas) { FBLinkPtr pLink; RegionRec tmpRegion; - newRegion = REGION_CREATE(pScreen, NULL, 1); - REGION_COPY(pScreen, newRegion, offman->FreeBoxes); + newRegion = RegionCreate(NULL, 1); + RegionCopy(newRegion, offman->FreeBoxes); pLink = offman->UsedAreas; while(pLink) { if(pLink->area.RemoveAreaCallback) { - REGION_INIT(pScreen, &tmpRegion, &(pLink->area.box), 1); - REGION_APPEND(pScreen, newRegion, &tmpRegion); - REGION_UNINIT(pScreen, &tmpRegion); + RegionInit(&tmpRegion, &(pLink->area.box), 1); + RegionAppend(newRegion, &tmpRegion); + RegionUninit(&tmpRegion); } pLink = pLink->next; } - nbox = REGION_NUM_RECTS(newRegion); - pbox = REGION_RECTS(newRegion); + nbox = RegionNumRects(newRegion); + pbox = RegionRects(newRegion); break; } default: - nbox = REGION_NUM_RECTS(offman->FreeBoxes); - pbox = REGION_RECTS(offman->FreeBoxes); + nbox = RegionNumRects(offman->FreeBoxes); + pbox = RegionRects(offman->FreeBoxes); break; } @@ -719,7 +719,7 @@ localQueryLargestOffscreenArea( } if(newRegion) - REGION_DESTROY(pScreen, newRegion); + RegionDestroy(newRegion); return TRUE; } @@ -741,9 +741,9 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen) if(pLink->area.RemoveAreaCallback) { (*pLink->area.RemoveAreaCallback)(&pLink->area); - REGION_INIT(pScreen, &FreedRegion, &(pLink->area.box), 1); - REGION_APPEND(pScreen, offman->FreeBoxes, &FreedRegion); - REGION_UNINIT(pScreen, &FreedRegion); + RegionInit(&FreedRegion, &(pLink->area.box), 1); + RegionAppend(offman->FreeBoxes, &FreedRegion); + RegionUninit(&FreedRegion); if(pPrev) pPrev->next = pLink->next; @@ -761,7 +761,7 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen) } if(anyUsed) { - REGION_VALIDATE(pScreen, offman->FreeBoxes, &anyUsed); + RegionValidate(offman->FreeBoxes, &anyUsed); SendCallFreeBoxCallbacks(offman); } @@ -924,7 +924,7 @@ localAllocateOffscreenLinear( return NULL; /* No linear available, so try and pinch some from the XY areas */ - extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); + extents = RegionExtents(offman->InitialBoxes); pitch = extents->x2 - extents->x1; if (gran > 1) { @@ -1055,7 +1055,7 @@ localResizeOffscreenLinear(FBLinearPtr resize, int length) BoxPtr extents; int pitch, w, h; - extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); + extents = RegionExtents(offman->InitialBoxes); pitch = extents->x2 - extents->x1; if(length < pitch) { /* special case */ @@ -1121,7 +1121,7 @@ localQueryLargestOffscreenLinear( offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); - extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); + extents = RegionExtents(offman->InitialBoxes); if((extents->x2 - extents->x1) == w) *size = w * h; return TRUE; @@ -1171,8 +1171,8 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen) free(tmp2); } - REGION_DESTROY(pScreen, offman->InitialBoxes); - REGION_DESTROY(pScreen, offman->FreeBoxes); + RegionDestroy(offman->InitialBoxes); + RegionDestroy(offman->FreeBoxes); free(offman->FreeBoxesUpdateCallback); free(offman->devPrivates); @@ -1206,15 +1206,15 @@ xf86InitFBManager( if (FullBox->y2 < FullBox->y1) return FALSE; if (FullBox->x2 < FullBox->x1) return FALSE; - REGION_INIT(pScreen, &ScreenRegion, &ScreenBox, 1); - REGION_INIT(pScreen, &FullRegion, FullBox, 1); + RegionInit(&ScreenRegion, &ScreenBox, 1); + RegionInit(&FullRegion, FullBox, 1); - REGION_SUBTRACT(pScreen, &FullRegion, &FullRegion, &ScreenRegion); + RegionSubtract(&FullRegion, &FullRegion, &ScreenRegion); ret = xf86InitFBManagerRegion(pScreen, &FullRegion); - REGION_UNINIT(pScreen, &ScreenRegion); - REGION_UNINIT(pScreen, &FullRegion); + RegionUninit(&ScreenRegion); + RegionUninit(&FullRegion); return ret; } @@ -1249,17 +1249,17 @@ xf86InitFBManagerArea( } /* Factor out virtual resolution */ - pRegion = RECTS_TO_REGION(pScreen, nRect, Rect, 0); + pRegion = RegionFromRects(nRect, Rect, 0); if (pRegion) { - if (!REGION_NAR(pRegion)) { + if (!RegionNar(pRegion)) { Rect[2].x = Rect[2].y = 0; Rect[2].width = pScrn->virtualX; Rect[2].height = pScrn->virtualY; - pScreenRegion = RECTS_TO_REGION(pScreen, 1, &Rect[2], 0); + pScreenRegion = RegionFromRects(1, &Rect[2], 0); if (pScreenRegion) { - if (!REGION_NAR(pScreenRegion)) { - REGION_SUBTRACT(pScreen, pRegion, pRegion, pScreenRegion); + if (!RegionNar(pScreenRegion)) { + RegionSubtract(pRegion, pRegion, pScreenRegion); ret = xf86InitFBManagerRegion(pScreen, pRegion); @@ -1301,11 +1301,11 @@ xf86InitFBManagerArea( } } - REGION_DESTROY(pScreen, pScreenRegion); + RegionDestroy(pScreenRegion); } } - REGION_DESTROY(pScreen, pRegion); + RegionDestroy(pRegion); } return ret; @@ -1318,7 +1318,7 @@ xf86InitFBManagerRegion( ){ FBManagerPtr offman; - if(REGION_NIL(FullRegion)) + if(RegionNil(FullRegion)) return FALSE; if(!xf86RegisterOffscreenManager(pScreen, &xf86FBManFuncs)) @@ -1332,11 +1332,11 @@ xf86InitFBManagerRegion( offman->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86FBCloseScreen; - offman->InitialBoxes = REGION_CREATE(pScreen, NULL, 1); - offman->FreeBoxes = REGION_CREATE(pScreen, NULL, 1); + offman->InitialBoxes = RegionCreate(NULL, 1); + offman->FreeBoxes = RegionCreate(NULL, 1); - REGION_COPY(pScreen, offman->InitialBoxes, FullRegion); - REGION_COPY(pScreen, offman->FreeBoxes, FullRegion); + RegionCopy(offman->InitialBoxes, FullRegion); + RegionCopy(offman->FreeBoxes, FullRegion); offman->pScreen = pScreen; offman->UsedAreas = NULL; @@ -1415,7 +1415,7 @@ xf86AllocateLinearOffscreenArea ( offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); - extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); + extents = RegionExtents(offman->InitialBoxes); w = extents->x2 - extents->x1; if (gran > 1) { diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index efed677af..36e325f6a 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -322,9 +322,9 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor) pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr; if(pPriv) { if(pPriv->clientClip) - REGION_DESTROY(pAdaptor->pScreen, pPriv->clientClip); + RegionDestroy(pPriv->clientClip); if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pAdaptor->pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); free(pPriv); } } @@ -658,18 +658,18 @@ xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) return; } - pCompositeClip = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, pCompositeClip, portPriv->clientClip); - REGION_TRANSLATE(pScreen, pCompositeClip, + pCompositeClip = RegionCreate(NullBox, 1); + RegionCopy(pCompositeClip, portPriv->clientClip); + RegionTranslate(pCompositeClip, portPriv->pDraw->x + portPriv->clipOrg.x, portPriv->pDraw->y + portPriv->clipOrg.y); - REGION_INTERSECT(pScreen, pCompositeClip, pregWin, pCompositeClip); + RegionIntersect(pCompositeClip, pregWin, pCompositeClip); portPriv->pCompositeClip = pCompositeClip; portPriv->FreeCompositeClip = TRUE; if(freeCompClip) { - REGION_DESTROY(pScreen, pregWin); + RegionDestroy(pregWin); } } @@ -684,17 +684,17 @@ xf86XVCopyClip( /* copy the new clip if it exists */ if((pGC->clientClipType == CT_REGION) && pGC->clientClip) { if(!portPriv->clientClip) - portPriv->clientClip = REGION_CREATE(pScreen, NullBox, 1); + portPriv->clientClip = RegionCreate(NullBox, 1); /* Note: this is in window coordinates */ - REGION_COPY(pScreen, portPriv->clientClip, pGC->clientClip); + RegionCopy(portPriv->clientClip, pGC->clientClip); } else if(portPriv->clientClip) { /* free the old clientClip */ - REGION_DESTROY(pScreen, portPriv->clientClip); + RegionDestroy(portPriv->clientClip); portPriv->clientClip = NULL; } /* get rid of the old clip list */ if(portPriv->pCompositeClip && portPriv->FreeCompositeClip) { - REGION_DESTROY(pScreen, portPriv->pCompositeClip); + RegionDestroy(portPriv->pCompositeClip); } portPriv->clipOrg = pGC->clipOrg; @@ -723,18 +723,18 @@ xf86XVRegetVideo(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->GetVideo)(portPriv->pScrn, @@ -760,8 +760,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -788,9 +788,9 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { @@ -802,21 +802,21 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv) VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } /* bailout if we have to clip but the hardware doesn't support it */ if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -826,7 +826,7 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv) } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutVideo)(portPriv->pScrn, @@ -851,8 +851,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -878,9 +878,9 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { @@ -892,21 +892,21 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv) VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } /* bailout if we have to clip but the hardware doesn't support it */ if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -916,7 +916,7 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv) } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->ReputImage)(portPriv->pScrn, @@ -938,8 +938,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1060,7 +1060,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) XvPortRecPrivatePtr pPriv; Bool AreasExposed; - AreasExposed = (WinPriv && reg1 && REGION_NOTEMPTY(pScreen, reg1)); + AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1)); pScreen->WindowExposures = ScreenPriv->WindowExposures; (*pScreen->WindowExposures)(pWin, reg1, reg2); @@ -1131,7 +1131,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy) if(!pPriv) goto next; if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1268,7 +1268,7 @@ xf86XVLeaveVT(int index, int flags) pPriv->isOn = XV_OFF; if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1309,7 +1309,7 @@ xf86XVAdjustFrame(int index, int x, int y, int flags) if(!pPriv->type && (pPriv->isOn != XV_OFF)) { /* overlaid still/image */ if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1432,9 +1432,9 @@ xf86XVPutStill( WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; @@ -1445,23 +1445,23 @@ xf86XVPutStill( VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } if(portPriv->pDraw) { xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); } - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_STILL_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -1471,7 +1471,7 @@ xf86XVPutStill( } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutStill)(portPriv->pScrn, @@ -1500,8 +1500,8 @@ PUT_STILL_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1584,21 +1584,21 @@ xf86XVGetStill( WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->pDraw) { xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); } - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto GET_STILL_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->GetStill)(portPriv->pScrn, @@ -1615,8 +1615,8 @@ GET_STILL_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1732,9 +1732,9 @@ xf86XVPutImage( WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; @@ -1745,9 +1745,9 @@ xf86XVPutImage( VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } /* If we are changing windows, unregister our port in the old window */ @@ -1758,14 +1758,14 @@ xf86XVPutImage( ret = xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv); if(ret != Success) goto PUT_IMAGE_BAILOUT; - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_IMAGE_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -1775,7 +1775,7 @@ xf86XVPutImage( } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutImage)(portPriv->pScrn, @@ -1803,8 +1803,8 @@ PUT_IMAGE_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1834,8 +1834,8 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) WindowPtr pWin = (WindowPtr)pDraw; XF86XVWindowPtr pPriv = GET_XF86XV_WINDOW(pWin); GCPtr pGC = NULL; - BoxPtr pbox = REGION_RECTS(clipboxes); - int i, nbox = REGION_NUM_RECTS(clipboxes); + BoxPtr pbox = RegionRects(clipboxes); + int i, nbox = RegionNumRects(clipboxes); xRectangle *rects; if(!xf86Screens[pScreen->myNum]->vtSema) return; @@ -1860,7 +1860,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) ValidateGC(pDraw, pGC); } - REGION_TRANSLATE(pDraw->pScreen, clipboxes, -pDraw->x, -pDraw->y); + RegionTranslate(clipboxes, -pDraw->x, -pDraw->y); rects = malloc(nbox * sizeof(xRectangle)); @@ -1883,8 +1883,8 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) { DrawablePtr root = &pScreen->root->drawable; ChangeGCVal pval[2]; - BoxPtr pbox = REGION_RECTS(clipboxes); - int i, nbox = REGION_NUM_RECTS(clipboxes); + BoxPtr pbox = RegionRects(clipboxes); + int i, nbox = RegionNumRects(clipboxes); xRectangle *rects; GCPtr gc; @@ -1936,7 +1936,7 @@ xf86XVClipVideoHelper( ){ double xsw, xdw, ysw, ydw; INT32 delta; - BoxPtr extents = REGION_EXTENTS(DummyScreen, reg); + BoxPtr extents = RegionExtents(reg); int diff; xsw = (*xb - *xa) << 16; @@ -1998,9 +1998,9 @@ xf86XVClipVideoHelper( (dst->y1 > extents->y1) || (dst->y2 < extents->y2)) { RegionRec clipReg; - REGION_INIT(DummyScreen, &clipReg, dst, 1); - REGION_INTERSECT(DummyScreen, reg, reg, &clipReg); - REGION_UNINIT(DummyScreen, &clipReg); + RegionInit(&clipReg, dst, 1); + RegionIntersect(reg, reg, &clipReg); + RegionUninit(&clipReg); } return TRUE; } diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index f7cea5ede..63c77ded6 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -1157,7 +1157,7 @@ DRIDCNTreeTraversal(WindowPtr pWin, pointer data) ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - if (REGION_NUM_RECTS(&pWin->clipList) > 0) { + if (RegionNumRects(&pWin->clipList) > 0) { WindowPtr *pDRIWindows = (WindowPtr*)data; int i = 0; @@ -1269,7 +1269,7 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, pDRIDrawablePriv->pScreen = pScreen; pDRIDrawablePriv->refCount = 1; pDRIDrawablePriv->drawableIndex = -1; - pDRIDrawablePriv->nrects = REGION_NUM_RECTS(&pWin->clipList); + pDRIDrawablePriv->nrects = RegionNumRects(&pWin->clipList); /* save private off of preallocated index */ dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, @@ -1288,8 +1288,8 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, drmUpdateDrawableInfo(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable, DRM_DRAWABLE_CLIPRECTS, - REGION_NUM_RECTS(&pWin->clipList), - REGION_RECTS(&pWin->clipList)); + RegionNumRects(&pWin->clipList), + RegionRects(&pWin->clipList)); *hHWDrawable = pDRIDrawablePriv->hwDrawable; } } @@ -1502,8 +1502,8 @@ DRIGetDrawableInfo(ScreenPtr pScreen, #endif *W = (int)(pWin->drawable.width); *H = (int)(pWin->drawable.height); - *numClipRects = REGION_NUM_RECTS(&pWin->clipList); - *pClipRects = (drm_clip_rect_t *)REGION_RECTS(&pWin->clipList); + *numClipRects = RegionNumRects(&pWin->clipList); + *pClipRects = (drm_clip_rect_t *)RegionRects(&pWin->clipList); if (!*numClipRects && pDRIPriv->fullscreen) { /* use fake full-screen clip rect */ @@ -1883,10 +1883,10 @@ DRITreeTraversal(WindowPtr pWin, pointer data) ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - if(REGION_NUM_RECTS(&(pWin->clipList)) > 0) { + if(RegionNumRects(&(pWin->clipList)) > 0) { RegionPtr reg = (RegionPtr)data; - REGION_UNION(pScreen, reg, reg, &(pWin->clipList)); + RegionUnion(reg, reg, &(pWin->clipList)); pDRIPriv->nrWalked++; } @@ -1932,21 +1932,21 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) if(pDRIPriv->nrWindowsVisible > 0) { RegionRec reg; - REGION_NULL(pScreen, ®); + RegionNull(®); pDRIPriv->nrWalked = 0; TraverseTree(pWin, DRITreeTraversal, (pointer)(®)); - if(REGION_NOTEMPTY(pScreen, ®)) { - REGION_TRANSLATE(pScreen, ®, ptOldOrg.x - pWin->drawable.x, + if(RegionNotEmpty(®)) { + RegionTranslate(®, ptOldOrg.x - pWin->drawable.x, ptOldOrg.y - pWin->drawable.y); - REGION_INTERSECT(pScreen, ®, ®, prgnSrc); + RegionIntersect(®, ®, prgnSrc); /* The MoveBuffers interface is not ideal */ (*pDRIPriv->pDriverInfo->MoveBuffers)(pWin, ptOldOrg, ®, pDRIPriv->pDriverInfo->ddxDrawableTableEntry); } - REGION_UNINIT(pScreen, ®); + RegionUninit(®); } /* call lower wrapped functions */ @@ -2122,7 +2122,7 @@ DRIClipNotify(WindowPtr pWin, int dx, int dy) if(!pDRIPriv) return; if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { - int nrects = REGION_NUM_RECTS(&pWin->clipList); + int nrects = RegionNumRects(&pWin->clipList); if(!pDRIPriv->windowsTouched) { DRILockTree(pScreen); @@ -2143,7 +2143,7 @@ DRIClipNotify(WindowPtr pWin, int dx, int dy) drmUpdateDrawableInfo(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable, DRM_DRAWABLE_CLIPRECTS, - nrects, REGION_RECTS(&pWin->clipList)); + nrects, RegionRects(&pWin->clipList)); } /* call lower wrapped functions */ @@ -2368,9 +2368,9 @@ DRIMoveBuffersHelper( BoxRec tmpBox; int y, nbox; - extents = REGION_EXTENTS(pScreen, reg); - nbox = REGION_NUM_RECTS(reg); - pbox = REGION_RECTS(reg); + extents = RegionExtents(reg); + nbox = RegionNumRects(reg); + pbox = RegionRects(reg); if((dy > 0) && (dy < (extents->y2 - extents->y1))) { *ydir = -1; diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 45a8271a0..3c8d3a82d 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -461,7 +461,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, box.y1 = 0; box.x2 = pPriv->width; box.y2 = pPriv->height; - REGION_INIT(pDraw->pScreen, ®ion, &box, 0); + RegionInit(®ion, &box, 0); DRI2CopyRegion(pDraw, ®ion, DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); @@ -614,7 +614,7 @@ DRI2CanFlip(DrawablePtr pDraw) pWinPixmap = pScreen->GetWindowPixmap(pWin); if (pRootPixmap != pWinPixmap) return FALSE; - if (!REGION_EQUAL(pScreen, &pWin->clipList, &pRoot->winSize)) + if (!RegionEqual(&pWin->clipList, &pRoot->winSize)) return FALSE; return TRUE; @@ -710,7 +710,7 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame, box.y1 = 0; box.x2 = pDraw->width; box.y2 = pDraw->height; - REGION_INIT(pScreen, ®ion, &box, 0); + RegionInit(®ion, &box, 0); DRI2CopyRegion(pDraw, ®ion, DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); @@ -782,7 +782,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, box.y1 = 0; box.x2 = pDraw->width; box.y2 = pDraw->height; - REGION_INIT(pScreen, ®ion, &box, 0); + RegionInit(®ion, &box, 0); pPriv->swapsPending++; diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 065ba480c..60003d502 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -3155,9 +3155,9 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, &crtc_box); if (crtc) { - REGION_INIT (pScreen, &crtc_region_local, &crtc_box, 1); + RegionInit(&crtc_region_local, &crtc_box, 1); crtc_region = &crtc_region_local; - REGION_INTERSECT (pScreen, crtc_region, crtc_region, reg); + RegionIntersect(crtc_region, crtc_region, reg); } *crtc_ret = crtc; } @@ -3166,7 +3166,7 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, crtc_region, width, height); if (crtc_region != reg) - REGION_UNINIT (pScreen, &crtc_region_local); + RegionUninit(&crtc_region_local); return ret; } diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index e3683a8ed..4cc99ad21 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -81,8 +81,8 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region) PictFormatPtr format = compWindowFormat (screen->root); int error; PicturePtr src, dst; - int n = REGION_NUM_RECTS(region); - BoxPtr b = REGION_RECTS(region); + int n = RegionNumRects(region); + BoxPtr b = RegionRects(region); XID include_inferiors = IncludeInferiors; src = CreatePicture (None, @@ -167,10 +167,10 @@ xf86CrtcDamageShadow (xf86CrtcPtr crtc) if (damage_box.y1 < 0) damage_box.y1 = 0; if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width; if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height; - REGION_INIT (pScreen, &damage_region, &damage_box, 1); + RegionInit(&damage_region, &damage_box, 1); DamageRegionAppend (&(*pScreen->GetScreenPixmap)(pScreen)->drawable, &damage_region); - REGION_UNINIT (pScreen, &damage_region); + RegionUninit(&damage_region); crtc->shadowClear = TRUE; } @@ -217,7 +217,7 @@ xf86RotateRedisplay(ScreenPtr pScreen) return FALSE; xf86RotatePrepare (pScreen); region = DamageRegion(damage); - if (REGION_NOTEMPTY(pScreen, region)) + if (RegionNotEmpty(region)) { int c; SourceValidateProcPtr SourceValidate; @@ -240,14 +240,14 @@ xf86RotateRedisplay(ScreenPtr pScreen) RegionRec crtc_damage; /* compute portion of damage that overlaps crtc */ - REGION_INIT(pScreen, &crtc_damage, &crtc->bounds, 1); - REGION_INTERSECT (pScreen, &crtc_damage, &crtc_damage, region); + RegionInit(&crtc_damage, &crtc->bounds, 1); + RegionIntersect(&crtc_damage, &crtc_damage, region); /* update damaged region */ - if (REGION_NOTEMPTY(pScreen, &crtc_damage)) + if (RegionNotEmpty(&crtc_damage)) xf86RotateCrtcRedisplay (crtc, &crtc_damage); - REGION_UNINIT (pScreen, &crtc_damage); + RegionUninit(&crtc_damage); } } pScreen->SourceValidate = SourceValidate; diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c index fd5f26c0e..a0e4b9e36 100644 --- a/hw/xfree86/shadowfb/shadow.c +++ b/hw/xfree86/shadowfb/shadow.c @@ -272,18 +272,18 @@ ShadowCopyWindow( RegionRec rgnDst; if (pPriv->vtSema) { - REGION_NULL(pWin->drawable.pScreen, &rgnDst); - REGION_COPY(pWin->drawable.pScreen, &rgnDst, prgn); + RegionNull(&rgnDst); + RegionCopy(&rgnDst, prgn); - REGION_TRANSLATE(pWin->drawable.pScreen, &rgnDst, + RegionTranslate(&rgnDst, pWin->drawable.x - ptOldOrg.x, pWin->drawable.y - ptOldOrg.y); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, &rgnDst); - if ((num = REGION_NUM_RECTS(&rgnDst))) { + RegionIntersect(&rgnDst, &pWin->borderClip, &rgnDst); + if ((num = RegionNumRects(&rgnDst))) { if(pPriv->preRefresh) - (*pPriv->preRefresh)(pPriv->pScrn, num, REGION_RECTS(&rgnDst)); + (*pPriv->preRefresh)(pPriv->pScrn, num, RegionRects(&rgnDst)); } else { - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + RegionUninit(&rgnDst); } } @@ -293,8 +293,8 @@ ShadowCopyWindow( if (num) { if (pPriv->postRefresh) - (*pPriv->postRefresh)(pPriv->pScrn, num, REGION_RECTS(&rgnDst)); - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + (*pPriv->postRefresh)(pPriv->pScrn, num, RegionRects(&rgnDst)); + RegionUninit(&rgnDst); } } @@ -1353,37 +1353,37 @@ ShadowFontToBox(BoxPtr BB, DrawablePtr pDrawable, GCPtr pGC, int x, int y, } right += pFont->info.maxbounds.rightSideBearing; BB->x1 = - max(pDrawable->x + x - left, (REGION_EXTENTS(pGC->pScreen, + max(pDrawable->x + x - left, (RegionExtents( &((WindowPtr) pDrawable)->winSize))->x1); BB->y1 = max(pDrawable->y + y - ascent, - (REGION_EXTENTS(pGC->pScreen, + (RegionExtents( &((WindowPtr) pDrawable)->winSize))->y1); BB->x2 = min(pDrawable->x + x + right, - (REGION_EXTENTS(pGC->pScreen, + (RegionExtents( &((WindowPtr) pDrawable)->winSize))->x2); BB->y2 = min(pDrawable->y + y + descent, - (REGION_EXTENTS(pGC->pScreen, + (RegionExtents( &((WindowPtr) pDrawable)->winSize))->y2); } else { ShadowTextExtent(pFont, count, chars, wide ? (FONTLASTROW(pFont) == 0) ? Linear16Bit : TwoD16Bit : Linear8Bit, BB); BB->x1 = - max(pDrawable->x + x + BB->x1, (REGION_EXTENTS(pGC->pScreen, + max(pDrawable->x + x + BB->x1, (RegionExtents( &((WindowPtr) pDrawable)->winSize))->x1); BB->y1 = max(pDrawable->y + y + BB->y1, - (REGION_EXTENTS(pGC->pScreen, + (RegionExtents( &((WindowPtr) pDrawable)->winSize))->y1); BB->x2 = min(pDrawable->x + x + BB->x2, - (REGION_EXTENTS(pGC->pScreen, + (RegionExtents( &((WindowPtr) pDrawable)->winSize))->x2); BB->y2 = min(pDrawable->y + y + BB->y2, - (REGION_EXTENTS(pGC->pScreen, + (RegionExtents( &((WindowPtr) pDrawable)->winSize))->y2); } } diff --git a/hw/xfree86/xaa/xaaBitBlt.c b/hw/xfree86/xaa/xaaBitBlt.c index 75033bcca..5148ed4a2 100644 --- a/hw/xfree86/xaa/xaaBitBlt.c +++ b/hw/xfree86/xaa/xaaBitBlt.c @@ -118,8 +118,8 @@ XAABitBlt( fastExpose = 0; } } else { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); + RegionInit(&rgnDst, &fastBox, 1); + RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip); } dstx += pDstDrawable->x; @@ -128,9 +128,9 @@ XAABitBlt( if (pDstDrawable->type == DRAWABLE_WINDOW) { if (!((WindowPtr)pDstDrawable)->realized) { if (!fastClip) - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return NULL; } } @@ -153,8 +153,8 @@ XAABitBlt( blown region and call intersect */ cclip = pGC->pCompositeClip; - if (REGION_NUM_RECTS(cclip) == 1) { - BoxPtr pBox = REGION_RECTS(cclip); + if (RegionNumRects(cclip) == 1) { + BoxPtr pBox = RegionRects(cclip); if (fastBox.x1 < pBox->x1) fastBox.x1 = pBox->x1; if (fastBox.x2 > pBox->x2) fastBox.x2 = pBox->x2; @@ -163,37 +163,37 @@ XAABitBlt( /* Check to see if the region is empty */ if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) { - REGION_NULL(pGC->pScreen, &rgnDst); + RegionNull(&rgnDst); } else { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + RegionInit(&rgnDst, &fastBox, 1); } } else { /* We must turn off fastClip now, since we must create a full blown region. It is intersected with the composite clip below. */ fastClip = 0; - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1); + RegionInit(&rgnDst, &fastBox,1); } } else { - REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + RegionTranslate(&rgnDst, -dx, -dy); } if (!fastClip) { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, + RegionIntersect(&rgnDst, &rgnDst, pGC->pCompositeClip); } /* Do bit blitting */ - numRects = REGION_NUM_RECTS(&rgnDst); + numRects = RegionNumRects(&rgnDst); if (numRects && width && height) { if(!(pptSrc = (DDXPointPtr)malloc(numRects * sizeof(DDXPointRec)))) { - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return NULL; } - pbox = REGION_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); ppt = pptSrc; for (i = numRects; --i >= 0; pbox++, ppt++) { ppt->x = pbox->x1 + dx; @@ -214,8 +214,8 @@ XAABitBlt( (int)origSource.height, origDest.x, origDest.y, bitPlane); } - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return prgnExposed; } diff --git a/hw/xfree86/xaa/xaaCpyArea.c b/hw/xfree86/xaa/xaaCpyArea.c index 1a03bfdb2..443a0e15e 100644 --- a/hw/xfree86/xaa/xaaCpyArea.c +++ b/hw/xfree86/xaa/xaaCpyArea.c @@ -95,8 +95,8 @@ XAADoBitBlt( ((pSrc->type == DRAWABLE_WINDOW) && (pDst->type == DRAWABLE_WINDOW))); - pbox = REGION_RECTS(prgnDst); - nbox = REGION_NUM_RECTS(prgnDst); + pbox = RegionRects(prgnDst); + nbox = RegionNumRects(prgnDst); pboxNew1 = NULL; pptNew1 = NULL; @@ -204,8 +204,8 @@ XAADoImageWrite( int srcwidth; unsigned char* psrcBase; /* start of image */ unsigned char* srcPntr; /* index into the image */ - BoxPtr pbox = REGION_RECTS(prgnDst); - int nbox = REGION_NUM_RECTS(prgnDst); + BoxPtr pbox = RegionRects(prgnDst); + int nbox = RegionNumRects(prgnDst); XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); int Bpp = pSrc->bitsPerPixel >> 3; @@ -233,8 +233,8 @@ XAADoImageRead( int dstwidth; unsigned char* pdstBase; /* start of image */ unsigned char* dstPntr; /* index into the image */ - BoxPtr pbox = REGION_RECTS(prgnDst); - int nbox = REGION_NUM_RECTS(prgnDst); + BoxPtr pbox = RegionRects(prgnDst); + int nbox = RegionNumRects(prgnDst); XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); int Bpp = pSrc->bitsPerPixel >> 3; /* wouldn't get here unless both src and dst have same bpp */ diff --git a/hw/xfree86/xaa/xaaCpyPlane.c b/hw/xfree86/xaa/xaaCpyPlane.c index e3010eafb..6d2b3a008 100644 --- a/hw/xfree86/xaa/xaaCpyPlane.c +++ b/hw/xfree86/xaa/xaaCpyPlane.c @@ -76,8 +76,8 @@ XAACopyPlane1toNColorExpand( DDXPointPtr pptSrc ) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - BoxPtr pbox = REGION_RECTS(rgnDst); - int numrects = REGION_NUM_RECTS(rgnDst); + BoxPtr pbox = RegionRects(rgnDst); + int numrects = RegionNumRects(rgnDst); unsigned char *src = ((PixmapPtr)pSrc)->devPrivate.ptr; int srcwidth = ((PixmapPtr)pSrc)->devKind; @@ -101,8 +101,8 @@ XAACopyPlaneNtoNColorExpand( DDXPointPtr pptSrc ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - BoxPtr pbox = REGION_RECTS(rgnDst); - int numrects = REGION_NUM_RECTS(rgnDst); + BoxPtr pbox = RegionRects(rgnDst); + int numrects = RegionNumRects(rgnDst); unsigned char *src = ((PixmapPtr)pSrc)->devPrivate.ptr; unsigned char *data, *srcPtr, *dataPtr; int srcwidth = ((PixmapPtr)pSrc)->devKind; @@ -168,14 +168,14 @@ XAAPushPixelsSolidColorExpansion( int xOrg, int yOrg ) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - int MaxBoxes = REGION_NUM_RECTS(pGC->pCompositeClip); + int MaxBoxes = RegionNumRects(pGC->pCompositeClip); BoxPtr pbox, pClipBoxes; int nboxes, srcx, srcy; xRectangle TheRect; unsigned char *src = pBitMap->devPrivate.ptr; int srcwidth = pBitMap->devKind; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; TheRect.x = xOrg; diff --git a/hw/xfree86/xaa/xaaCpyWin.c b/hw/xfree86/xaa/xaaCpyWin.c index d58db8ea1..c3c2690b2 100644 --- a/hw/xfree86/xaa/xaaCpyWin.c +++ b/hw/xfree86/xaa/xaaCpyWin.c @@ -49,18 +49,18 @@ XAACopyWindow( pwinRoot = pScreen->root; - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); - pbox = REGION_RECTS(&rgnDst); - nbox = REGION_NUM_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); + nbox = RegionNumRects(&rgnDst); if(!nbox || !(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) { - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); return; } ppt = pptSrc; @@ -78,5 +78,5 @@ XAACopyWindow( &(infoRec->ScratchGC), &rgnDst, pptSrc); free(pptSrc); - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); } diff --git a/hw/xfree86/xaa/xaaDashLine.c b/hw/xfree86/xaa/xaaDashLine.c index 63233e05d..e84708449 100644 --- a/hw/xfree86/xaa/xaaDashLine.c +++ b/hw/xfree86/xaa/xaaDashLine.c @@ -37,8 +37,8 @@ XAAPolyLinesDashed( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates, XAAGetGCKey()); - BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip); - int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip); + BoxPtr pboxInit = RegionRects(pGC->pCompositeClip); + int nboxInit = RegionNumRects(pGC->pCompositeClip); unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); int xorg = pDrawable->x; int yorg = pDrawable->y; diff --git a/hw/xfree86/xaa/xaaFillArc.c b/hw/xfree86/xaa/xaaFillArc.c index d83922ce0..47d804108 100644 --- a/hw/xfree86/xaa/xaaFillArc.c +++ b/hw/xfree86/xaa/xaaFillArc.c @@ -171,7 +171,7 @@ XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) cclip = pGC->pCompositeClip; - if(!REGION_NUM_RECTS(cclip)) + if(!RegionNumRects(cclip)) return; for (arc = parcs, i = narcs; --i >= 0; arc++) @@ -198,7 +198,7 @@ XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) y2 = box.y1 + (int)arc->height + 1; box.y2 = y2; if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && - (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) ) + (RegionContainsRect(cclip, &box) == rgnIN) ) { if ((arc->angle2 >= FULLCIRCLE) || (arc->angle2 <= -FULLCIRCLE)) diff --git a/hw/xfree86/xaa/xaaFillPoly.c b/hw/xfree86/xaa/xaaFillPoly.c index 6f11e35ff..289a3cab1 100644 --- a/hw/xfree86/xaa/xaaFillPoly.c +++ b/hw/xfree86/xaa/xaaFillPoly.c @@ -213,7 +213,7 @@ XAAFillPolygonSolid( int c, y, maxy, h, yoffset; DDXPointPtr topPoint; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; if (mode == CoordModePrevious) { @@ -226,7 +226,7 @@ XAAFillPolygonSolid( mode = CoordModeOrigin; } - if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if (RegionNumRects(pGC->pCompositeClip) != 1) { miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn); return; } @@ -676,7 +676,7 @@ XAAFillPolygonStippled( RectFuncPtr RectFunc = NULL; TrapFuncPtr TrapFunc = NULL; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; if (mode == CoordModePrevious) { @@ -689,7 +689,7 @@ XAAFillPolygonStippled( mode = CoordModeOrigin; } - if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if (RegionNumRects(pGC->pCompositeClip) != 1) { miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn); return; } @@ -836,7 +836,7 @@ XAAFillPolygonTiled( RectFuncPtr RectFunc = NULL; TrapFuncPtr TrapFunc = NULL; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; if (mode == CoordModePrevious) { @@ -849,7 +849,7 @@ XAAFillPolygonTiled( mode = CoordModeOrigin; } - if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if (RegionNumRects(pGC->pCompositeClip) != 1) { miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn); return; } diff --git a/hw/xfree86/xaa/xaaFillRect.c b/hw/xfree86/xaa/xaaFillRect.c index 0b83ef3ee..dde31c1f3 100644 --- a/hw/xfree86/xaa/xaaFillRect.c +++ b/hw/xfree86/xaa/xaaFillRect.c @@ -40,7 +40,7 @@ XAAPolyFillRect( if((nrectFill <= 0) || !pGC->planemask) return; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; switch(pGC->fillStyle) { @@ -944,8 +944,8 @@ XAAClipAndRenderRects( pboxClippedBase = (BoxPtr)infoRec->PreAllocMem; pboxClipped = pboxClippedBase; - if (REGION_NUM_RECTS(pGC->pCompositeClip) == 1) { - pextent = REGION_RECTS(pGC->pCompositeClip); + if (RegionNumRects(pGC->pCompositeClip) == 1) { + pextent = RegionRects(pGC->pCompositeClip); while (nrectFill--) { pboxClipped->x1 = max(pextent->x1, prect->x); pboxClipped->y1 = max(pextent->y1, prect->y); @@ -967,7 +967,7 @@ XAAClipAndRenderRects( } } } else { - pextent = REGION_EXTENTS(pGC->pScreen, pGC->pCompositeClip); + pextent = RegionExtents(pGC->pCompositeClip); while (nrectFill--) { int n; BoxRec box, *pbox; @@ -986,8 +986,8 @@ XAAClipAndRenderRects( if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) continue; - n = REGION_NUM_RECTS (pGC->pCompositeClip); - pbox = REGION_RECTS(pGC->pCompositeClip); + n = RegionNumRects (pGC->pCompositeClip); + pbox = RegionRects(pGC->pCompositeClip); /* clip the rectangle to each box in the clip region this is logically equivalent to calling Intersect() @@ -1030,8 +1030,8 @@ XAAGetRectClipBoxes( xRectangle *prect = prectInit; RegionPtr prgnClip = pGC->pCompositeClip; - if (REGION_NUM_RECTS(prgnClip) == 1) { - pextent = REGION_RECTS(prgnClip); + if (RegionNumRects(prgnClip) == 1) { + pextent = RegionRects(prgnClip); while (nrectFill--) { pboxClipped->x1 = max(pextent->x1, prect->x); pboxClipped->y1 = max(pextent->y1, prect->y); @@ -1049,7 +1049,7 @@ XAAGetRectClipBoxes( } } } else { - pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); + pextent = RegionExtents(prgnClip); while (nrectFill--) { int n; BoxRec box, *pbox; @@ -1068,8 +1068,8 @@ XAAGetRectClipBoxes( if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) continue; - n = REGION_NUM_RECTS (prgnClip); - pbox = REGION_RECTS(prgnClip); + n = RegionNumRects (prgnClip); + pbox = RegionRects(prgnClip); /* clip the rectangle to each box in the clip region this is logically equivalent to calling Intersect() diff --git a/hw/xfree86/xaa/xaaImage.c b/hw/xfree86/xaa/xaaImage.c index 30caa2a9a..e88f45c55 100644 --- a/hw/xfree86/xaa/xaaImage.c +++ b/hw/xfree86/xaa/xaaImage.c @@ -406,7 +406,7 @@ XAAPutImage( Bool depthBug = FALSE; if(!w || !h) return; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; depthBug = XAA_DEPTH_BUG(pGC); @@ -431,7 +431,7 @@ XAAPutImage( !(infoRec->WriteBitmapFlags & NO_PLANEMASK) && !(infoRec->WriteBitmapFlags & TRANSPARENCY_ONLY))){ - int MaxBoxes = REGION_NUM_RECTS(pGC->pCompositeClip); + int MaxBoxes = RegionNumRects(pGC->pCompositeClip); BoxPtr pbox, pClipBoxes; int nboxes, srcx, srcy, srcwidth; xRectangle TheRect; diff --git a/hw/xfree86/xaa/xaaLine.c b/hw/xfree86/xaa/xaaLine.c index 7469de179..d6c06eba8 100644 --- a/hw/xfree86/xaa/xaaLine.c +++ b/hw/xfree86/xaa/xaaLine.c @@ -35,8 +35,8 @@ XAAPolyLines( #endif ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip); - int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip); + BoxPtr pboxInit = RegionRects(pGC->pCompositeClip); + int nboxInit = RegionNumRects(pGC->pCompositeClip); unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); int xorg = pDrawable->x; int yorg = pDrawable->y; diff --git a/hw/xfree86/xaa/xaaNonTEText.c b/hw/xfree86/xaa/xaaNonTEText.c index 072fe1925..a7fcf7ab9 100644 --- a/hw/xfree86/xaa/xaaNonTEText.c +++ b/hw/xfree86/xaa/xaaNonTEText.c @@ -128,7 +128,7 @@ XAAImageText8NonTEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)(pGC->font, (unsigned long)count, @@ -153,7 +153,7 @@ XAAImageText16NonTEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)( @@ -188,7 +188,7 @@ XAAImageGlyphBltNonTEColorExpansion( ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; ImageGlyphBltNonTEColorExpansion( @@ -208,7 +208,7 @@ XAAPolyGlyphBltNonTEColorExpansion( ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; PolyGlyphBltNonTEColorExpansion( @@ -368,8 +368,8 @@ ImageGlyphBltNonTEColorExpansion( int skippix, skipglyph, width, n, i; int Left, Right, Top, Bottom; int LeftEdge, RightEdge, ytop, ybot; - int nbox = REGION_NUM_RECTS(cclip); - BoxPtr pbox = REGION_RECTS(cclip); + int nbox = RegionNumRects(cclip); + BoxPtr pbox = RegionRects(cclip); Bool AlreadySetup = FALSE; width = CollectCharacterInfo(infoRec->GlyphInfo, nglyph, ppci, font); @@ -405,8 +405,8 @@ ImageGlyphBltNonTEColorExpansion( nbox--; pbox++; } - nbox = REGION_NUM_RECTS(cclip); - pbox = REGION_RECTS(cclip); + nbox = RegionNumRects(cclip); + pbox = RegionRects(cclip); if(infoRec->WriteBitmap && (nglyph > 1) && ((FONTMAXBOUNDS(font, rightSideBearing) - @@ -477,8 +477,8 @@ PolyGlyphBltNonTEColorExpansion( int skippix, skipglyph, width, n, i; int Left, Right, Top, Bottom; int LeftEdge, RightEdge; - int nbox = REGION_NUM_RECTS(cclip); - BoxPtr pbox = REGION_RECTS(cclip); + int nbox = RegionNumRects(cclip); + BoxPtr pbox = RegionRects(cclip); width = CollectCharacterInfo(infoRec->GlyphInfo, nglyph, ppci, font); diff --git a/hw/xfree86/xaa/xaaOverlay.c b/hw/xfree86/xaa/xaaOverlay.c index 14de9bd34..4b52bf6fd 100644 --- a/hw/xfree86/xaa/xaaOverlay.c +++ b/hw/xfree86/xaa/xaaOverlay.c @@ -59,18 +59,18 @@ XAACopyWindow8_32( if(doUnderlay) freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip); - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(&rgnDst, borderClip, prgnSrc); - pbox = REGION_RECTS(&rgnDst); - nbox = REGION_NUM_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); + nbox = RegionNumRects(&rgnDst); if(!nbox || !(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) { - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); return; } ppt = pptSrc; @@ -88,9 +88,9 @@ XAACopyWindow8_32( &(infoRec->ScratchGC), &rgnDst, pptSrc); free(pptSrc); - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); if(freeReg) - REGION_DESTROY(pScreen, borderClip); + RegionDestroy(borderClip); } static void diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c index b186cb5cd..61adec62b 100644 --- a/hw/xfree86/xaa/xaaOverlayDF.c +++ b/hw/xfree86/xaa/xaaOverlayDF.c @@ -341,18 +341,18 @@ XAAOverCopyWindow( infoRec->ScratchGC.alu = GXcopy; infoRec->ScratchGC.planemask = ~0; - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); - nbox = REGION_NUM_RECTS(&rgnDst); + nbox = RegionNumRects(&rgnDst); if(nbox && (pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) { - pbox = REGION_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) { ppt->x = pbox->x1 + dx; ppt->y = pbox->y1 + dy; @@ -371,18 +371,18 @@ XAAOverCopyWindow( free(pptSrc); } - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); if(pWin->drawable.depth == 8) { - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); miSegregateChildren(pWin, &rgnDst, pScrn->depth); - if(REGION_NOTEMPTY(pScreen, &rgnDst)) { - REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrc); - nbox = REGION_NUM_RECTS(&rgnDst); + if(RegionNotEmpty(&rgnDst)) { + RegionIntersect(&rgnDst, &rgnDst, prgnSrc); + nbox = RegionNumRects(&rgnDst); if(nbox && (pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))){ - pbox = REGION_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) { ppt->x = pbox->x1 + dx; ppt->y = pbox->y1 + dy; @@ -394,7 +394,7 @@ XAAOverCopyWindow( free(pptSrc); } } - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); } } @@ -409,13 +409,13 @@ XAAOverWindowExposures( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); if((pWin->drawable.bitsPerPixel != 8) && infoRec->pScrn->vtSema) { - if(REGION_NUM_RECTS(pReg) && infoRec->FillSolidRects) { + if(RegionNumRects(pReg) && infoRec->FillSolidRects) { XAAOverlayPtr pOverPriv = GET_OVERLAY_PRIV(pScreen); SWITCH_DEPTH(8); (*infoRec->FillSolidRects)(infoRec->pScrn, infoRec->pScrn->colorKey, GXcopy, ~0, - REGION_NUM_RECTS(pReg), REGION_RECTS(pReg)); + RegionNumRects(pReg), RegionRects(pReg)); miWindowExposures(pWin, pReg, pOtherReg); return; } else if(infoRec->NeedToSync) { diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c index 598a1bec8..f7f6a29bb 100644 --- a/hw/xfree86/xaa/xaaPCache.c +++ b/hw/xfree86/xaa/xaaPCache.c @@ -639,8 +639,8 @@ XAAInitPixmapCache( ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XAAInfoRecPtr infoRec = (XAAInfoRecPtr)data; XAAPixmapCachePrivatePtr pCachePriv; - BoxPtr pBox = REGION_RECTS(areas); - int nBox = REGION_NUM_RECTS(areas); + BoxPtr pBox = RegionRects(areas); + int nBox = RegionNumRects(areas); int Num512, Num256, Num128, NumPartial, NumColor, NumMono; int Target512, Target256; CacheLinkPtr List512, List256, List128, ListPartial, ListColor, ListMono; diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c index 38ef21e85..aaafacba5 100644 --- a/hw/xfree86/xaa/xaaPict.c +++ b/hw/xfree86/xaa/xaaPict.c @@ -215,7 +215,7 @@ XAADoComposite ( BoxPtr pbox; int nbox, w, h; - if(!REGION_NUM_RECTS(pDst->pCompositeClip)) + if(!RegionNumRects(pDst->pCompositeClip)) return TRUE; if(!infoRec->pScrn->vtSema || !DRAWABLE_IS_ON_CARD(pDst->pDrawable)) @@ -273,8 +273,8 @@ XAADoComposite ( width, height)) return TRUE; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) return TRUE; @@ -298,7 +298,7 @@ XAADoComposite ( } /* WriteBitmap sets the Sync flag */ - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -340,11 +340,11 @@ XAADoComposite ( width, height)) return TRUE; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -355,7 +355,7 @@ XAADoComposite ( ((PixmapPtr)(pMask->pDrawable))->devKind, w, h, flags)) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return FALSE; } @@ -371,7 +371,7 @@ XAADoComposite ( } SET_SYNC_FLAG(infoRec); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } } else { @@ -409,11 +409,11 @@ XAADoComposite ( width, height)) return TRUE; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -423,7 +423,7 @@ XAADoComposite ( ((PixmapPtr)(pSrc->pDrawable))->devKind, w, h, flags)) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return FALSE; } @@ -440,7 +440,7 @@ XAADoComposite ( } SET_SYNC_FLAG(infoRec); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -476,16 +476,16 @@ XAACompositeSrcCopy (PicturePtr pSrc, width, height)) return; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return; } pptSrc = malloc(sizeof(DDXPointRec) * nbox); if (!pptSrc) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return; } xoff = xSrc - xDst; @@ -502,7 +502,7 @@ XAACompositeSrcCopy (PicturePtr pSrc, pptSrc); free(pptSrc); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return; } @@ -588,7 +588,7 @@ XAADoGlyphs (CARD8 op, ScreenPtr pScreen = pDst->pDrawable->pScreen; XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); - if(!REGION_NUM_RECTS(pDst->pCompositeClip)) + if(!RegionNumRects(pDst->pCompositeClip)) return TRUE; if(!infoRec->pScrn->vtSema || diff --git a/hw/xfree86/xaa/xaaRect.c b/hw/xfree86/xaa/xaaRect.c index 0a7e174b7..4a3912946 100644 --- a/hw/xfree86/xaa/xaaRect.c +++ b/hw/xfree86/xaa/xaaRect.c @@ -46,8 +46,8 @@ XAAPolyRectangleThinSolid( int clipYMax; /* lower right corner of clip rect */ int width, height; /* width and height of rect */ - nClipRects = REGION_NUM_RECTS(pGC->pCompositeClip); - pClipRects = REGION_RECTS(pGC->pCompositeClip); + nClipRects = RegionNumRects(pGC->pCompositeClip); + pClipRects = RegionRects(pGC->pCompositeClip); if(!nClipRects) return; diff --git a/hw/xfree86/xaa/xaaSpans.c b/hw/xfree86/xaa/xaaSpans.c index 46d6d0740..a742cba1b 100644 --- a/hw/xfree86/xaa/xaaSpans.c +++ b/hw/xfree86/xaa/xaaSpans.c @@ -49,7 +49,7 @@ XAAFillSpans( if((nInit <= 0) || !pGC->planemask) return; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; switch(pGC->fillStyle) { @@ -117,7 +117,7 @@ XAAFillSpans( } - if((nInit < 10) || (REGION_NUM_RECTS(pGC->pCompositeClip) != 1)) + if((nInit < 10) || (RegionNumRects(pGC->pCompositeClip) != 1)) fastClip = FALSE; if(fastClip) { @@ -797,10 +797,10 @@ XAAClipAndRenderSpans( pptNew = pptBase; pwidthNew = pwidthBase; - numRects = REGION_NUM_RECTS(pGC->pCompositeClip); + numRects = RegionNumRects(pGC->pCompositeClip); if(numRects == 1) { - BoxPtr pextent = REGION_RECTS(pGC->pCompositeClip); + BoxPtr pextent = RegionRects(pGC->pCompositeClip); while(nspans--) { if ((pextent->y1 <= ppt->y) && (ppt->y < pextent->y2)) { @@ -830,7 +830,7 @@ XAAClipAndRenderSpans( while(nspans--) { nbox = numRects; - pbox = REGION_RECTS(pGC->pCompositeClip); + pbox = RegionRects(pGC->pCompositeClip); /* find the first band */ while(nbox && (pbox->y2 <= ppt->y)) { diff --git a/hw/xfree86/xaa/xaaTEText.c b/hw/xfree86/xaa/xaaTEText.c index b18228310..729e8a8cb 100644 --- a/hw/xfree86/xaa/xaaTEText.c +++ b/hw/xfree86/xaa/xaaTEText.c @@ -110,7 +110,7 @@ XAAImageText8TEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)(pGC->font, (unsigned long)count, @@ -134,7 +134,7 @@ XAAImageText16TEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)( @@ -169,7 +169,7 @@ XAAImageGlyphBltTEColorExpansion( { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; XAAGlyphBltTEColorExpansion( @@ -189,7 +189,7 @@ XAAPolyGlyphBltTEColorExpansion( { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; XAAGlyphBltTEColorExpansion( @@ -229,8 +229,8 @@ XAAGlyphBltTEColorExpansion( int skippix, skipglyphs; int Left, Right, Top, Bottom; int LeftEdge, RightEdge, ytop, ybot; - int nbox = REGION_NUM_RECTS(cclip); - BoxPtr pbox = REGION_RECTS(cclip); + int nbox = RegionNumRects(cclip); + BoxPtr pbox = RegionRects(cclip); unsigned int **glyphs = NULL; int glyphWidth = FONTMAXBOUNDS(font, characterWidth); diff --git a/hw/xfree86/xaa/xaaWideLine.c b/hw/xfree86/xaa/xaaWideLine.c index a684d6676..79a6159cd 100644 --- a/hw/xfree86/xaa/xaaWideLine.c +++ b/hw/xfree86/xaa/xaaWideLine.c @@ -804,10 +804,10 @@ XAAPolylinesWideSolid ( int yorg = pDrawable->y; Bool hardClip = FALSE; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; - if(REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if(RegionNumRects(pGC->pCompositeClip) != 1) { miWideLine(pDrawable, pGC, mode, npt, pPts); return; } diff --git a/hw/xfree86/xaa/xaawrap.h b/hw/xfree86/xaa/xaawrap.h index 86ba003d6..3f3c26171 100644 --- a/hw/xfree86/xaa/xaawrap.h +++ b/hw/xfree86/xaa/xaawrap.h @@ -32,7 +32,7 @@ #define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ GCFuncs *oldFuncs = pGC->funcs;\ - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) return; \ + if(!RegionNumRects(pGC->pCompositeClip)) return; \ pGC->funcs = pGCPriv->wrapFuncs;\ pGC->ops = pGCPriv->wrapOps |