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

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.
parent 3904216b
Pipeline #23430 passed with stages
in 9 minutes and 18 seconds
...@@ -92,9 +92,9 @@ miCopyArea(DrawablePtr pSrcDrawable, ...@@ -92,9 +92,9 @@ miCopyArea(DrawablePtr pSrcDrawable,
srcx = xIn + pSrcDrawable->x; srcx = xIn + pSrcDrawable->x;
srcy = yIn + pSrcDrawable->y; 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 && if (pDstDrawable->type == DRAWABLE_WINDOW &&
!((WindowPtr) pDstDrawable)->realized) RegionNil(&((WindowPtr)pDstDrawable)->clipList))
return NULL; return NULL;
/* clip the source */ /* clip the source */
......
...@@ -152,10 +152,9 @@ miDoCopy(DrawablePtr pSrcDrawable, ...@@ -152,10 +152,9 @@ miDoCopy(DrawablePtr pSrcDrawable,
Bool fastDst = FALSE; /* for fast clipping with one rect dest */ Bool fastDst = FALSE; /* for fast clipping with one rect dest */
Bool fastExpose = FALSE; /* for fast exposures with pixmap source */ 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 && if (pDstDrawable->type == DRAWABLE_WINDOW &&
!((WindowPtr) pDstDrawable)->realized) { RegionNil(&((WindowPtr)pDstDrawable)->clipList)) {
return NULL; return NULL;
} }
......
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