summaryrefslogtreecommitdiff
path: root/hw/xfree86/xaa/xaaPict.c
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2006-05-11 10:18:08 +0000
committerMatthias Hopf <mhopf@suse.de>2006-05-11 10:18:08 +0000
commit9db5d2dfc33e384ea4db1b7cbc377e0b05cfb3ff (patch)
tree5e87de6db7bc9e50d09ab4ed03474796f8dc3ad4 /hw/xfree86/xaa/xaaPict.c
parent9a2a63ca3ff30d15e82a29e75a3720ba5b446978 (diff)
Bug #4320: Improved XAA Composite fastpath.
Diffstat (limited to 'hw/xfree86/xaa/xaaPict.c')
-rw-r--r--hw/xfree86/xaa/xaaPict.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index 847ccb2e0..f7c1f3dd0 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -507,12 +507,19 @@ XAAComposite (CARD8 op,
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
XAA_RENDER_PROLOGUE(pScreen, Composite);
- if((op == PictOpSrc) && !pMask && infoRec->pScrn->vtSema &&
- infoRec->ScreenToScreenBitBlt &&
- pSrc->pDrawable &&
- DRAWABLE_IS_ON_CARD(pSrc->pDrawable) &&
- DRAWABLE_IS_ON_CARD(pDst->pDrawable) &&
- !pSrc->transform && !pSrc->repeat && (pSrc->format == pDst->format))
+ if(!pMask && infoRec->pScrn->vtSema &&
+ infoRec->ScreenToScreenBitBlt &&
+ pSrc->pDrawable &&
+ DRAWABLE_IS_ON_CARD(pSrc->pDrawable) &&
+ DRAWABLE_IS_ON_CARD(pDst->pDrawable) &&
+ !pSrc->transform &&
+ (!pSrc->repeat || (xSrc >= 0 && ySrc >= 0 &&
+ xSrc+width<=pSrc->pDrawable->width &&
+ ySrc+height<=pSrc->pDrawable->height)) &&
+ ((op == PictOpSrc && pSrc->format == pDst->format) ||
+ (op == PictOpOver && !pSrc->alphaMap && !pDst->alphaMap &&
+ pSrc->format==pDst->format &&
+ (pSrc->format==PICT_x8r8g8b8 || pSrc->format==PICT_x8b8g8r8))))
{
XAACompositeSrcCopy(pSrc, pDst, xSrc, ySrc, xDst, yDst, width, height);
} else if(!pSrc->pDrawable || (pMask && !pMask->pDrawable) ||