fix for atlas is abandoned text corruption

BUG=skia:

Review URL: https://codereview.chromium.org/1156693004
This commit is contained in:
joshualitt 2015-05-22 13:09:57 -07:00 committed by Commit bot
parent 4e506c200b
commit a5f1d5a95a

View File

@ -75,6 +75,7 @@ GrBatchFontCache::GrBatchFontCache(GrContext* context)
GrBatchFontCache::~GrBatchFontCache() {
SkTDynamicHash<GrBatchTextStrike, GrFontDescKey>::Iter iter(&fCache);
while (!iter.done()) {
(*iter).fIsAbandoned = true;
(*iter).unref();
++iter;
}
@ -86,6 +87,7 @@ GrBatchFontCache::~GrBatchFontCache() {
void GrBatchFontCache::freeAll() {
SkTDynamicHash<GrBatchTextStrike, GrFontDescKey>::Iter iter(&fCache);
while (!iter.done()) {
(*iter).fIsAbandoned = true;
(*iter).unref();
++iter;
}