From 216b643fc77e754a3fabbb0ed397e7cf55d1954d Mon Sep 17 00:00:00 2001 From: reed Date: Wed, 19 Aug 2015 12:25:40 -0700 Subject: private iterator to visit all resource cache entries BUG=skia: TBR= Review URL: https://codereview.chromium.org/1271033002 --- src/core/SkGlyphCache.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core/SkGlyphCache.h') diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h index 1c985bf671..dc2aa579a7 100644 --- a/src/core/SkGlyphCache.h +++ b/src/core/SkGlyphCache.h @@ -66,7 +66,10 @@ public: /** Returns the number of glyphs for this strike. */ - unsigned getGlyphCount(); + unsigned getGlyphCount() const; + + /** Return the number of glyphs currently cached. */ + int countCachedGlyphs() const; /** Return the image associated with the glyph. If it has not been generated this will trigger that. @@ -138,6 +141,9 @@ public: static void Dump(); + typedef void (*Visitor)(const SkGlyphCache&, void* context); + static void VisitAll(Visitor, void* context); + #ifdef SK_DEBUG void validate() const; #else -- cgit v1.2.3