| Index: src/gpu/GrTextBlobCache.cpp
|
| diff --git a/src/gpu/GrTextBlobCache.cpp b/src/gpu/GrTextBlobCache.cpp
|
| index fe0ccf609899a15ebeb0238995ca63c1bf245042..d32e24bc1a3ddda0ce3828b003b6a6eef28ac353 100644
|
| --- a/src/gpu/GrTextBlobCache.cpp
|
| +++ b/src/gpu/GrTextBlobCache.cpp
|
| @@ -10,11 +10,7 @@
|
| static const int kVerticesPerGlyph = 4;
|
|
|
| GrTextBlobCache::~GrTextBlobCache() {
|
| - SkTDynamicHash<BitmapTextBlob, BitmapTextBlob::Key>::Iter iter(&fCache);
|
| - while (!iter.done()) {
|
| - (&(*iter))->unref();
|
| - ++iter;
|
| - }
|
| + this->freeAll();
|
| }
|
|
|
| GrAtlasTextContext::BitmapTextBlob* GrTextBlobCache::createBlob(int glyphCount, int runCount,
|
| @@ -48,3 +44,12 @@ GrAtlasTextContext::BitmapTextBlob* GrTextBlobCache::createBlob(int glyphCount,
|
| #endif
|
| return cacheBlob;
|
| }
|
| +
|
| +void GrTextBlobCache::freeAll() {
|
| + SkTDynamicHash<BitmapTextBlob, BitmapTextBlob::Key>::Iter iter(&fCache);
|
| + while (!iter.done()) {
|
| + (&(*iter))->unref();
|
| + ++iter;
|
| + }
|
| + fCache.rewind();
|
| +}
|
|
|