[PATCH 4/8] mi: Shortcut miDoCopy/miCopyArea based on paintable not realized
Keith Packard
keithp at keithp.com
Sat Nov 22 00:06:19 PST 2014
Adam Jackson <ajax at redhat.com> writes:
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
> mi/mibitblt.c | 4 ++--
> mi/micopy.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mi/mibitblt.c b/mi/mibitblt.c
> index 114f72d..e2a5f3d 100644
> --- a/mi/mibitblt.c
> +++ b/mi/mibitblt.c
> @@ -96,9 +96,9 @@ miCopyArea(DrawablePtr pSrcDrawable,
> srcx = xIn + pSrcDrawable->x;
> srcy = yIn + pSrcDrawable->y;
>
> - /* If the destination isn't realized, this is easy */
> + /* If the destination isn't paintable, this is easy */
> if (pDstDrawable->type == DRAWABLE_WINDOW &&
> - !((WindowPtr) pDstDrawable)->realized)
> + !((WindowPtr) pDstDrawable)->paintable)
> return NULL;
>
> /* clip the source */
> diff --git a/mi/micopy.c b/mi/micopy.c
> index 2409c78..1098848 100644
> --- a/mi/micopy.c
> +++ b/mi/micopy.c
> @@ -155,7 +155,7 @@ miDoCopy(DrawablePtr pSrcDrawable,
> /* Short cut for unmapped windows */
>
> if (pDstDrawable->type == DRAWABLE_WINDOW &&
> - !((WindowPtr) pDstDrawable)->realized) {
> + !((WindowPtr) pDstDrawable)->paintable) {
> return NULL;
> }
These might just want to check to see if the clip list is empty instead;
that would be a lot safer, and not much more expensive.
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20141122/388f76b1/attachment.sig>
More information about the xorg-devel
mailing list