diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-06-05 20:55:29 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-06-05 22:07:21 -0700 |
commit | a0fe6987b55b5326157b50e169b8d6b9ae26a1ae (patch) | |
tree | 30bd5b4a9fef3d1435059bb2a32d4e8d9916195c /mi | |
parent | 424b593c7872a703d3d0c942b7e8acc0770eb023 (diff) |
Clean up after removal of screen parameters from region macros.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mi.h | 1 | ||||
-rw-r--r-- | mi/micopy.c | 3 | ||||
-rw-r--r-- | mi/miexpose.c | 4 | ||||
-rw-r--r-- | mi/migc.c | 8 | ||||
-rw-r--r-- | mi/mioverlay.c | 26 | ||||
-rw-r--r-- | mi/mivaltree.c | 14 | ||||
-rw-r--r-- | mi/miwindow.c | 15 |
7 files changed, 18 insertions, 53 deletions
@@ -463,7 +463,6 @@ extern _X_EXPORT DevPrivateKey miAllocateGCPrivateIndex( /* mivaltree.c */ extern _X_EXPORT int miShapedWindowIn( - ScreenPtr /*pScreen*/, RegionPtr /*universe*/, RegionPtr /*bounding*/, BoxPtr /*rect*/, diff --git a/mi/micopy.c b/mi/micopy.c index 157e32430..b1a7a0850 100644 --- a/mi/micopy.c +++ b/mi/micopy.c @@ -209,8 +209,7 @@ miDoCopy (DrawablePtr pSrcDrawable, * VT is inactive, make sure the region isn't empty */ if (!((WindowPtr) pSrcDrawable)->parent && - RegionNotEmpty( - &((WindowPtr) pSrcDrawable)->borderClip)) + RegionNotEmpty(&((WindowPtr) pSrcDrawable)->borderClip)) { /* * special case bitblt from root window in diff --git a/mi/miexpose.c b/mi/miexpose.c index 2fd070d9e..94258b864 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -131,7 +131,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long plane) { - ScreenPtr pscr; RegionPtr prgnSrcClip; /* drawable-relative source clip */ RegionRec rgnSrcRec; RegionPtr prgnDstClip; /* drawable-relative dest clip */ @@ -148,9 +147,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, BoxRec expBox; Bool extents; - /* This prevents warning about pscr not being used. */ - pGC->pScreen = pscr = pGC->pScreen; - /* avoid work if we can */ if (!pGC->graphicsExposures && (pDstDrawable->type == DRAWABLE_PIXMAP) && @@ -117,8 +117,7 @@ miCopyClip(GCPtr pgcDst, GCPtr pgcSrc) break; case CT_REGION: prgnNew = RegionCreate(NULL, 1); - RegionCopy(prgnNew, - (RegionPtr) (pgcSrc->clientClip)); + RegionCopy(prgnNew, (RegionPtr) (pgcSrc->clientClip)); (*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, (pointer) prgnNew, 0); break; } @@ -134,11 +133,6 @@ miCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst) void miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable) { - ScreenPtr pScreen; - - /* This prevents warnings about pScreen not being used. */ - pGC->pScreen = pScreen = pGC->pScreen; - if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr) pDrawable; diff --git a/mi/mioverlay.c b/mi/mioverlay.c index aa00e234c..e7a9401e4 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -329,7 +329,6 @@ miOverlayMarkOverlappedWindows( WindowPtr pFirst, WindowPtr *pLayerWin ){ - ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr pChild, pLast; Bool overMarked, underMarked, doUnderlay, markAll; miOverlayTreePtr pTree = NULL, tLast, tChild; @@ -440,6 +439,7 @@ miOverlayMarkOverlappedWindows( } if(underMarked) { + ScreenPtr pScreen = pWin->drawable.pScreen; MARK_UNDERLAY(pTree->parent->pWin); MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->underlayMarked = TRUE; } @@ -486,7 +486,7 @@ miOverlayComputeClips( RegionPtr pBounding; if ((pBounding = wBoundingShape (pParent))) { - switch (miShapedWindowIn (pScreen, universe, pBounding, + switch (miShapedWindowIn (universe, pBounding, &borderSize, pParent->drawable.x, pParent->drawable.y)) @@ -535,10 +535,9 @@ miOverlayComputeClips( if (tChild->valdata) { RegionNull(&tChild->valdata->borderExposed); if (HasParentRelativeBorder(tChild->pWin)){ - RegionSubtract( - &tChild->valdata->borderExposed, - &tChild->borderClip, - &tChild->pWin->winSize); + RegionSubtract(&tChild->valdata->borderExposed, + &tChild->borderClip, + &tChild->pWin->winSize); } RegionNull(&tChild->valdata->exposed); } @@ -1004,7 +1003,6 @@ miOverlayWindowExposures( RegionPtr other_exposed ){ RegionPtr exposures = prgn; - ScreenPtr pScreen = pWin->drawable.pScreen; if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures)) || other_exposed) @@ -1025,6 +1023,7 @@ miOverlayWindowExposures( if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) { + ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); BoxRec box; @@ -1074,13 +1073,9 @@ miOverlayRecomputeExposures ( WindowPtr pWin, pointer value ){ - ScreenPtr pScreen; miOverlayTwoRegions *pValid = (miOverlayTwoRegions*)value; miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); - /* This prevents warning about pScreen not being used. */ - pWin->drawable.pScreen = pScreen = pWin->drawable.pScreen; - if (pWin->valdata) { /* * compute exposed regions of this window @@ -1419,13 +1414,11 @@ miOverlayResizeWindow( if (oldpt.x != x || oldpt.y != y) { if(gravitate2[g]) { pPriv->copyUnderlay = TRUE; - (*pWin->drawable.pScreen->CopyWindow)( - pWin, oldpt, gravitate2[g]); + (*pScreen->CopyWindow)(pWin, oldpt, gravitate2[g]); } if(gravitate[g]) { pPriv->copyUnderlay = FALSE; - (*pWin->drawable.pScreen->CopyWindow)( - pWin, oldpt, gravitate[g]); + (*pScreen->CopyWindow)(pWin, oldpt, gravitate[g]); } } @@ -1730,7 +1723,6 @@ miOverlayCopyUnderlay(ScreenPtr pScreen) void miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin) { - ScreenPtr pScreen = pGC->pScreen; miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); RegionPtr pregWin; Bool freeTmpClip, freeCompClip; @@ -1744,7 +1736,7 @@ miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin) pregWin = RegionCreate(NullBox, 1); freeTmpClip = TRUE; if (pWin->parent || (screenIsSaved != SCREEN_SAVER_ON) || - !HasSaverWindow (pScreen)) + !HasSaverWindow (pGC->pScreen)) { RegionIntersect(pregWin,&pTree->borderClip,&pWin->winSize); } diff --git a/mi/mivaltree.c b/mi/mivaltree.c index dc88c4d77..7e0c22ac0 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -107,7 +107,7 @@ Equipment Corporation. * Compute the visibility of a shaped window */ int -miShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, RegionPtr bounding, +miShapedWindowIn (RegionPtr universe, RegionPtr bounding, BoxPtr rect, int x, int y) { BoxRec box; @@ -272,7 +272,7 @@ miComputeClips ( if ((pBounding = wBoundingShape (pParent))) { - switch (miShapedWindowIn (pScreen, universe, pBounding, + switch (miShapedWindowIn (universe, pBounding, &borderSize, pParent->drawable.x, pParent->drawable.y)) @@ -331,14 +331,12 @@ miComputeClips ( } if (pChild->valdata) { - RegionNull( - &pChild->valdata->after.borderExposed); + RegionNull(&pChild->valdata->after.borderExposed); if (HasParentRelativeBorder(pChild)) { - RegionSubtract( - &pChild->valdata->after.borderExposed, - &pChild->borderClip, - &pChild->winSize); + RegionSubtract(&pChild->valdata->after.borderExposed, + &pChild->borderClip, + &pChild->winSize); } RegionNull(&pChild->valdata->after.exposed); } diff --git a/mi/miwindow.c b/mi/miwindow.c index 02b407486..51c5cc82e 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -67,7 +67,6 @@ miClearToBackground(WindowPtr pWin, BoxRec box; RegionRec reg; RegionPtr pBSReg = NullRegion; - ScreenPtr pScreen; BoxPtr extents; int x1, y1, x2, y2; @@ -111,12 +110,11 @@ miClearToBackground(WindowPtr pWin, box.y1 = y1; box.y2 = y2; - pScreen = pWin->drawable.pScreen; RegionInit(®, &box, 1); RegionIntersect(®, ®, &pWin->clipList); if (generateExposures) - (*pScreen->WindowExposures)(pWin, ®, pBSReg); + (*pWin->drawable.pScreen->WindowExposures)(pWin, ®, pBSReg); else if (pWin->backgroundState != None) miPaintWindow(pWin, ®, PW_BACKGROUND); RegionUninit(®); @@ -146,9 +144,6 @@ miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin) WindowPtr pChild, pLast; Bool anyMarked = FALSE; MarkWindowProcPtr MarkWindow = pWin->drawable.pScreen->MarkWindow; - ScreenPtr pScreen; - - pScreen = pWin->drawable.pScreen; /* single layered systems are easy */ if (ppLayerWin) *ppLayerWin = pWin; @@ -230,11 +225,8 @@ miHandleValidateExposures(WindowPtr pWin) { WindowPtr pChild; ValidatePtr val; - ScreenPtr pScreen; WindowExposuresProcPtr WindowExposures; - pScreen = pWin->drawable.pScreen; - pChild = pWin; WindowExposures = pChild->drawable.pScreen->WindowExposures; while (1) @@ -339,7 +331,6 @@ miRecomputeExposures ( WindowPtr pWin, pointer value) /* must conform to VisitWindowProcPtr */ { - ScreenPtr pScreen; RegionPtr pValid = (RegionPtr)value; if (pWin->valdata) @@ -353,7 +344,6 @@ miRecomputeExposures ( if (pWin->redirectDraw != RedirectDrawNone) return WT_DONTWALKCHILDREN; #endif - pScreen = pWin->drawable.pScreen; /* * compute exposed regions of this window */ @@ -824,11 +814,8 @@ miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure) void miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth) { - ScreenPtr pScreen; WindowPtr pChild; - pScreen = pWin->drawable.pScreen; - for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { if (pChild->drawable.depth == depth) |