summaryrefslogtreecommitdiff
path: root/pango/pangoft2-private.h
diff options
context:
space:
mode:
authorAlexander Larsson <alla@lysator.liu.se>2002-01-18 05:42:20 +0000
committerAlexander Larsson <alexl@src.gnome.org>2002-01-18 05:42:20 +0000
commit20f066b00b96d44a1054ad85fc4098d294915606 (patch)
treea558cb56380402bc88771fc6c9ac763a7110451f /pango/pangoft2-private.h
parentf05258fe38f6baa2ce3f81b56a15d70e530e23ec (diff)
downloadpango-20f066b00b96d44a1054ad85fc4098d294915606.tar.gz
Add glyph_cache_destroy to PangoFont. This is slightly ugly, we should
2002-01-18 Alexander Larsson <alla@lysator.liu.se> * pango/pangoft2-private.h: Add glyph_cache_destroy to PangoFont. This is slightly ugly, we should perhaps have it in the FontMap, but it was easy. Added cached_glyph to PangoFT2GlyphInfo. This can be used by apps that want to have a glyph cache. Only one user per PangoContext though. Right now it is only internally accessible. Added pango_ft2_font_get_cache_glyph_data(), pango_ft2_font_set_cache_glyph_data() and pango_ft2_font_set_glyph_cache_destroy() to access this functionallity * pango/pangoft2.c: Implement glyph caching for pango_ft2_render_layout(). Unbounded caching right now. We should probably limit this in order to not use a lot of memory if the user displayed a lot of glyphs once, and then doesn't use them anymore.
Diffstat (limited to 'pango/pangoft2-private.h')
-rw-r--r--pango/pangoft2-private.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/pango/pangoft2-private.h b/pango/pangoft2-private.h
index e7276bd3..0a9ff03b 100644
--- a/pango/pangoft2-private.h
+++ b/pango/pangoft2-private.h
@@ -76,12 +76,14 @@ struct _PangoFT2Font
gboolean in_cache;
GHashTable *glyph_info;
+ GDestroyNotify glyph_cache_destroy;
};
struct _PangoFT2GlyphInfo
{
PangoRectangle logical_rect;
PangoRectangle ink_rect;
+ void *cached_glyph;
};
struct _PangoFT2Face
@@ -115,4 +117,14 @@ const char *_pango_ft2_ft_strerror (FT_Error error);
PangoFontDescription *_pango_ft2_font_desc_from_pattern (MiniXftPattern *pattern,
gboolean include_size);
+void *pango_ft2_font_get_cache_glyph_data (PangoFont *font,
+ int glyph_index);
+void pango_ft2_font_set_cache_glyph_data (PangoFont *font,
+ int glyph_index,
+ void *cached_glyph);
+void pango_ft2_font_set_glyph_cache_destroy (PangoFont *font,
+ GDestroyNotify destroy_notify);
+
+
+
#endif /* __PANGOFT2_PRIVATE_H__ */