diff options
author | Adam Jackson <ajax@redhat.com> | 2014-09-30 12:26:28 -0400 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2019-03-11 17:02:28 +0000 |
commit | f665a9c9e6c8643f3050378249db3088ae3057be (patch) | |
tree | 1118d5deddfc58928d0a3d15ef86e157a77f2a6f /mi | |
parent | 3904216b01fd9dabee65e6cb120fa8aad5e8b459 (diff) |
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.
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mibitblt.c | 4 | ||||
-rw-r--r-- | mi/micopy.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 43d9bd917..4f7e29170 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -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 */ diff --git a/mi/micopy.c b/mi/micopy.c index 12cdad4ad..4db128c4f 100644 --- a/mi/micopy.c +++ b/mi/micopy.c @@ -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; } |