diff options
author | Adam Jackson <ajax@redhat.com> | 2014-09-11 12:44:54 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2014-10-09 11:14:44 +0200 |
commit | 0d30d44a8cdacfbc99d8193f76c133b803464622 (patch) | |
tree | 37c947f12965f3544dc5f31d4b4c28d47154b2fe /mi | |
parent | e2a3e91a56cb598f2c8257614d92ccd46b7fc094 (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>
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mi.h | 4 | ||||
-rw-r--r-- | mi/miexpose.c | 15 | ||||
-rw-r--r-- | mi/mioverlay.c | 30 | ||||
-rw-r--r-- | mi/miwindow.c | 4 |
4 files changed, 14 insertions, 39 deletions
@@ -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(®, ®, clipList); if (generateExposures) - (*pScreen->WindowExposures) (pWin, ®, pBSReg); + (*pScreen->WindowExposures) (pWin, ®); else if (pWin->backgroundState != None) miPaintWindow(pWin, ®, PW_BACKGROUND); RegionUninit(®); - 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(®, ®, &pWin->clipList); if (generateExposures) - (*pWin->drawable.pScreen->WindowExposures) (pWin, ®, NULL); + (*pWin->drawable.pScreen->WindowExposures) (pWin, ®); else if (pWin->backgroundState != None) miPaintWindow(pWin, ®, PW_BACKGROUND); RegionUninit(®); @@ -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; |