diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-08-30 13:48:03 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-09-07 18:41:32 +0200 |
commit | a634c9b03494ba80aeec28be19662ac96657cc23 (patch) | |
tree | 390c8d9b1689c12226a327562641f67c2afa33e4 /exa/exa_unaccel.c | |
parent | 1f457ff3db24178eefecfbbf177aaf6554adb204 (diff) |
EXA: RENDER improvements.
Exclude bits that will be overwritten from migration.
Use exaGlyphs even when Composite can't be accelerated, to avoid PolyFillRect
roundtrip via offscreen memory.
Initialize mask pixmap in exaGlyphs in FB in addition to system if the driver
provides Composite hooks to avoid migration overhead.
Remove manual damage tracking where superfluous.
Diffstat (limited to 'exa/exa_unaccel.c')
-rw-r--r-- | exa/exa_unaccel.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index fbc48dd34..24d5e3ff7 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -23,6 +23,10 @@ #include "exa_priv.h" +#ifdef RENDER +#include "mipict.h" +#endif + /* * These functions wrap the low-level fb rendering functions and * synchronize framebuffer/accelerated drawing by stalling until @@ -319,9 +323,30 @@ ExaCheckComposite (CARD8 op, CARD16 width, CARD16 height) { + RegionRec region; + int xoff, yoff; + + REGION_NULL(pScreen, ®ion); + + if (!exaOpReadsDestination(op)) { + if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height)) + return; + + exaGetDrawableDeltas (pDst->pDrawable, + exaGetDrawablePixmap(pDst->pDrawable), + &xoff, &yoff); + + REGION_TRANSLATE(pScreen, ®ion, xoff, yoff); + + exaPrepareAccessReg (pDst->pDrawable, EXA_PREPARE_DEST, ®ion); + } else + exaPrepareAccess (pDst->pDrawable, EXA_PREPARE_DEST); + EXA_FALLBACK(("from picts %p/%p to pict %p\n", pSrc, pMask, pDst)); - exaPrepareAccess (pDst->pDrawable, EXA_PREPARE_DEST); + if (pSrc->pDrawable != NULL) exaPrepareAccess (pSrc->pDrawable, EXA_PREPARE_SRC); if (pMask && pMask->pDrawable != NULL) @@ -343,6 +368,8 @@ ExaCheckComposite (CARD8 op, if (pSrc->pDrawable != NULL) exaFinishAccess (pSrc->pDrawable, EXA_PREPARE_SRC); exaFinishAccess (pDst->pDrawable, EXA_PREPARE_DEST); + + REGION_UNINIT(pScreen, ®ion); } /** |