summaryrefslogtreecommitdiff
path: root/Build/source/libs/graphite-engine/src/segment/FontCache.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/graphite-engine/src/segment/FontCache.h')
-rw-r--r--Build/source/libs/graphite-engine/src/segment/FontCache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Build/source/libs/graphite-engine/src/segment/FontCache.h b/Build/source/libs/graphite-engine/src/segment/FontCache.h
index 7159ea35d98..56da5ab26b8 100644
--- a/Build/source/libs/graphite-engine/src/segment/FontCache.h
+++ b/Build/source/libs/graphite-engine/src/segment/FontCache.h
@@ -24,11 +24,13 @@ namespace gr
{
class FontFace;
+class FontMemoryUsage;
/*----------------------------------------------------------------------------------------------
TODO: change from a sorted list to a hash table, if performance so requires.
----------------------------------------------------------------------------------------------*/
class FontCache {
+ friend class FontMemoryUsage;
public:
FontCache()
@@ -69,6 +71,7 @@ public:
void GetFontFace(std::wstring strFaceName, bool fBold, bool fItalic, FontFace ** ppfface);
void CacheFontFace(std::wstring strFaceName, bool fBold, bool fItalic, FontFace * pfface);
bool RemoveFontFace(std::wstring strFaceName, bool fBold, bool fItalic, bool fZapCache = true);
+ void DeleteIfEmpty();
void AssertEmpty();
int GetFlushMode()
@@ -80,6 +83,8 @@ public:
// Debugging:
//bool DbgCheckFontCache();
+ void calculateMemoryUsage(FontMemoryUsage & fmu);
+
protected:
int FindCacheItem(std::wstring strFaceName);
void InsertCacheItem(int ifci);