real fix for textblob use after gpu free
This patch addresses two issues:
1) Textblobs with abandoned strikes were not properly regenerating.
2) Provided by ericrk - GrTextBlobCache removed blobs from |fCache| during freeAll, but left
potentially released blobs in the |fBlobList|. We now remove these from
|fBlobList| as well.
BUG=skia:
Review URL: https://codereview.chromium.org/1160633002
diff --git a/src/gpu/GrTextBlobCache.cpp b/src/gpu/GrTextBlobCache.cpp
index d66f432..6f17177 100644
--- a/src/gpu/GrTextBlobCache.cpp
+++ b/src/gpu/GrTextBlobCache.cpp
@@ -42,7 +42,9 @@
void GrTextBlobCache::freeAll() {
SkTDynamicHash<BitmapTextBlob, BitmapTextBlob::Key>::Iter iter(&fCache);
while (!iter.done()) {
- (&(*iter))->unref();
+ BitmapTextBlob* blob = &(*iter);
+ fBlobList.remove(blob);
+ blob->unref();
++iter;
}
fCache.rewind();