Index: src/core/SkGlyphCache.cpp |
diff --git a/src/core/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp |
index 30d00b2463aa6398e142a7eb895262ceaa28191e..6d978a6b5fd2d53302b9724693e9b48868c6b7c8 100644 |
--- a/src/core/SkGlyphCache.cpp |
+++ b/src/core/SkGlyphCache.cpp |
@@ -470,6 +470,21 @@ void SkGlyphCache::invokeAndRemoveAuxProcs() { |
/////////////////////////////////////////////////////////////////////////////// |
/////////////////////////////////////////////////////////////////////////////// |
+size_t SkGlyphCache_Globals::getTotalMemoryUsed() const { |
+ SkAutoExclusive ac(fLock); |
+ return fTotalMemoryUsed; |
+} |
+ |
+int SkGlyphCache_Globals::getCacheCountUsed() const { |
+ SkAutoExclusive ac(fLock); |
+ return fCacheCount; |
+} |
+ |
+int SkGlyphCache_Globals::getCacheCountLimit() const { |
+ SkAutoExclusive ac(fLock); |
+ return fCacheCountLimit; |
+} |
+ |
size_t SkGlyphCache_Globals::setCacheSizeLimit(size_t newLimit) { |
static const size_t minLimit = 256 * 1024; |
if (newLimit < minLimit) { |
@@ -484,6 +499,11 @@ size_t SkGlyphCache_Globals::setCacheSizeLimit(size_t newLimit) { |
return prevLimit; |
} |
+size_t SkGlyphCache_Globals::getCacheSizeLimit() const { |
+ SkAutoExclusive ac(fLock); |
+ return fCacheSizeLimit; |
+} |
+ |
int SkGlyphCache_Globals::setCacheCountLimit(int newCount) { |
if (newCount < 0) { |
newCount = 0; |