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.
This commit is contained in:
Michel Dänzer 2007-08-30 13:48:03 +02:00
commit a634c9b034
4 changed files with 80 additions and 87 deletions

View file

@ -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, &region);
if (!exaOpReadsDestination(op)) {
if (!miComputeCompositeRegion (&region, pSrc, pMask, pDst,
xSrc, ySrc, xMask, yMask, xDst, yDst,
width, height))
return;
exaGetDrawableDeltas (pDst->pDrawable,
exaGetDrawablePixmap(pDst->pDrawable),
&xoff, &yoff);
REGION_TRANSLATE(pScreen, &region, xoff, yoff);
exaPrepareAccessReg (pDst->pDrawable, EXA_PREPARE_DEST, &region);
} 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, &region);
}
/**