diff options
Diffstat (limited to 'xorg-server/dix/main.c')
-rw-r--r-- | xorg-server/dix/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c index b8ee88f18..cdca10250 100644 --- a/xorg-server/dix/main.c +++ b/xorg-server/dix/main.c @@ -251,6 +251,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]; @@ -385,6 +391,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; |