summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-04-29 23:44:27 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-04-29 23:44:27 +0200
commitd3f8667341bfe6dc7d0258c4ad69377f37d88d95 (patch)
tree50c8d873d88651187148791a34ad7e4149b2bc6c /exa
parent5e4b3232dafe3b0dec65bf639bebaba4774210b7 (diff)
EXA: Fix exaEnableDisableFBAccess for nested disables and enables.
Diffstat (limited to 'exa')
-rw-r--r--exa/exa_offscreen.c6
-rw-r--r--exa/exa_priv.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index 7708dd739..38ad58f60 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -341,13 +341,15 @@ exaEnableDisableFBAccess (int index, Bool enable)
ScreenPtr pScreen = screenInfo.screens[index];
ExaScreenPriv (pScreen);
- if (!enable) {
+ if (!enable && pExaScr->disableFbCount++ == 0) {
if (pExaScr->info->exa_minor < 1)
ExaOffscreenSwapOut (pScreen);
else
ExaOffscreenEjectPixmaps (pScreen);
pExaScr->swappedOut = TRUE;
- } else {
+ }
+
+ if (enable && --pExaScr->disableFbCount == 0) {
if (pExaScr->info->exa_minor < 1)
ExaOffscreenSwapIn (pScreen);
pExaScr->swappedOut = FALSE;
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 984cb669b..382f0591e 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -113,6 +113,7 @@ typedef struct {
enum ExaMigrationHeuristic migration;
Bool hideOffscreenPixmapData;
Bool checkDirtyCorrectness;
+ unsigned disableFbCount;
} ExaScreenPrivRec, *ExaScreenPrivPtr;
/*