summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-05-24 16:28:15 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-07-18 12:47:53 -0700
commit89b8df08725a2da2fe3607fea2231ded1eb5c342 (patch)
tree3fd150cc64c1ca79df859e08133a7664e81ef841 /pango/pangofc-fontmap.c
parent9b91930793610304632d887f032d02e058db8259 (diff)
downloadpango-89b8df08725a2da2fe3607fea2231ded1eb5c342.tar.gz
fc: Drop the cmap cache
This is now unused.
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r--pango/pangofc-fontmap.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index cc450d20..0659b078 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -166,7 +166,6 @@ struct _PangoFcFontFaceData
/* Data */
FcPattern *pattern; /* Referenced pattern that owns filename */
PangoCoverage *coverage;
- PangoFcCmapCache *cmap_cache;
hb_face_t *hb_face;
};
@@ -299,9 +298,6 @@ pango_fc_font_face_data_free (PangoFcFontFaceData *data)
if (data->coverage)
pango_coverage_unref (data->coverage);
- if (data->cmap_cache)
- _pango_fc_cmap_cache_unref (data->cmap_cache);
-
hb_face_destroy (data->hb_face);
g_slice_free (PangoFcFontFaceData, data);
@@ -1939,53 +1935,6 @@ pango_fc_font_map_get_font_face_data (PangoFcFontMap *fcfontmap,
return data;
}
-static PangoFcCmapCache *
-_pango_fc_cmap_cache_ref (PangoFcCmapCache *cmap_cache)
-{
- g_atomic_int_inc ((int *) &cmap_cache->ref_count);
-
- return cmap_cache;
-}
-
-void
-_pango_fc_cmap_cache_unref (PangoFcCmapCache *cmap_cache)
-{
- g_return_if_fail (cmap_cache->ref_count > 0);
-
- if (g_atomic_int_dec_and_test ((int *) &cmap_cache->ref_count))
- {
- g_free (cmap_cache);
- }
-}
-
-PangoFcCmapCache *
-_pango_fc_font_map_get_cmap_cache (PangoFcFontMap *fcfontmap,
- PangoFcFont *fcfont)
-{
- PangoFcFontFaceData *data;
-
- if (G_UNLIKELY (fcfontmap == NULL))
- return NULL;
-
- if (G_UNLIKELY (!fcfont->font_pattern))
- return NULL;
-
- data = pango_fc_font_map_get_font_face_data (fcfontmap, fcfont->font_pattern);
- if (G_UNLIKELY (!data))
- return NULL;
-
- if (G_UNLIKELY (data->cmap_cache == NULL))
- {
- data->cmap_cache = g_new0 (PangoFcCmapCache, 1);
- data->cmap_cache->ref_count = 1;
-
- /* Make sure all cache entries are invalid initially */
- data->cmap_cache->entries[0].ch = 1; /* char 1 cannot happen in bucket 0 */
- }
-
- return _pango_fc_cmap_cache_ref (data->cmap_cache);
-}
-
typedef struct {
PangoCoverage parent_instance;