add typefacecache to be purged in SkGraphics::Term()
git-svn-id: http://skia.googlecode.com/svn/trunk@2504 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkTypefaceCache.h b/src/core/SkTypefaceCache.h
index ce351e5..b788d21 100644
--- a/src/core/SkTypefaceCache.h
+++ b/src/core/SkTypefaceCache.h
@@ -53,6 +53,13 @@
static SkTypeface* FindByProc(FindProc proc, void* ctx);
/**
+ * This will unref all of the typefaces in the cache. Normally this is
+ * handled automatically as needed. This function is exposed for clients
+ * that explicitly want to purge the entire cache (e.g. to look for leaks).
+ */
+ static void PurgeAll();
+
+ /**
* Debugging only: dumps the status of the typefaces in the cache
*/
static void Dump();
@@ -64,6 +71,7 @@
SkTypeface* findByID(SkFontID findID) const;
SkTypeface* findByProc(FindProc proc, void* ctx) const;
void purge(int count);
+ void purgeAll();
struct Rec {
SkTypeface* fFace;