const all the things
Having the glyph run list be const as it passes through the stack means
that future change can't be introduced in the device code that changes
behavior. Try to force all text changes into the SkGylphRun system.
Change-Id: I9412bc094c7adb8554887c725a6264af306e1d42
Reviewed-on: https://skia-review.googlesource.com/143702
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/src/gpu/text/GrTextBlobCache.h b/src/gpu/text/GrTextBlobCache.h
index 72743f8..110e0ad 100644
--- a/src/gpu/text/GrTextBlobCache.h
+++ b/src/gpu/text/GrTextBlobCache.h
@@ -56,18 +56,18 @@
return cacheBlob;
}
- sk_sp<GrTextBlob> makeBlob(SkGlyphRunList* glyphRunList) {
- return GrTextBlob::Make(glyphRunList->totalGlyphCount(), glyphRunList->size());
+ sk_sp<GrTextBlob> makeBlob(const SkGlyphRunList& glyphRunList) {
+ return GrTextBlob::Make(glyphRunList.totalGlyphCount(), glyphRunList.size());
}
- sk_sp<GrTextBlob> makeCachedBlob(SkGlyphRunList* glyphRunList,
+ sk_sp<GrTextBlob> makeCachedBlob(const SkGlyphRunList& glyphRunList,
const GrTextBlob::Key& key,
const SkMaskFilterBase::BlurRec& blurRec,
const SkPaint& paint) {
sk_sp<GrTextBlob> cacheBlob(makeBlob(glyphRunList));
cacheBlob->setupKey(key, blurRec, paint);
this->add(cacheBlob);
- glyphRunList->temporaryShuntBlobNotifyAddedToCache(fUniqueID);
+ glyphRunList.temporaryShuntBlobNotifyAddedToCache(fUniqueID);
return cacheBlob;
}