cleanup font purging functions
M include/core/SkGraphics.h M src/core/SkGraphics.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@2887 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
9245498e40
commit
f86ab8472e
@ -21,6 +21,9 @@ public:
|
||||
*/
|
||||
static void Init();
|
||||
|
||||
/**
|
||||
* Call this to release any memory held privately, such as the font cache.
|
||||
*/
|
||||
static void Term();
|
||||
|
||||
/**
|
||||
|
@ -126,8 +126,7 @@ void SkGraphics::Init() {
|
||||
#include "SkTypefaceCache.h"
|
||||
|
||||
void SkGraphics::Term() {
|
||||
SkGlyphCache::SetCacheUsed(0);
|
||||
SkTypefaceCache::PurgeAll();
|
||||
PurgeFontCache();
|
||||
}
|
||||
|
||||
#ifndef SK_DEFAULT_FONT_CACHE_LIMIT
|
||||
@ -159,6 +158,7 @@ size_t SkGraphics::SetFontCacheLimit(size_t bytes) {
|
||||
|
||||
void SkGraphics::PurgeFontCache() {
|
||||
SkGlyphCache::SetCacheUsed(0);
|
||||
SkTypefaceCache::PurgeAll();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user