EXA: Fix exaEnableDisableFBAccess for nested disables and enables.

This commit is contained in:
Michel Dänzer 2007-04-29 23:44:27 +02:00
parent 5e4b3232da
commit d3f8667341
2 changed files with 5 additions and 2 deletions

View File

@ -341,13 +341,15 @@ exaEnableDisableFBAccess (int index, Bool enable)
ScreenPtr pScreen = screenInfo.screens[index]; ScreenPtr pScreen = screenInfo.screens[index];
ExaScreenPriv (pScreen); ExaScreenPriv (pScreen);
if (!enable) { if (!enable && pExaScr->disableFbCount++ == 0) {
if (pExaScr->info->exa_minor < 1) if (pExaScr->info->exa_minor < 1)
ExaOffscreenSwapOut (pScreen); ExaOffscreenSwapOut (pScreen);
else else
ExaOffscreenEjectPixmaps (pScreen); ExaOffscreenEjectPixmaps (pScreen);
pExaScr->swappedOut = TRUE; pExaScr->swappedOut = TRUE;
} else { }
if (enable && --pExaScr->disableFbCount == 0) {
if (pExaScr->info->exa_minor < 1) if (pExaScr->info->exa_minor < 1)
ExaOffscreenSwapIn (pScreen); ExaOffscreenSwapIn (pScreen);
pExaScr->swappedOut = FALSE; pExaScr->swappedOut = FALSE;

View File

@ -113,6 +113,7 @@ typedef struct {
enum ExaMigrationHeuristic migration; enum ExaMigrationHeuristic migration;
Bool hideOffscreenPixmapData; Bool hideOffscreenPixmapData;
Bool checkDirtyCorrectness; Bool checkDirtyCorrectness;
unsigned disableFbCount;
} ExaScreenPrivRec, *ExaScreenPrivPtr; } ExaScreenPrivRec, *ExaScreenPrivPtr;
/* /*