Index: src/core/SkGlyphCache.h |
diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h |
index dc2aa579a739d10a5e6e317aa77c611d4b0ac01c..c58235f8ef22ee466d07171e8e406b1bd38ac4c2 100644 |
--- a/src/core/SkGlyphCache.h |
+++ b/src/core/SkGlyphCache.h |
@@ -17,6 +17,7 @@ |
#include "SkTDArray.h" |
class SkPaint; |
+class SkTraceMemoryDump; |
class SkGlyphCache_Globals; |
@@ -97,9 +98,12 @@ public: |
return fScalerContext->isSubpixel(); |
} |
+ /** Return the approx RAM usage for this cache. */ |
+ size_t getMemoryUsed() const { return fMemoryUsed; } |
+ |
void dump() const; |
- /* AuxProc/Data allow a client to associate data with this cache entry. Multiple clients can |
+ /** AuxProc/Data allow a client to associate data with this cache entry. Multiple clients can |
use this, as their data is keyed with a function pointer. In addition to serving as a |
key, the function pointer is called with the data when the glyphcache object is deleted, |
so the client can cleanup their data as well. |
@@ -141,6 +145,11 @@ public: |
static void Dump(); |
+ /** Dump memory usage statistics of all the attaches caches in the process using the |
+ SkTraceMemoryDump interface. |
+ */ |
+ static void DumpMemoryStatistics(SkTraceMemoryDump* dump); |
+ |
typedef void (*Visitor)(const SkGlyphCache&, void* context); |
static void VisitAll(Visitor, void* context); |