Rename fUniqueID -> fMessageBoxID
Change-Id: I8f3630236b799ebdf203a83972fe245b2f073472
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292680
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 619bb4f..b6be2f9 100644
--- a/src/gpu/text/GrTextBlobCache.cpp
+++ b/src/gpu/text/GrTextBlobCache.cpp
@@ -15,11 +15,11 @@
return msg.fContextID == msgBusUniqueID;
}
-GrTextBlobCache::GrTextBlobCache(PurgeMore purgeMore, uint32_t uniqueID)
+GrTextBlobCache::GrTextBlobCache(PurgeMore purgeMore, uint32_t messageBusID)
: fPurgeMore(purgeMore)
, fSizeBudget(kDefaultBudget)
- , fUniqueID(uniqueID)
- , fPurgeBlobInbox(uniqueID) { }
+ , fMessageBusID(messageBusID)
+ , fPurgeBlobInbox(messageBusID) { }
GrTextBlobCache::~GrTextBlobCache() {
this->freeAll();
@@ -32,7 +32,7 @@
sk_sp<GrTextBlob> cacheBlob(GrTextBlob::Make(glyphRunList, viewMatrix, color, forceW));
cacheBlob->setupKey(key, blurRec, glyphRunList.paint());
this->add(cacheBlob);
- glyphRunList.temporaryShuntBlobNotifyAddedToCache(fUniqueID);
+ glyphRunList.temporaryShuntBlobNotifyAddedToCache(fMessageBusID);
return cacheBlob;
}
diff --git a/src/gpu/text/GrTextBlobCache.h b/src/gpu/text/GrTextBlobCache.h
index 5a2a241..c98ba3d 100644
--- a/src/gpu/text/GrTextBlobCache.h
+++ b/src/gpu/text/GrTextBlobCache.h
@@ -22,7 +22,7 @@
// The callback function used by the cache when it is still over budget after a purge.
using PurgeMore = std::function<void()>;
- GrTextBlobCache(PurgeMore purgeMore, uint32_t uniqueID);
+ GrTextBlobCache(PurgeMore purgeMore, uint32_t messageBusID);
~GrTextBlobCache();
sk_sp<GrTextBlob> makeCachedBlob(const SkGlyphRunList& glyphRunList,
@@ -90,7 +90,9 @@
PurgeMore fPurgeMore;
size_t fSizeBudget;
size_t fCurrentSize{0};
- uint32_t fUniqueID; // unique id to use for messaging
+
+ // In practice 'messageBusID' is always the unique ID of the owning GrContext
+ uint32_t fMessageBusID;
SkMessageBus<PurgeBlobMessage>::Inbox fPurgeBlobInbox;
};