EXA: Fix exaEnableDisableFBAccess for nested disables and enables.
This commit is contained in:
		
							parent
							
								
									5e4b3232da
								
							
						
					
					
						commit
						d3f8667341
					
				| 
						 | 
					@ -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;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue