Return early from xglCopy if fall-back is more efficient
This commit is contained in:
parent
e09d1d2ae3
commit
db7c9d349b
|
@ -38,9 +38,19 @@ xglCopy (DrawablePtr pSrc,
|
||||||
int srcXoff, srcYoff;
|
int srcXoff, srcYoff;
|
||||||
int dstXoff, dstYoff;
|
int dstXoff, dstYoff;
|
||||||
|
|
||||||
|
XGL_DRAWABLE_PIXMAP_PRIV (pSrc);
|
||||||
|
|
||||||
if (!nBox)
|
if (!nBox)
|
||||||
return TRUE;
|
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))
|
if (xglPrepareTarget (pDst))
|
||||||
{
|
{
|
||||||
XGL_SCREEN_PRIV (pDst->pScreen);
|
XGL_SCREEN_PRIV (pDst->pScreen);
|
||||||
|
@ -52,12 +62,8 @@ xglCopy (DrawablePtr pSrc,
|
||||||
|
|
||||||
/* blit to screen */
|
/* blit to screen */
|
||||||
if (dst == pScreenPriv->surface)
|
if (dst == pScreenPriv->surface)
|
||||||
{
|
|
||||||
XGL_DRAWABLE_PIXMAP_PRIV (pSrc);
|
|
||||||
|
|
||||||
XGL_INCREMENT_PIXMAP_SCORE (pPixmapPriv, 5000);
|
XGL_INCREMENT_PIXMAP_SCORE (pPixmapPriv, 5000);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!xglPrepareTarget (pSrc))
|
if (!xglPrepareTarget (pSrc))
|
||||||
|
|
Loading…
Reference in New Issue