Lines Matching defs:blob
24 const SkGlyphRunList& glyphRunList, sk_sp<GrTextBlob> blob) {
26 blob = this->internalAdd(std::move(blob));
28 return blob;
38 sk_sp<GrTextBlob> blob = idEntry->find(key);
39 GrTextBlob* blobPtr = blob.get();
44 return blob;
47 void GrTextBlobCache::remove(GrTextBlob* blob) {
49 this->internalRemove(blob);
52 void GrTextBlobCache::internalRemove(GrTextBlob* blob) {
53 auto id = blob->key().fUniqueID;
57 sk_sp<GrTextBlob> stillExists = idEntry->find(blob->key());
58 if (blob == stillExists.get()) {
59 fCurrentSize -= blob->size();
60 fBlobList.remove(blob);
61 idEntry->removeBlob(blob);
97 // remove all blob entries from the LRU list
98 for (const auto& blob : idEntry->fBlobs) {
99 fCurrentSize -= blob->size();
100 fBlobList.remove(blob.get());
118 void GrTextBlobCache::internalCheckPurge(GrTextBlob* blob) {
119 // First, purge all stale blob IDs.
127 while (fCurrentSize > fSizeBudget && (lruBlob = iter.get()) && lruBlob != blob) {
128 // Backup the iterator before removing and unrefing the blob
142 sk_sp<GrTextBlob> GrTextBlobCache::internalAdd(sk_sp<GrTextBlob> blob) {
143 auto id = blob->key().fUniqueID;
149 if (sk_sp<GrTextBlob> alreadyIn = idEntry->find(blob->key()); alreadyIn) {
150 blob = std::move(alreadyIn);
152 fBlobList.addToHead(blob.get());
153 fCurrentSize += blob->size();
154 idEntry->addBlob(blob);
157 this->internalCheckPurge(blob.get());
158 return blob;
169 void GrTextBlobCache::BlobIDCacheEntry::addBlob(sk_sp<GrTextBlob> blob) {
170 SkASSERT(blob);
171 SkASSERT(blob->key().fUniqueID == fID);
172 SkASSERT(!this->find(blob->key()));
174 fBlobs.emplace_back(std::move(blob));
177 void GrTextBlobCache::BlobIDCacheEntry::removeBlob(GrTextBlob* blob) {
178 SkASSERT(blob);
179 SkASSERT(blob->key().fUniqueID == fID);
181 auto index = this->findBlobIndex(blob->key());