[PATCH 06/11] mi: Remove spontaneous combustion from miHandleExposures too

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


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 mi/miexpose.c | 40 +---------------------------------------
 1 file changed, 1 insertion(+), 39 deletions(-)

diff --git a/mi/miexpose.c b/mi/miexpose.c
index 98112ab..38b85c2 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -103,10 +103,6 @@ Equipment Corporation.
 the region package can call this.
 */
 
-#ifndef RECTLIMIT
-#define RECTLIMIT 25            /* pick a number, any number > 8 */
-#endif
-
 /* miHandleExposures 
     generate a region for exposures for areas that were copied from obscured or
 non-existent areas to non-obscured areas of the destination.  Paint the
@@ -142,8 +138,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
                                    the window background
                                  */
     WindowPtr pSrcWin;
-    BoxRec expBox;
-    Bool extents;
 
     /* avoid work if we can */
     if (!pGC->graphicsExposures &&
@@ -239,51 +233,19 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
     if (pGC->clientClipType == CT_REGION)
         RegionIntersect(&rgnExposed, &rgnExposed, pGC->clientClip);
 
-    /*
-     * If we have LOTS of rectangles, we decide to take the extents
-     * and force an exposure on that.  This should require much less
-     * work overall, on both client and server.  This is cheating, but
-     * isn't prohibited by the protocol ("spontaneous combustion" :-)
-     * for windows.
-     */
-    extents = pGC->graphicsExposures &&
-        (RegionNumRects(&rgnExposed) > RECTLIMIT) &&
-        (pDstDrawable->type != DRAWABLE_PIXMAP);
     if (pSrcWin) {
         RegionPtr region;
 
         if (!(region = wClipShape(pSrcWin)))
             region = wBoundingShape(pSrcWin);
-        /*
-         * If you try to CopyArea the extents of a shaped window, compacting the
-         * exposed region will undo all our work!
-         */
-        if (extents && pSrcWin && region &&
-            (RegionContainsRect(region, &srcBox) != rgnIN))
-            extents = FALSE;
-    }
-    if (extents) {
-        expBox = *RegionExtents(&rgnExposed);
-        RegionReset(&rgnExposed, &expBox);
     }
     if ((pDstDrawable->type != DRAWABLE_PIXMAP) &&
         (((WindowPtr) pDstDrawable)->backgroundState != None)) {
-        WindowPtr pWin = (WindowPtr) pDstDrawable;
 
         /* make the exposed area screen-relative */
         RegionTranslate(&rgnExposed, pDstDrawable->x, pDstDrawable->y);
-
-        if (extents) {
-            /* miPaintWindow doesn't clip, so we have to */
-            RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList);
-        }
         miPaintWindow((WindowPtr) pDstDrawable, &rgnExposed, PW_BACKGROUND);
-
-        if (extents) {
-            RegionReset(&rgnExposed, &expBox);
-        }
-        else
-            RegionTranslate(&rgnExposed, -pDstDrawable->x, -pDstDrawable->y);
+        RegionTranslate(&rgnExposed, -pDstDrawable->x, -pDstDrawable->y);
     }
     if (prgnDstClip == &rgnDstRec) {
         RegionUninit(prgnDstClip);
-- 
1.9.3



More information about the xorg-devel mailing list