Make sure we mark Plots in use for all regenerate cases
Bug: b/118850208
Change-Id: I6c0b6d8cb8831baefbe1dc9eebe7fef337a467e6
Reviewed-on: https://skia-review.googlesource.com/c/174590
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/text/GrAtlasManager.cpp b/src/gpu/text/GrAtlasManager.cpp
index 486127d..faf9223 100644
--- a/src/gpu/text/GrAtlasManager.cpp
+++ b/src/gpu/text/GrAtlasManager.cpp
@@ -77,8 +77,9 @@
GrGlyph* glyph,
GrDeferredUploadToken token) {
SkASSERT(glyph);
- updater->add(glyph->fID);
- this->getAtlas(glyph->fMaskFormat)->setLastUseToken(glyph->fID, token);
+ if (updater->add(glyph->fID)) {
+ this->getAtlas(glyph->fMaskFormat)->setLastUseToken(glyph->fID, token);
+ }
}
#ifdef SK_DEBUG