dix: let CreateGCperDepth() accept ScreenPtr instead of screen id
Some checks are pending
Build X servers / xserver-build-ubuntu (push) Waiting to run
Build X servers / drivers-build-ubuntu (push) Waiting to run
Build X servers / xserver-build-mingw32-ubuntu (push) Waiting to run
Build X servers / xserver-build-macos (push) Waiting to run
Build X servers / xserver-build-freebsd (push) Waiting to run
Build X servers / Release pushed tag (push) Waiting to run

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
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");