Pointer to GrStrikeCache on GrTextBlob
This will allow all the glyph drawing closures to live on the
GrTextBlob.
Other cleanup
* Rename glyphCache things to grStrikeCache.
Change-Id: I03e0353a1434230086a08184221272f1e5751ae6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197244
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/gpu/text/GrTextBlobCache.h b/src/gpu/text/GrTextBlobCache.h
index 4e9b5ce..03d48ad 100644
--- a/src/gpu/text/GrTextBlobCache.h
+++ b/src/gpu/text/GrTextBlobCache.h
@@ -33,16 +33,20 @@
}
~GrTextBlobCache();
- sk_sp<GrTextBlob> makeBlob(const SkGlyphRunList& glyphRunList, GrColor color) {
- return GrTextBlob::Make(glyphRunList.totalGlyphCount(), glyphRunList.size(), color);
+ sk_sp<GrTextBlob> makeBlob(const SkGlyphRunList& glyphRunList,
+ GrColor color,
+ GrStrikeCache* strikeCache) {
+ return GrTextBlob::Make(
+ glyphRunList.totalGlyphCount(), glyphRunList.size(), color, strikeCache);
}
sk_sp<GrTextBlob> makeCachedBlob(const SkGlyphRunList& glyphRunList,
const GrTextBlob::Key& key,
const SkMaskFilterBase::BlurRec& blurRec,
const SkPaint& paint,
- GrColor color) {
- sk_sp<GrTextBlob> cacheBlob(makeBlob(glyphRunList, color));
+ GrColor color,
+ GrStrikeCache* strikeCache) {
+ sk_sp<GrTextBlob> cacheBlob(makeBlob(glyphRunList, color, strikeCache));
cacheBlob->setupKey(key, blurRec, paint);
this->add(cacheBlob);
glyphRunList.temporaryShuntBlobNotifyAddedToCache(fUniqueID);