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>
This commit is contained in:
Herb Derby 2020-05-21 14:01:09 -04:00 committed by Skia Commit-Bot
parent 0d0758e42a
commit a50830b6f4
2 changed files with 8 additions and 6 deletions

View File

@ -15,11 +15,11 @@ static inline bool SkShouldPostMessageToBus(
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 @@ GrTextBlobCache::makeCachedBlob(const SkGlyphRunList& glyphRunList, const GrText
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;
}

View File

@ -22,7 +22,7 @@ public:
// 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 @@ private:
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;
};