dix: Move InitFonts up above screen initialization

Font initialization was split into two stages, the first was to set up
font privates with a call to ResetFontPrivateIndex, then much later
the call to InitFonts to set up all of the FPEs. Doing the full font
initialization before initializing the video drivers means that we can
move the call to ResetFontPrivateIndex inside InitFonts.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2015-11-11 22:02:04 -08:00 committed by Adam Jackson
parent 4020aacd1f
commit 91ea0965dd
2 changed files with 3 additions and 2 deletions

View File

@ -1809,6 +1809,8 @@ InitFonts(void)
{
patternCache = MakeFontPatternCache();
ResetFontPrivateIndex();
register_fpe_functions();
}

View File

@ -199,7 +199,7 @@ dix_main(int argc, char *argv[], char *envp[])
InitEvents();
InitGlyphCaching();
dixResetRegistry();
ResetFontPrivateIndex();
InitFonts();
InitCallbackManager();
InitOutput(&screenInfo, argc, argv);
@ -232,7 +232,6 @@ dix_main(int argc, char *argv[], char *envp[])
FatalError("failed to create root window");
}
InitFonts();
if (SetDefaultFontPath(defaultFontPath) != Success) {
ErrorF("[dix] failed to set default font path '%s'",
defaultFontPath);