summaryrefslogtreecommitdiff
path: root/src/fccfg.c
diff options
context:
space:
mode:
authorPatrick Lam <plam@MIT.EDU>2005-11-29 06:23:00 +0000
committerPatrick Lam <plam@MIT.EDU>2005-11-29 06:23:00 +0000
commit9fad72abaf3da6f3e4a691a0e1a852f6a7353d56 (patch)
tree27ddfd80e3137cd5edca4b7b39163a9c62145c07 /src/fccfg.c
parent51af0509925e780eb3eb9014aac5e50b6bbbe0d1 (diff)
Make the perf guys hate me a bit less: hoist the directory-name
FcConfigAcceptFont check for cached fonts up to directory cache read time, rather than running it for each font.
Diffstat (limited to 'src/fccfg.c')
-rw-r--r--src/fccfg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/fccfg.c b/src/fccfg.c
index 00510e5..56c1a3e 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -308,13 +308,11 @@ FcConfigBuildFonts (FcConfig *config)
for (i = 0; i < cached_fonts->nfont; i++)
{
- FcChar8 *cfn, *cfd;
+ FcChar8 *cfn;
FcPatternGetString (cached_fonts->fonts[i], FC_FILE, 0, &cfn);
- cfd = (FcChar8 *)FcCacheFindBankDir (cached_fonts->fonts[i]->bank);
if (FcConfigAcceptFont (config, cached_fonts->fonts[i]) &&
- (cfn && FcConfigAcceptFilename (config, cfn)) &&
- (cfd && FcConfigAcceptFilename (config, cfd)))
+ (cfn && FcConfigAcceptFilename (config, cfn)))
FcFontSetAdd (fonts, cached_fonts->fonts[i]);
cached_fonts->fonts[i] = 0; /* prevent free in FcFontSetDestroy */