From 8c4cbf4cfb6d9236dfd69273bff7e8384744c29a Mon Sep 17 00:00:00 2001 From: Herb Derby Date: Fri, 9 Mar 2018 15:28:04 -0500 Subject: Remove last use of DetachCache. Change-Id: I2ef8a134cedf2d0d98e102b921031e0d5ef7fb63 Reviewed-on: https://skia-review.googlesource.com/113274 Reviewed-by: Ben Wagner Commit-Queue: Herb Derby --- src/gpu/text/GrAtlasTextBlob.h | 2 +- src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gpu') diff --git a/src/gpu/text/GrAtlasTextBlob.h b/src/gpu/text/GrAtlasTextBlob.h index e3fc53b827..0cc3062bbe 100644 --- a/src/gpu/text/GrAtlasTextBlob.h +++ b/src/gpu/text/GrAtlasTextBlob.h @@ -605,7 +605,7 @@ private: GrDeferredUploadTarget* fUploadTarget; GrGlyphCache* fGlyphCache; GrAtlasManager* fFullAtlasManager; - SkAutoGlyphCache* fLazyCache; + SkExclusiveStrikePtr* fLazyCache; Run* fRun; Run::SubRunInfo* fSubRun; GrColor fColor; diff --git a/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp b/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp index 19b0959f58..b74d087eb8 100644 --- a/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp +++ b/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp @@ -244,7 +244,8 @@ bool Regenerator::doRegen(Regenerator::Result* result) { SkScalerContextEffects effects; effects.fPathEffect = fRun->fPathEffect.get(); effects.fMaskFilter = fRun->fMaskFilter.get(); - fLazyCache->reset(SkGlyphCache::DetachCache(fRun->fTypeface.get(), effects, desc)); + *fLazyCache = + SkGlyphCache::FindOrCreateStrikeExclusive(*desc, effects, *fRun->fTypeface); } if (regenGlyphs) { -- cgit v1.2.3