exa: handle pixmap create/destroy in lower layers

- Pixmaps that are created during a fallback are automatically prepared access.
- During the fallback accelerated ops are blocked to prevent new/scratch gc's
  from triggering accelerated ops on mapped pixmaps.
- A few cases of incorrect wrapping (on the top level pointer instead of
  between damage and (w)fb) have been removed.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Maarten Maathuis 2009-11-28 10:34:43 +01:00 • committed by Keith Packard
commit 342f3689d1
7 changed files with 137 additions and 162 deletions

View file

@ -97,6 +97,10 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
} else
pExaPixmap->offscreen = FALSE;
/* During a fallback we must prepare access. */
if (pExaScr->fallback_counter)
exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST);
return pPixmap;
}
@ -188,6 +192,10 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
{
ExaPixmapPriv (pPixmap);
/* During a fallback we must finish access, but we don't know the index. */
if (pExaScr->fallback_counter)
exaFinishAccess(&pPixmap->drawable, -1);
if (pExaScr->deferred_mixed_pixmap == pPixmap)
pExaScr->deferred_mixed_pixmap = NULL;