[PATCH 05/11] mioverlay: Remove miOverlayWindowExposures

Adam Jackson ajax at redhat.com
Thu Sep 18 10:23:54 PDT 2014


As the comment indicates, the only reason this existed was to make sure
that in the spontaneous combustion path we clipped painting the border
to the correct clip layer.  But the mi layer isn't spontaneously
combusting anymore; if we apply the same transformation to the overlay
code, we end up being identical to miWindowExposures, so we can just
drop the whole thing.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 mi/mioverlay.c | 61 ----------------------------------------------------------
 1 file changed, 61 deletions(-)

diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index f894e2b..8e02d2c 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -79,7 +79,6 @@ 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);
 static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int,
                                   unsigned int, WindowPtr);
 static void miOverlayClearToBackground(WindowPtr, int, int, int, int, Bool);
@@ -149,7 +148,6 @@ miInitOverlay(ScreenPtr pScreen,
     pScreen->ValidateTree = miOverlayValidateTree;
     pScreen->HandleExposures = miOverlayHandleExposures;
     pScreen->MoveWindow = miOverlayMoveWindow;
-    pScreen->WindowExposures = miOverlayWindowExposures;
     pScreen->ResizeWindow = miOverlayResizeWindow;
     pScreen->MarkWindow = miOverlayMarkWindow;
     pScreen->ClearToBackground = miOverlayClearToBackground;
@@ -974,65 +972,6 @@ miOverlayMoveWindow(WindowPtr pWin,
         WindowsRestructured();
 }
 
-#ifndef RECTLIMIT
-#define RECTLIMIT 25
-#endif
-
-static void
-miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
-{
-    RegionPtr exposures = prgn;
-
-    if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) {
-        RegionRec expRec;
-        int clientInterested;
-
-        clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) &
-            ExposureMask;
-        if (clientInterested && exposures &&
-            (RegionNumRects(exposures) > RECTLIMIT)) {
-            ScreenPtr pScreen = pWin->drawable.pScreen;
-            miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
-            BoxRec box;
-
-            box = *RegionExtents(exposures);
-            if (exposures == prgn) {
-                exposures = &expRec;
-                RegionInit(exposures, &box, 1);
-                RegionReset(prgn, &box);
-            }
-            else {
-                RegionReset(exposures, &box);
-                RegionUnion(prgn, prgn, exposures);
-            }
-            /* This is the only reason why we are replacing mi's version
-               of this file */
-
-            if (!((*pPriv->InOverlay) (pWin))) {
-                miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
-
-                RegionIntersect(prgn, prgn, &pTree->clipList);
-            }
-            else
-                RegionIntersect(prgn, prgn, &pWin->clipList);
-        }
-        if (prgn && !RegionNil(prgn))
-            miPaintWindow(pWin, prgn, PW_BACKGROUND);
-        if (clientInterested && exposures && !RegionNil(exposures))
-            miSendExposures(pWin, exposures,
-                            pWin->drawable.x, pWin->drawable.y);
-        if (exposures == &expRec) {
-            RegionUninit(exposures);
-        }
-        else if (exposures && exposures != prgn)
-            RegionDestroy(exposures);
-        if (prgn)
-            RegionEmpty(prgn);
-    }
-    else if (exposures && exposures != prgn)
-        RegionDestroy(exposures);
-}
-
 typedef struct {
     RegionPtr over;
     RegionPtr under;
-- 
1.9.3



More information about the xorg-devel mailing list