Revert "Remove attach and detach glyph cache."
This reverts commit 61d56b92a4076f8afd644d015913641d691e39c8.
Reason for revert: broke gldft text
Original change's description:
> Remove attach and detach glyph cache.
>
> BUG=skia:7515
>
> Change-Id: Ib978e3cf4cfffdefe6453feb520e5e73684abf2e
> Reviewed-on: https://skia-review.googlesource.com/112560
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=bungeman@google.com,herb@google.com
Change-Id: Id5723a3abcd103ed20197bba2dab06e8074be633
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7515
Reviewed-on: https://skia-review.googlesource.com/112745
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index dfe3312..b4404c3 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -55,11 +55,11 @@
return cacheBlob;
}
-SkExclusiveStrikePtr GrAtlasTextBlob::setupCache(int runIndex,
- const SkSurfaceProps& props,
- SkScalerContextFlags scalerContextFlags,
- const SkPaint& skPaint,
- const SkMatrix* viewMatrix) {
+SkGlyphCache* GrAtlasTextBlob::setupCache(int runIndex,
+ const SkSurfaceProps& props,
+ SkScalerContextFlags scalerContextFlags,
+ const SkPaint& skPaint,
+ const SkMatrix* viewMatrix) {
GrAtlasTextBlob::Run* run = &fRuns[runIndex];
// if we have an override descriptor for the run, then we should use that
@@ -71,8 +71,7 @@
run->fTypeface = SkPaintPriv::RefTypefaceOrDefault(skPaint);
run->fPathEffect = sk_ref_sp(effects.fPathEffect);
run->fMaskFilter = sk_ref_sp(effects.fMaskFilter);
- return SkGlyphCache::FindOrCreateStrikeExclusive(
- *desc->getDesc(), effects, *run->fTypeface.get());
+ return SkGlyphCache::DetachCache(run->fTypeface.get(), effects, desc->getDesc());
}
void GrAtlasTextBlob::appendGlyph(int runIndex,