diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-08-06 04:13:08 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-08-06 04:13:08 +0000 |
commit | 676c0367f14e1ae58ae04397d39640e06b502d57 (patch) | |
tree | 54709df53239fd685bd08245f720e65515103263 | |
parent | 9629e9e1ffa2f76989c877a2c2e4c0324716100d (diff) | |
download | pango-676c0367f14e1ae58ae04397d39640e06b502d57.tar.gz |
Use FcPatternHash instead of rolling our own. (Slight speed decrease)
Mon Aug 5 23:57:59 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoxft-fontmap.c (pango_xft_pattern_hash): Use
FcPatternHash instead of rolling our own. (Slight speed
decrease) (Keith Packard)
* pango/pangoxft-fontmap.c (pango_xft_get_font_map):
Remove accidentally deleted call to init_fontset_hash().
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-1-2 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-1-4 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-1-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 9 | ||||
-rw-r--r-- | pango/pangoxft-fontmap.c | 9 |
7 files changed, 62 insertions, 1 deletions
@@ -1,3 +1,12 @@ +Mon Aug 5 23:57:59 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-fontmap.c (pango_xft_pattern_hash): Use + FcPatternHash instead of rolling our own. (Slight speed + decrease) (Keith Packard) + + * pango/pangoxft-fontmap.c (pango_xft_get_font_map): + Remove accidentally deleted call to init_fontset_hash(). + Mon Aug 5 23:12:13 2002 Owen Taylor <otaylor@redhat.com> Patch from Keith Packard: diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index bbb1b1b3..7f5435ae 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,12 @@ +Mon Aug 5 23:57:59 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-fontmap.c (pango_xft_pattern_hash): Use + FcPatternHash instead of rolling our own. (Slight speed + decrease) (Keith Packard) + + * pango/pangoxft-fontmap.c (pango_xft_get_font_map): + Remove accidentally deleted call to init_fontset_hash(). + Mon Aug 5 23:12:13 2002 Owen Taylor <otaylor@redhat.com> Patch from Keith Packard: diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index bbb1b1b3..7f5435ae 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,12 @@ +Mon Aug 5 23:57:59 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-fontmap.c (pango_xft_pattern_hash): Use + FcPatternHash instead of rolling our own. (Slight speed + decrease) (Keith Packard) + + * pango/pangoxft-fontmap.c (pango_xft_get_font_map): + Remove accidentally deleted call to init_fontset_hash(). + Mon Aug 5 23:12:13 2002 Owen Taylor <otaylor@redhat.com> Patch from Keith Packard: diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index bbb1b1b3..7f5435ae 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,12 @@ +Mon Aug 5 23:57:59 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-fontmap.c (pango_xft_pattern_hash): Use + FcPatternHash instead of rolling our own. (Slight speed + decrease) (Keith Packard) + + * pango/pangoxft-fontmap.c (pango_xft_get_font_map): + Remove accidentally deleted call to init_fontset_hash(). + Mon Aug 5 23:12:13 2002 Owen Taylor <otaylor@redhat.com> Patch from Keith Packard: diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index bbb1b1b3..7f5435ae 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,12 @@ +Mon Aug 5 23:57:59 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-fontmap.c (pango_xft_pattern_hash): Use + FcPatternHash instead of rolling our own. (Slight speed + decrease) (Keith Packard) + + * pango/pangoxft-fontmap.c (pango_xft_get_font_map): + Remove accidentally deleted call to init_fontset_hash(). + Mon Aug 5 23:12:13 2002 Owen Taylor <otaylor@redhat.com> Patch from Keith Packard: diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index bbb1b1b3..7f5435ae 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,12 @@ +Mon Aug 5 23:57:59 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-fontmap.c (pango_xft_pattern_hash): Use + FcPatternHash instead of rolling our own. (Slight speed + decrease) (Keith Packard) + + * pango/pangoxft-fontmap.c (pango_xft_get_font_map): + Remove accidentally deleted call to init_fontset_hash(). + Mon Aug 5 23:12:13 2002 Owen Taylor <otaylor@redhat.com> Patch from Keith Packard: diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c index 32926f0a..5e9ccab9 100644 --- a/pango/pangoxft-fontmap.c +++ b/pango/pangoxft-fontmap.c @@ -178,11 +178,16 @@ static GSList *fontmaps = NULL; guint pango_xft_pattern_hash (FcPattern *pattern) { +#if 1 + return FcPatternHash (pattern); +#else + /* Hashing only part of the pattern can improve speed a bit. + */ char *str; int i; double d; guint hash = 0; - + FcPatternGetString (pattern, FC_FILE, 0, (FcChar8 **) &str); if (str) hash = g_str_hash (str); @@ -194,6 +199,7 @@ pango_xft_pattern_hash (FcPattern *pattern) hash ^= (guint) (d*1000.0); return hash; +#endif } gboolean @@ -297,6 +303,7 @@ pango_xft_get_font_map (Display *display, xfontmap->fonts = g_hash_table_new ((GHashFunc)pango_xft_pattern_hash, (GEqualFunc)pango_xft_pattern_equal); + pango_xft_init_fontset_hash (xfontmap); xfontmap->coverage_hash = g_hash_table_new_full ((GHashFunc)pango_xft_coverage_key_hash, (GEqualFunc)pango_xft_coverage_key_equal, (GDestroyNotify)g_free, |