summaryrefslogtreecommitdiff
path: root/exa/exa.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2009-02-26 22:18:03 +0100
committerMaarten Maathuis <madman2003@gmail.com>2009-02-27 17:11:35 +0100
commited00515ec54b294f304b8ae2857e3073f97860d2 (patch)
tree30de04d33e9fb54526cf32663d67ff95626e8902 /exa/exa.c
parent2e88b6004f09dbcb888abf05d4d5554231b2bd1a (diff)
exa: fixup exaAssertNotDirty.
- Do the right thing based on prepare access.
Diffstat (limited to 'exa/exa.c')
-rw-r--r--exa/exa.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/exa/exa.c b/exa/exa.c
index 5425f902e..76860a490 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -517,7 +517,10 @@ exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp)
return NULL;
}
-void
+/**
+ * Returns TRUE if pixmap can be accessed offscreen.
+ */
+Bool
ExaDoPrepareAccess(DrawablePtr pDrawable, int index)
{
ScreenPtr pScreen = pDrawable->pScreen;
@@ -531,12 +534,12 @@ ExaDoPrepareAccess(DrawablePtr pDrawable, int index)
}
if (!offscreen)
- return;
+ return FALSE;
exaWaitSync (pDrawable->pScreen);
if (pExaScr->info->PrepareAccess == NULL)
- return;
+ return TRUE;
if (index >= EXA_PREPARE_AUX0 &&
!(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) {
@@ -549,7 +552,11 @@ ExaDoPrepareAccess(DrawablePtr pDrawable, int index)
if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED)
FatalError("Driver failed PrepareAccess on a pinned pixmap\n");
exaMoveOutPixmap (pPixmap);
+
+ return FALSE;
}
+
+ return TRUE;
}
void