Commit 4e101e7e authored by Adam Jackson's avatar Adam Jackson 🎧 Committed by Adam Jackson
Browse files

mi: Simplify a conditional in miHandleExposures

miHandleExposures does two things: computes the region for which to
generate expose events, and (if the destination is a window) paints the
exposed regions with the background. The bit of this conditional we're
deleting here asserts that the source is either a pixmap or a window
without backing store. The only other possibility is a window _with_
backing store. In the old backing store implementation, this was where
you would recover bits from backing store. Since our "backing store" is
the redirected window pixmap, we know we've already copied all we could,
because CopyArea had already seen the entire window pixmap. So now in
that third case, we are still drawing to a pixmap (so there's no
background to paint) and we are still not generating events, so we can
exit early.

The comment above the function about recovering bits from backing store
is clearly misleading, so delete that too.
parent 147ed28b
......@@ -112,10 +112,6 @@ the region package can call this.
non-existent areas to non-obscured areas of the destination. Paint the
background for the region, if the destination is a window.
this should generally be called, even if graphicsExposures is false,
because this is where bits get recovered from backing store.
......@@ -140,10 +136,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
Bool extents;
/* avoid work if we can */
if (!pGC->graphicsExposures &&
(pDstDrawable->type == DRAWABLE_PIXMAP) &&
((pSrcDrawable->type == DRAWABLE_PIXMAP) ||
(((WindowPtr) pSrcDrawable)->backStorage == 0)))
if (!pGC->graphicsExposures && pDstDrawable->type == DRAWABLE_PIXMAP)
return NULL;
srcBox.x1 = srcx;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment