dix: let CreateGCperDepth() accept ScreenPtr instead of screen id

It's only caller already has the ScreenPtr, so it doesn't make any sense
passing in the screen number and let that function retrieve the pointer
on its own again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-08-11 15:51:14 +02:00
committed by Enrico Weigelt
parent d4fc1506ad
commit 3af53d474f
3 changed files with 3 additions and 5 deletions

View File

@@ -831,13 +831,11 @@ FreeGCperDepth(ScreenPtr pScreen)
}
Bool
CreateGCperDepth(int screenNum)
CreateGCperDepth(ScreenPtr pScreen)
{
ScreenPtr pScreen;
DepthPtr pDepth;
GCPtr *ppGC;
pScreen = screenInfo.screens[screenNum];
ppGC = pScreen->GCperDepth;
/* do depth 1 separately because it's not included in list */
if (!(ppGC[0] = CreateScratchGC(pScreen, 1)))

View File

@@ -24,7 +24,7 @@ int FreeGC(void *pGC, XID gid);
void FreeGCperDepth(ScreenPtr pScreen);
Bool CreateGCperDepth(int screenNum);
Bool CreateGCperDepth(ScreenPtr pScreen);
Bool CreateDefaultStipple(ScreenPtr pScreen);

View File

@@ -216,7 +216,7 @@ dix_main(int argc, char *argv[], char *envp[])
FatalError("failed to create screen pixmap properties");
if (!dixScreenRaiseCreateResources(pScreen))
FatalError("failed to create screen resources");
if (!CreateGCperDepth(i))
if (!CreateGCperDepth(pScreen))
FatalError("failed to create scratch GCs");
if (!CreateDefaultStipple(pScreen))
FatalError("failed to create default stipple");