Move migration logic to a new function, exaDoMigration(). This is largely a

manual conversion to allow for different migration schemes to be
    implemented reasonably, but does include some minor improvements such
    as accounting for pinned pixmaps not being acceleratable, and for our
    current GetImage and GetSpans not being accelerated.
This commit is contained in:
Eric Anholt 2006-03-14 21:30:12 +00:00
commit 693e42114f
7 changed files with 317 additions and 87 deletions

View file

@ -279,6 +279,11 @@ ExaCheckRestoreAreas (PixmapPtr pPixmap,
exaFinishAccess ((DrawablePtr)pPixmap, EXA_PREPARE_DEST);
}
/* XXX: Note the lack of a prepare on the tile, if the window has a tiled
* background. This function happens to only be called if pExaScr->swappedOut,
* so we actually end up not having to do it since the tile won't be in fb.
* That doesn't make this not dirty, though.
*/
void
ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what)
{
@ -334,8 +339,12 @@ CARD32
exaGetPixmapFirstPixel (PixmapPtr pPixmap)
{
CARD32 pixel;
ExaMigrationRec pixmaps[1];
exaDrawableUseMemory(&pPixmap->drawable);
pixmaps[0].as_dst = FALSE;
pixmaps[0].as_src = TRUE;
pixmaps[0].pPix = pPixmap;
exaDoMigration (pixmaps, 1, TRUE);
exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
switch (pPixmap->drawable.bitsPerPixel) {