From 2dc138922b7588515d5f2447e4b9dcdc0bef15e0 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 21 May 2010 15:05:48 -0700 Subject: Rename region macros to eliminate screen argument This is a combination of a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole tree: $ git ls-files | grep -v '^fix-' | xargs ./fix-region And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. The hand-done changes involve removing functions from dix/region.c that duplicate inline functions in include/regionstr.h, along with their declarations in regionstr.h, mi.h and mispans.h. Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard --- hw/kdrive/ephyr/ephyr.c | 12 ++-- hw/kdrive/ephyr/ephyrdriext.c | 18 ++--- hw/kdrive/ephyr/ephyrvideo.c | 16 ++--- hw/kdrive/src/kdrive.c | 20 +++--- hw/kdrive/src/kxv.c | 158 +++++++++++++++++++++--------------------- 5 files changed, 112 insertions(+), 112 deletions(-) (limited to 'hw/kdrive') diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index b96851605..e0cb95672 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -343,13 +343,13 @@ ephyrInternalDamageRedisplay (ScreenPtr pScreen) pRegion = DamageRegion (scrpriv->pDamage); - if (REGION_NOTEMPTY (pScreen, pRegion)) + if (RegionNotEmpty(pRegion)) { int nbox; BoxPtr pbox; - nbox = REGION_NUM_RECTS (pRegion); - pbox = REGION_RECTS (pRegion); + nbox = RegionNumRects (pRegion); + pbox = RegionRects (pRegion); while (nbox--) { @@ -897,10 +897,10 @@ ephyrExposePairedWindow (int a_remote) return; } screen = pair->local->drawable.pScreen; - REGION_NULL (screen, ®); - REGION_COPY (screen, ®, &pair->local->clipList); + RegionNull(®); + RegionCopy(®, &pair->local->clipList); screen->WindowExposures (pair->local, ®, NullRegion); - REGION_UNINIT (screen, ®); + RegionUninit(®); } #endif /* XF86DRI */ diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index 55cc0f128..23c20321f 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -418,11 +418,11 @@ ephyrDRIClipNotify (WindowPtr a_win, EPHYR_LOG_ERROR ("failed to get window pair\n") ; goto out ; } - rects = calloc(REGION_NUM_RECTS (&a_win->clipList), + rects = calloc(RegionNumRects (&a_win->clipList), sizeof (EphyrRect)) ; - for (i=0; i < REGION_NUM_RECTS (&a_win->clipList); i++) { + for (i=0; i < RegionNumRects (&a_win->clipList); i++) { memmove (&rects[i], - ®ION_RECTS (&a_win->clipList)[i], + &RegionRects (&a_win->clipList)[i], sizeof (EphyrRect)) ; rects[i].x1 -= a_win->drawable.x; rects[i].x2 -= a_win->drawable.x; @@ -436,7 +436,7 @@ ephyrDRIClipNotify (WindowPtr a_win, is_ok = hostx_set_window_bounding_rectangles (pair->remote, rects, - REGION_NUM_RECTS (&a_win->clipList)) ; + RegionNumRects (&a_win->clipList)) ; is_ok = TRUE ; out: @@ -1168,12 +1168,12 @@ ProcXF86DRIGetDrawableInfo (register ClientPtr client) return BadMatch ; } EPHYR_LOG ("clip list of xephyr gl drawable:\n") ; - for (i=0; i < REGION_NUM_RECTS (&window->clipList); i++) { + for (i=0; i < RegionNumRects (&window->clipList); i++) { EPHYR_LOG ("x1:%d, y1:%d, x2:%d, y2:%d\n", - REGION_RECTS (&window->clipList)[i].x1, - REGION_RECTS (&window->clipList)[i].y1, - REGION_RECTS (&window->clipList)[i].x2, - REGION_RECTS (&window->clipList)[i].y2) ; + RegionRects (&window->clipList)[i].x1, + RegionRects (&window->clipList)[i].y1, + RegionRects (&window->clipList)[i].x2, + RegionRects (&window->clipList)[i].y2) ; } if (!ephyrDRIGetDrawableInfo (stuff->screen, diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c index 65127ceb9..69a89ae61 100644 --- a/hw/kdrive/ephyr/ephyrvideo.c +++ b/hw/kdrive/ephyr/ephyrvideo.c @@ -946,8 +946,8 @@ ephyrPutImage (KdScreenInfo *a_info, a_drw_x, a_drw_y, a_drw_w, a_drw_h, a_src_x, a_src_y, a_src_w, a_src_h, a_width, a_height, a_buf, - (EphyrHostBox*)REGION_RECTS (a_clipping_region), - REGION_NUM_RECTS (a_clipping_region))) { + (EphyrHostBox*)RegionRects (a_clipping_region), + RegionNumRects (a_clipping_region))) { EPHYR_LOG_ERROR ("EphyrHostXVPutImage() failed\n") ; goto out ; } @@ -1025,8 +1025,8 @@ ephyrReputImage (KdScreenInfo *a_info, port_priv->src_w, port_priv->src_h, port_priv->image_width, port_priv->image_height, port_priv->image_buf, - (EphyrHostBox*)REGION_RECTS (a_clipping_region), - REGION_NUM_RECTS (a_clipping_region))) { + (EphyrHostBox*)RegionRects (a_clipping_region), + RegionNumRects (a_clipping_region))) { EPHYR_LOG_ERROR ("ephyrHostXVPutImage() failed\n") ; goto out ; } @@ -1064,7 +1064,7 @@ ephyrPutVideo (KdScreenInfo *a_info, dst_box.y2 = a_drw_y + a_drw_h; if (!DoSimpleClip (&dst_box, - REGION_EXTENTS (pScreen->pScreen, a_clipping_region), + RegionExtents(a_clipping_region), &clipped_area)) { EPHYR_LOG_ERROR ("failed to simple clip\n") ; goto out ; @@ -1115,7 +1115,7 @@ ephyrGetVideo (KdScreenInfo *a_info, dst_box.y2 = a_drw_y + a_drw_h; if (!DoSimpleClip (&dst_box, - REGION_EXTENTS (pScreen->pScreen, a_clipping_region), + RegionExtents(a_clipping_region), &clipped_area)) { EPHYR_LOG_ERROR ("failed to simple clip\n") ; goto out ; @@ -1166,7 +1166,7 @@ ephyrPutStill (KdScreenInfo *a_info, dst_box.y2 = a_drw_y + a_drw_h; if (!DoSimpleClip (&dst_box, - REGION_EXTENTS (pScreen->pScreen, a_clipping_region), + RegionExtents(a_clipping_region), &clipped_area)) { EPHYR_LOG_ERROR ("failed to simple clip\n") ; goto out ; @@ -1217,7 +1217,7 @@ ephyrGetStill (KdScreenInfo *a_info, dst_box.y2 = a_drw_y + a_drw_h; if (!DoSimpleClip (&dst_box, - REGION_EXTENTS (pScreen->pScreen, a_clipping_region), + RegionExtents(a_clipping_region), &clipped_area)) { EPHYR_LOG_ERROR ("failed to simple clip\n") ; goto out ; diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 7993f9bd1..27596e467 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -121,8 +121,8 @@ KdSetRootClip (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; } @@ -138,15 +138,15 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable) box.y2 = pScreen->height; pWin->drawable.width = pScreen->width; pWin->drawable.height = pScreen->height; - REGION_INIT (pScreen, &pWin->winSize, &box, 1); - REGION_INIT (pScreen, &pWin->borderSize, &box, 1); - REGION_RESET(pScreen, &pWin->borderClip, &box); - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionInit(&pWin->winSize, &box, 1); + RegionInit(&pWin->borderSize, &box, 1); + RegionReset(&pWin->borderClip, &box); + 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); @@ -836,8 +836,8 @@ KdCreateWindow (WindowPtr pWin) if (!pScreenPriv->enabled) { - REGION_EMPTY (pWin->drawable.pScreen, &pWin->borderClip); - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionEmpty(&pWin->borderClip); + RegionBreak(&pWin->clipList); } } #endif diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index c81d7daaa..99ab2d824 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -268,9 +268,9 @@ KdXVFreeAdaptor(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); } } @@ -607,18 +607,18 @@ KdXVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) return; } - pCompositeClip = REGION_CREATE(pWin->pScreen, NullBox, 1); - REGION_COPY(pWin->pScreen, pCompositeClip, portPriv->clientClip); - REGION_TRANSLATE(pWin->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(pWin->pScreen, pCompositeClip, pregWin, pCompositeClip); + RegionIntersect(pCompositeClip, pregWin, pCompositeClip); portPriv->pCompositeClip = pCompositeClip; portPriv->FreeCompositeClip = TRUE; if(freeCompClip) { - REGION_DESTROY(pWin->pScreen, pregWin); + RegionDestroy(pregWin); } } @@ -633,17 +633,17 @@ KdXVCopyClip( /* copy the new clip if it exists */ if((pGC->clientClipType == CT_REGION) && pGC->clientClip) { if(!portPriv->clientClip) - portPriv->clientClip = REGION_CREATE(pGC->pScreen, NullBox, 1); + portPriv->clientClip = RegionCreate(NullBox, 1); /* Note: this is in window coordinates */ - REGION_COPY(pGC->pScreen, portPriv->clientClip, pGC->clientClip); + RegionCopy(portPriv->clientClip, pGC->clientClip); } else if(portPriv->clientClip) { /* free the old clientClip */ - REGION_DESTROY(pGC->pScreen, portPriv->clientClip); + RegionDestroy(portPriv->clientClip); portPriv->clientClip = NULL; } /* get rid of the old clip list */ if(portPriv->pCompositeClip && portPriv->FreeCompositeClip) { - REGION_DESTROY(pWin->pScreen, portPriv->pCompositeClip); + RegionDestroy(portPriv->pCompositeClip); } portPriv->clipOrg = pGC->clipOrg; @@ -670,18 +670,18 @@ KdXVRegetVideo(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(portPriv->pDraw->pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(portPriv->pDraw->pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(portPriv->pDraw->pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(portPriv->pDraw->pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(portPriv->pDraw->pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->GetVideo)(portPriv->screen, portPriv->pDraw, @@ -706,8 +706,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(portPriv->pDraw->pScreen, &WinRegion); - REGION_UNINIT(portPriv->pDraw->pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -734,9 +734,9 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { @@ -748,21 +748,21 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv) VPBox.x2 = screen->width; VPBox.y2 = screen->height; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(Screen, &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)) { @@ -772,7 +772,7 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv) } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutVideo)(portPriv->screen, portPriv->pDraw, @@ -796,8 +796,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -823,9 +823,9 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { @@ -837,21 +837,21 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv) VPBox.x2 = screen->width; VPBox.y2 = screen->height; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(Screen, &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)) { @@ -861,7 +861,7 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv) } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->ReputImage)(portPriv->screen, portPriv->pDraw, @@ -882,8 +882,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1021,7 +1021,7 @@ KdXVWindowExposures(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); @@ -1089,7 +1089,7 @@ KdXVClipNotify(WindowPtr pWin, int dx, int dy) pPriv = WinPriv->PortRec; if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1220,7 +1220,7 @@ KdXVDisable(ScreenPtr pScreen) pPriv->isOn = XV_OFF; if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1330,9 +1330,9 @@ KdXVPutStill( WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; @@ -1343,23 +1343,23 @@ KdXVPutStill( VPBox.x2 = screen->width; VPBox.y2 = screen->height; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } if(portPriv->pDraw) { KdXVRemovePortFromWindow((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)) { @@ -1369,7 +1369,7 @@ KdXVPutStill( } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutStill)(portPriv->screen, pDraw, @@ -1398,8 +1398,8 @@ PUT_STILL_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1483,21 +1483,21 @@ KdXVGetStill( WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->pDraw) { KdXVRemovePortFromWindow((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->screen, pDraw, @@ -1513,8 +1513,8 @@ GET_STILL_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1630,9 +1630,9 @@ KdXVPutImage( WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; @@ -1643,23 +1643,23 @@ KdXVPutImage( VPBox.x2 = pScreen->width; VPBox.y2 = pScreen->height; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } if(portPriv->pDraw) { KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); } - 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)) { @@ -1669,7 +1669,7 @@ KdXVPutImage( } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutImage)(portPriv->screen, pDraw, @@ -1698,8 +1698,8 @@ PUT_IMAGE_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1869,8 +1869,8 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg) GCPtr pGC; ChangeGCVal val[2]; xRectangle *rects, *r; - BoxPtr pBox = REGION_RECTS (pRgn); - int nBox = REGION_NUM_RECTS (pRgn); + BoxPtr pBox = RegionRects (pRgn); + int nBox = RegionNumRects (pRgn); rects = malloc(nBox * sizeof (xRectangle)); if (!rects) @@ -1897,7 +1897,7 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg) ValidateGC (pDraw, pGC); (*pGC->ops->PolyFillRect) (pDraw, pGC, - REGION_NUM_RECTS (pRgn), rects); + RegionNumRects (pRgn), rects); FreeScratchGC (pGC); bail1: -- cgit v1.2.3