mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-30 21:53:25 +00:00
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>
This commit is contained in:
parent
424b593c78
commit
a0fe6987b5
31 changed files with 102 additions and 259 deletions
1
mi/mi.h
1
mi/mi.h
|
|
@ -463,7 +463,6 @@ extern _X_EXPORT DevPrivateKey miAllocateGCPrivateIndex(
|
|||
/* mivaltree.c */
|
||||
|
||||
extern _X_EXPORT int miShapedWindowIn(
|
||||
ScreenPtr /*pScreen*/,
|
||||
RegionPtr /*universe*/,
|
||||
RegionPtr /*bounding*/,
|
||||
BoxPtr /*rect*/,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue