Add a method reporting used font cache size to the SkGraphics API git-svn-id: http://skia.googlecode.com/svn/trunk@4825 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
ada448040f
commit
79a1c34ee4
@ -48,6 +48,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
static size_t SetFontCacheLimit(size_t bytes);
|
static size_t SetFontCacheLimit(size_t bytes);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the number of bytes currently used by the font cache.
|
||||||
|
*/
|
||||||
|
static size_t GetFontCacheUsed();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For debugging purposes, this will attempt to purge the font cache. It
|
* For debugging purposes, this will attempt to purge the font cache. It
|
||||||
* does not change the limit, but will cause subsequent font measures and
|
* does not change the limit, but will cause subsequent font measures and
|
||||||
|
@ -717,6 +717,10 @@ size_t SkGraphics::SetFontCacheLimit(size_t bytes) {
|
|||||||
return getSharedGlobals().setFontCacheLimit(bytes);
|
return getSharedGlobals().setFontCacheLimit(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t SkGraphics::GetFontCacheUsed() {
|
||||||
|
return getSharedGlobals().fTotalMemoryUsed;
|
||||||
|
}
|
||||||
|
|
||||||
void SkGraphics::PurgeFontCache() {
|
void SkGraphics::PurgeFontCache() {
|
||||||
getSharedGlobals().purgeAll();
|
getSharedGlobals().purgeAll();
|
||||||
SkTypefaceCache::PurgeAll();
|
SkTypefaceCache::PurgeAll();
|
||||||
|
Loading…
Reference in New Issue
Block a user