summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2014-09-11 12:44:54 -0400
committerAdam Jackson <ajax@redhat.com>2014-10-09 11:14:44 +0200
commit0d30d44a8cdacfbc99d8193f76c133b803464622 (patch)
tree37c947f12965f3544dc5f31d4b4c28d47154b2fe
parente2a3e91a56cb598f2c8257614d92ccd46b7fc094 (diff)
dix: Drop the third argument from WindowExposuresProcPtr
A careful read shows that it was always NULL. It hasn't always been; as the DDX spec indicates, it was the "occluded region that has backing store", but since that backing store code is long gone, we can nuke it. mi{,Overlay}WindowExposures get slightly simpler here, and will get even simpler in just a moment. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--dix/window.c2
-rw-r--r--fb/fboverlay.c5
-rw-r--r--fb/fboverlay.h4
-rw-r--r--hw/dmx/dmxwindow.c4
-rw-r--r--hw/dmx/dmxwindow.h3
-rw-r--r--hw/kdrive/ephyr/ephyr.c2
-rw-r--r--hw/kdrive/src/kxv.c6
-rw-r--r--hw/xfree86/common/xf86xv.c6
-rw-r--r--hw/xfree86/dri/dri.c4
-rw-r--r--hw/xfree86/dri/dri.h3
-rw-r--r--hw/xnest/Window.c4
-rw-r--r--hw/xnest/XNWindow.h3
-rw-r--r--include/scrnintstr.h3
-rw-r--r--mi/mi.h4
-rw-r--r--mi/miexpose.c15
-rw-r--r--mi/mioverlay.c30
-rw-r--r--mi/miwindow.c4
17 files changed, 35 insertions, 67 deletions
diff --git a/dix/window.c b/dix/window.c
index f4acdc889..52e69efa5 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -2601,7 +2601,7 @@ MapWindow(WindowPtr pWin, ClientPtr client)
(*pScreen->PostValidateTree) (NullWindow, pWin, VTMap);
RegionNull(&temp);
RegionCopy(&temp, &pWin->clipList);
- (*pScreen->WindowExposures) (pWin, &temp, NullRegion);
+ (*pScreen->WindowExposures) (pWin, &temp);
RegionUninit(&temp);
}
diff --git a/fb/fboverlay.c b/fb/fboverlay.c
index 935bf1b50..6a5f0f814 100644
--- a/fb/fboverlay.c
+++ b/fb/fboverlay.c
@@ -240,12 +240,11 @@ fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
}
void
-fbOverlayWindowExposures(WindowPtr pWin,
- RegionPtr prgn, RegionPtr other_exposed)
+fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
{
fbOverlayUpdateLayerRegion(pWin->drawable.pScreen,
fbOverlayWindowLayer(pWin), prgn);
- miWindowExposures(pWin, prgn, other_exposed);
+ miWindowExposures(pWin, prgn);
}
Bool
diff --git a/fb/fboverlay.h b/fb/fboverlay.h
index 57c9873c2..47727e4ee 100644
--- a/fb/fboverlay.h
+++ b/fb/fboverlay.h
@@ -82,9 +82,7 @@ extern _X_EXPORT void
fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
extern _X_EXPORT void
-
-fbOverlayWindowExposures(WindowPtr pWin,
- RegionPtr prgn, RegionPtr other_exposed);
+fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn);
extern _X_EXPORT Bool
diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c
index 1c235273c..c75373534 100644
--- a/hw/dmx/dmxwindow.c
+++ b/hw/dmx/dmxwindow.c
@@ -772,7 +772,7 @@ dmxWindowExposurePredicate(Display * dpy, XEvent * ev, XPointer ptr)
* in DMX, the events that are generated by the back-end server are
* redundant, so we eat them here. */
void
-dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed)
+dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn)
{
ScreenPtr pScreen = pWindow->drawable.pScreen;
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
@@ -799,7 +799,7 @@ dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed)
#if 1
if (pScreen->WindowExposures)
- pScreen->WindowExposures(pWindow, prgn, other_exposed);
+ pScreen->WindowExposures(pWindow, prgn);
#endif
DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen);
}
diff --git a/hw/dmx/dmxwindow.h b/hw/dmx/dmxwindow.h
index c6b2efee6..dda6538d1 100644
--- a/hw/dmx/dmxwindow.h
+++ b/hw/dmx/dmxwindow.h
@@ -73,8 +73,7 @@ extern Bool dmxChangeWindowAttributes(WindowPtr pWindow, unsigned long mask);
extern Bool dmxRealizeWindow(WindowPtr pWindow);
extern Bool dmxUnrealizeWindow(WindowPtr pWindow);
extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib);
-extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn,
- RegionPtr other_exposed);
+extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn);
extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
RegionPtr prgnSrc);
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 85d419376..8b88f3e6d 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -878,7 +878,7 @@ ephyrExposePairedWindow(int a_remote)
screen = pair->local->drawable.pScreen;
RegionNull(&reg);
RegionCopy(&reg, &pair->local->clipList);
- screen->WindowExposures(pair->local, &reg, NullRegion);
+ screen->WindowExposures(pair->local, &reg);
RegionUninit(&reg);
}
#endif /* XF86DRI */
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index f979e1fbd..163d5c1dd 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -86,7 +86,7 @@ static int KdXVQueryImageAttributes(XvPortPtr, XvImagePtr,
/* ScreenRec fields */
static Bool KdXVDestroyWindow(WindowPtr pWin);
-static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2);
+static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1);
static void KdXVClipNotify(WindowPtr pWin, int dx, int dy);
static Bool KdXVCloseScreen(ScreenPtr);
@@ -822,7 +822,7 @@ KdXVDestroyWindow(WindowPtr pWin)
}
static void
-KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
+KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen);
@@ -834,7 +834,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1));
pScreen->WindowExposures = ScreenPriv->WindowExposures;
- (*pScreen->WindowExposures) (pWin, reg1, reg2);
+ (*pScreen->WindowExposures) (pWin, reg1);
pScreen->WindowExposures = KdXVWindowExposures;
/* filter out XClearWindow/Area */
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 0e6769001..5ef5de19c 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -84,7 +84,7 @@ static int xf86XVQueryImageAttributes(XvPortPtr, XvImagePtr,
/* ScreenRec fields */
static Bool xf86XVDestroyWindow(WindowPtr pWin);
-static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2);
+static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1);
static void xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin,
VTKind kind);
static void xf86XVClipNotify(WindowPtr pWin, int dx, int dy);
@@ -1048,7 +1048,7 @@ xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin, VTKind kind)
}
static void
-xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
+xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen);
@@ -1059,7 +1059,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1));
pScreen->WindowExposures = ScreenPriv->WindowExposures;
- (*pScreen->WindowExposures) (pWin, reg1, reg2);
+ (*pScreen->WindowExposures) (pWin, reg1);
pScreen->WindowExposures = xf86XVWindowExposures;
/* filter out XClearWindow/Area */
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 3f2f6a9b3..5077c7c6d 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1828,7 +1828,7 @@ DRIGetContextStore(DRIContextPrivPtr context)
}
void
-DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg)
+DRIWindowExposures(WindowPtr pWin, RegionPtr prgn)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1846,7 +1846,7 @@ DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg)
pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures;
/* call lower layers */
- (*pScreen->WindowExposures) (pWin, prgn, bsreg);
+ (*pScreen->WindowExposures) (pWin, prgn);
/* rewrap */
pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures;
diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h
index dec688582..1ce0970cd 100644
--- a/hw/xfree86/dri/dri.h
+++ b/hw/xfree86/dri/dri.h
@@ -280,8 +280,7 @@ extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx);
extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context);
-extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin,
- RegionPtr prgn, RegionPtr bsreg);
+extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, RegionPtr prgn);
extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin);
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index fc87e823e..8d9c67205 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -386,7 +386,7 @@ xnestWindowExposurePredicate(Display * dpy, XEvent * event, XPointer ptr)
}
void
-xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed)
+xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn)
{
XEvent event;
Window window;
@@ -410,7 +410,7 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed)
XPutBackEvent(xnestDisplay, &event);
}
- miWindowExposures(pWin, pRgn, other_exposed);
+ miWindowExposures(pWin, pRgn);
}
void
diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h
index 02b0f3f36..6320ede5e 100644
--- a/hw/xnest/XNWindow.h
+++ b/hw/xnest/XNWindow.h
@@ -66,8 +66,7 @@ Bool xnestRealizeWindow(WindowPtr pWin);
Bool xnestUnrealizeWindow(WindowPtr pWin);
void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
void xnestClipNotify(WindowPtr pWin, int dx, int dy);
-void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
- RegionPtr other_exposed);
+void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn);
void xnestSetShape(WindowPtr pWin, int kind);
void xnestShapeWindow(WindowPtr pWin);
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 6955e77fd..7331ec1b6 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -155,8 +155,7 @@ typedef void (*PostValidateTreeProcPtr) (WindowPtr /*pParent */ ,
VTKind /*kind */ );
typedef void (*WindowExposuresProcPtr) (WindowPtr /*pWindow */ ,
- RegionPtr /*prgn */ ,
- RegionPtr /*other_exposed */ );
+ RegionPtr /*prgn */);
typedef void (*CopyWindowProcPtr) (WindowPtr /*pWindow */ ,
DDXPointRec /*ptOldOrg */ ,
diff --git a/mi/mi.h b/mi/mi.h
index d5a5ba374..4b5e86284 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -247,9 +247,7 @@ extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ ,
);
extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ ,
- RegionPtr /*prgn */ ,
- RegionPtr /*other_exposed */
- );
+ RegionPtr /*prgn */);
extern _X_EXPORT void miPaintWindow(WindowPtr /*pWin */ ,
RegionPtr /*prgn */ ,
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 198c4332f..23987fa6e 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -421,12 +421,11 @@ miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
}
void
-miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
+miWindowExposures(WindowPtr pWin, RegionPtr prgn)
{
RegionPtr exposures = prgn;
- if ((prgn && !RegionNil(prgn)) ||
- (exposures && !RegionNil(exposures)) || other_exposed) {
+ if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) {
RegionRec expRec;
int clientInterested;
@@ -435,14 +434,6 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
*/
clientInterested =
(pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask;
- if (other_exposed) {
- if (exposures) {
- RegionUnion(other_exposed, exposures, other_exposed);
- if (exposures != prgn)
- RegionDestroy(exposures);
- }
- exposures = other_exposed;
- }
if (clientInterested && exposures &&
(RegionNumRects(exposures) > RECTLIMIT)) {
/*
@@ -474,7 +465,7 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
if (exposures == &expRec) {
RegionUninit(exposures);
}
- else if (exposures && exposures != prgn && exposures != other_exposed)
+ else if (exposures && exposures != prgn)
RegionDestroy(exposures);
if (prgn)
RegionEmpty(prgn);
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index 7f502fa37..f894e2ba0 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -79,7 +79,7 @@ static void miOverlayMarkUnrealizedWindow(WindowPtr, WindowPtr, Bool);
static int miOverlayValidateTree(WindowPtr, WindowPtr, VTKind);
static void miOverlayHandleExposures(WindowPtr);
static void miOverlayMoveWindow(WindowPtr, int, int, WindowPtr, VTKind);
-static void miOverlayWindowExposures(WindowPtr, RegionPtr, RegionPtr);
+static void miOverlayWindowExposures(WindowPtr, RegionPtr);
static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int,
unsigned int, WindowPtr);
static void miOverlayClearToBackground(WindowPtr, int, int, int, int, Bool);
@@ -827,7 +827,7 @@ miOverlayHandleExposures(WindowPtr pWin)
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
WindowPtr pChild;
ValidatePtr val;
- void (*WindowExposures) (WindowPtr, RegionPtr, RegionPtr);
+ WindowExposuresProcPtr WindowExposures;
WindowExposures = pWin->drawable.pScreen->WindowExposures;
if (pPriv->underlayMarked) {
@@ -849,8 +849,7 @@ miOverlayHandleExposures(WindowPtr pWin)
}
RegionUninit(&mival->borderExposed);
- (*WindowExposures) (pTree->pWin, &mival->exposed,
- NullRegion);
+ (*WindowExposures) (pTree->pWin, &mival->exposed);
RegionUninit(&mival->exposed);
}
free(mival);
@@ -886,7 +885,7 @@ miOverlayHandleExposures(WindowPtr pWin)
if (RegionNotEmpty(&val->after.borderExposed)) {
miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
}
- (*WindowExposures) (pChild, &val->after.exposed, NullRegion);
+ (*WindowExposures) (pChild, &val->after.exposed);
}
RegionUninit(&val->after.borderExposed);
RegionUninit(&val->after.exposed);
@@ -980,26 +979,16 @@ miOverlayMoveWindow(WindowPtr pWin,
#endif
static void
-miOverlayWindowExposures(WindowPtr pWin,
- RegionPtr prgn, RegionPtr other_exposed)
+miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
{
RegionPtr exposures = prgn;
- if ((prgn && !RegionNil(prgn)) ||
- (exposures && !RegionNil(exposures)) || other_exposed) {
+ if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) {
RegionRec expRec;
int clientInterested;
clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) &
ExposureMask;
- if (other_exposed) {
- if (exposures) {
- RegionUnion(other_exposed, exposures, other_exposed);
- if (exposures != prgn)
- RegionDestroy(exposures);
- }
- exposures = other_exposed;
- }
if (clientInterested && exposures &&
(RegionNumRects(exposures) > RECTLIMIT)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
@@ -1035,7 +1024,7 @@ miOverlayWindowExposures(WindowPtr pWin,
if (exposures == &expRec) {
RegionUninit(exposures);
}
- else if (exposures && exposures != prgn && exposures != other_exposed)
+ else if (exposures && exposures != prgn)
RegionDestroy(exposures);
if (prgn)
RegionEmpty(prgn);
@@ -1592,7 +1581,6 @@ miOverlayClearToBackground(WindowPtr pWin,
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
BoxRec box;
RegionRec reg;
- RegionPtr pBSReg = NullRegion;
ScreenPtr pScreen = pWin->drawable.pScreen;
miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
RegionPtr clipList;
@@ -1636,12 +1624,10 @@ miOverlayClearToBackground(WindowPtr pWin,
RegionIntersect(&reg, &reg, clipList);
if (generateExposures)
- (*pScreen->WindowExposures) (pWin, &reg, pBSReg);
+ (*pScreen->WindowExposures) (pWin, &reg);
else if (pWin->backgroundState != None)
miPaintWindow(pWin, &reg, PW_BACKGROUND);
RegionUninit(&reg);
- if (pBSReg)
- RegionDestroy(pBSReg);
}
/****************************************************************/
diff --git a/mi/miwindow.c b/mi/miwindow.c
index 82c3513c8..ba4c9ed5c 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -111,7 +111,7 @@ miClearToBackground(WindowPtr pWin,
RegionIntersect(&reg, &reg, &pWin->clipList);
if (generateExposures)
- (*pWin->drawable.pScreen->WindowExposures) (pWin, &reg, NULL);
+ (*pWin->drawable.pScreen->WindowExposures) (pWin, &reg);
else if (pWin->backgroundState != None)
miPaintWindow(pWin, &reg, PW_BACKGROUND);
RegionUninit(&reg);
@@ -221,7 +221,7 @@ miHandleValidateExposures(WindowPtr pWin)
if (RegionNotEmpty(&val->after.borderExposed))
miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
RegionUninit(&val->after.borderExposed);
- (*WindowExposures) (pChild, &val->after.exposed, NullRegion);
+ (*WindowExposures) (pChild, &val->after.exposed);
RegionUninit(&val->after.exposed);
free(val);
pChild->valdata = NULL;