summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-11-11 22:02:04 -0800
committerAdam Jackson <ajax@redhat.com>2015-12-01 13:55:11 -0500
commit91ea0965dd4dfeba0a914c47ad4a64768e983b1b (patch)
tree406cf6f65f25874b15cd2d02370d05a30aa92064
parent4020aacd1fc5b9c63369f011aeb9120af9c55218 (diff)
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>
-rw-r--r--dix/dixfonts.c2
-rw-r--r--dix/main.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 300bf043a..19db141f1 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1809,6 +1809,8 @@ InitFonts(void)
{
patternCache = MakeFontPatternCache();
+ ResetFontPrivateIndex();
+
register_fpe_functions();
}
diff --git a/dix/main.c b/dix/main.c
index 549567660..661ab0361 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -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);