aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/main.c')
-rw-r--r--xorg-server/dix/main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c
index 9524189d0..42f517dfd 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -207,6 +207,12 @@ main(int argc, char *argv[], char *envp[])
FatalError("no screens found");
InitExtensions(argc, argv);
+ for (i = 0; i < screenInfo.numGPUScreens; i++) {
+ ScreenPtr pScreen = screenInfo.gpuscreens[i];
+ if (!CreateScratchPixmapsForScreen(pScreen))
+ FatalError("failed to create scratch pixmaps");
+ }
+
for (i = 0; i < screenInfo.numScreens; i++) {
ScreenPtr pScreen = screenInfo.screens[i];
@@ -336,6 +342,15 @@ main(int argc, char *argv[], char *envp[])
screenInfo.numScreens = i;
}
+ for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) {
+ ScreenPtr pScreen = screenInfo.gpuscreens[i];
+ FreeScratchPixmapsForScreen(pScreen);
+ (*pScreen->CloseScreen) (pScreen);
+ dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
+ free(pScreen);
+ screenInfo.numGPUScreens = i;
+ }
+
ReleaseClientIds(serverClient);
dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT);
serverClient->devPrivates = NULL;