Return early from xglCopy if fall-back is more efficient

This commit is contained in:
David Reveman 2005-03-08 09:27:09 +00:00
parent e09d1d2ae3
commit db7c9d349b

View File

@ -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
{