move blur and path attributes to key
Blur and stroke information were kept out of line with the key.
Make them part of the key, and update operator==.
Change-Id: I2e7669aae4e9c3243c078b039ae796a7e371ef8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315282
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/text/GrTextBlobCache.cpp b/src/gpu/text/GrTextBlobCache.cpp
index a7647be..815a775 100644
--- a/src/gpu/text/GrTextBlobCache.cpp
+++ b/src/gpu/text/GrTextBlobCache.cpp
@@ -20,16 +20,10 @@
, fMessageBusID(messageBusID)
, fPurgeBlobInbox(messageBusID) { }
-sk_sp<GrTextBlob>
-GrTextBlobCache::makeCachedBlob(const SkGlyphRunList& glyphRunList, const GrTextBlob::Key& key,
- const SkMaskFilterBase::BlurRec& blurRec,
- const SkMatrix& viewMatrix) {
- sk_sp<GrTextBlob> cacheBlob(GrTextBlob::Make(glyphRunList, viewMatrix));
- cacheBlob->setupKey(key, blurRec, glyphRunList.paint());
+void GrTextBlobCache::add(const SkGlyphRunList& glyphRunList, sk_sp<GrTextBlob> blob) {
SkAutoSpinlock lock{fSpinLock};
- this->internalAdd(cacheBlob);
+ this->internalAdd(std::move(blob));
glyphRunList.temporaryShuntBlobNotifyAddedToCache(fMessageBusID);
- return cacheBlob;
}
sk_sp<GrTextBlob> GrTextBlobCache::find(const GrTextBlob::Key& key) {