mi: Shortcut miDoCopy/miCopyArea based on clipList

This is maybe one more comparison, but it catches FullyObscured windows
slightly earlier, so it's kind of a wash. The important thing is this
allows for paintable but unmapped windows, which will have non-empty
clipList.
This commit is contained in:
Adam Jackson 2014-09-30 12:26:28 -04:00 committed by Adam Jackson
parent 3904216b01
commit f665a9c9e6
2 changed files with 4 additions and 5 deletions

View File

@ -92,9 +92,9 @@ miCopyArea(DrawablePtr pSrcDrawable,
srcx = xIn + pSrcDrawable->x;
srcy = yIn + pSrcDrawable->y;
/* If the destination isn't realized, this is easy */
/* If the destination is clipped away, this is easy */
if (pDstDrawable->type == DRAWABLE_WINDOW &&
!((WindowPtr) pDstDrawable)->realized)
RegionNil(&((WindowPtr)pDstDrawable)->clipList))
return NULL;
/* clip the source */

View File

@ -152,10 +152,9 @@ miDoCopy(DrawablePtr pSrcDrawable,
Bool fastDst = FALSE; /* for fast clipping with one rect dest */
Bool fastExpose = FALSE; /* for fast exposures with pixmap source */
/* Short cut for unmapped windows */
/* Short cut for unmapped or fully clipped windows */
if (pDstDrawable->type == DRAWABLE_WINDOW &&
!((WindowPtr) pDstDrawable)->realized) {
RegionNil(&((WindowPtr)pDstDrawable)->clipList)) {
return NULL;
}