mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
committed by
Enrico Weigelt
parent
d4fc1506ad
commit
3af53d474f
4
dix/gc.c
4
dix/gc.c
@@ -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)))
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user