diff options
author | 2015-01-27 15:10:17 -0800 | |
---|---|---|
committer | 2015-01-27 15:10:17 -0800 | |
commit | 95faa61d63a6f62916f6f7be58c4624da8357e3b (patch) | |
tree | ff55faa6c29f4e5c80caaeda20daba623b30ab47 /src/core/SkGlyphCache.h | |
parent | 62bd1a69ea49318aa5022151262c842887e0ecf4 (diff) |
patch from issue 885453002 at patchset 20001 (http://crrev.com/885453002#ps20001)
Make the char cache dynamic in SkGlyphCache
because it is rarely used.
Landing on behalf of Herb.
BUG=skia:
Review URL: https://codereview.chromium.org/881953002
Diffstat (limited to 'src/core/SkGlyphCache.h')
-rw-r--r-- | src/core/SkGlyphCache.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h index bb34a7d977..a0d4afbc46 100644 --- a/src/core/SkGlyphCache.h +++ b/src/core/SkGlyphCache.h @@ -202,7 +202,10 @@ private: SkGlyph* fGlyph; }; // no reason to use the same kHashCount as fGlyphHash, but we do for now - CharGlyphRec fCharToGlyphHash[kHashCount]; + // Dynamically allocated when chars are encountered. + SkAutoTDelete<CharGlyphRec> fCharToGlyphHash; + + CharGlyphRec* getCharGlyphRec(uint32_t id); static inline unsigned ID2HashIndex(uint32_t id) { id ^= id >> 16; |