diff options
author | David Reveman <c99drn@cs.umu.se> | 2005-03-08 09:27:09 +0000 |
---|---|---|
committer | David Reveman <c99drn@cs.umu.se> | 2005-03-08 09:27:09 +0000 |
commit | db7c9d349b86216ed00888181c64ab707fbe18d4 (patch) | |
tree | dff61d6e8c66271ac266bd4e3754c713511f317a /hw/xgl | |
parent | e09d1d2ae3ccd59408b1dc6f264897ae12dfa2b8 (diff) |
Return early from xglCopy if fall-back is more efficient
Diffstat (limited to 'hw/xgl')
-rw-r--r-- | hw/xgl/xglcopy.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/hw/xgl/xglcopy.c b/hw/xgl/xglcopy.c index c34459b5a..a74a78c5e 100644 --- a/hw/xgl/xglcopy.c +++ b/hw/xgl/xglcopy.c @@ -38,9 +38,19 @@ xglCopy (DrawablePtr pSrc, int srcXoff, srcYoff; int dstXoff, dstYoff; + XGL_DRAWABLE_PIXMAP_PRIV (pSrc); + if (!nBox) return TRUE; + /* source is all in software and damaged, fall-back is probably more + efficient */ + if (pPixmapPriv->allBits && + pPixmapPriv->pDamage && + REGION_NOTEMPTY (pDrawable->pScreen, + DamageRegion (pPixmapPriv->pDamage))) + return FALSE; + if (xglPrepareTarget (pDst)) { XGL_SCREEN_PRIV (pDst->pScreen); @@ -52,11 +62,7 @@ xglCopy (DrawablePtr pSrc, /* blit to screen */ if (dst == pScreenPriv->surface) - { - XGL_DRAWABLE_PIXMAP_PRIV (pSrc); - XGL_INCREMENT_PIXMAP_SCORE (pPixmapPriv, 5000); - } } else { |