diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-09-05 20:10:09 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-09-07 18:41:29 +0200 |
commit | 8cfcf9973c765f11d1b45b95b8091ef7e01d7f01 (patch) | |
tree | 9bc54d9d12cca66bb5595851e4b9fd4dcecdb8d8 /exa/exa.c | |
parent | e510a77ba4d65d5d6ead514cd698f1b1e3f8a2b6 (diff) |
EXA: Migrate out pixmap in exaPrepareAccess.
Also fix exaFinishAccessGC not to use the same index for tile and stipple.
Diffstat (limited to 'exa/exa.c')
-rw-r--r-- | exa/exa.c | 30 |
1 files changed, 22 insertions, 8 deletions
@@ -329,14 +329,8 @@ exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp) return NULL; } -/** - * exaPrepareAccess() is EXA's wrapper for the driver's PrepareAccess() handler. - * - * It deals with waiting for synchronization with the card, determining if - * PrepareAccess() is necessary, and working around PrepareAccess() failure. - */ void -exaPrepareAccess(DrawablePtr pDrawable, int index) +ExaDoPrepareAccess(DrawablePtr pDrawable, int index) { ScreenPtr pScreen = pDrawable->pScreen; ExaScreenPriv (pScreen); @@ -368,6 +362,26 @@ exaPrepareAccess(DrawablePtr pDrawable, int index) } /** + * exaPrepareAccess() is EXA's wrapper for the driver's PrepareAccess() handler. + * + * It deals with waiting for synchronization with the card, determining if + * PrepareAccess() is necessary, and working around PrepareAccess() failure. + */ +void +exaPrepareAccess(DrawablePtr pDrawable, int index) +{ + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = index == EXA_PREPARE_DEST; + pixmaps[0].as_src = index != EXA_PREPARE_DEST; + pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); + + exaDoMigration(pixmaps, 1, FALSE); + + ExaDoPrepareAccess(pDrawable, index); +} + +/** * exaFinishAccess() is EXA's wrapper for the driver's FinishAccess() handler. * * It deals with calling the driver's FinishAccess() only if necessary. @@ -698,7 +712,7 @@ exaDriverInit (ScreenPtr pScreen, pScreen->GetImage = exaGetImage; pExaScr->SavedGetSpans = pScreen->GetSpans; - pScreen->GetSpans = exaGetSpans; + pScreen->GetSpans = ExaCheckGetSpans; pExaScr->SavedCopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = exaCopyWindow; |