Lines Matching refs:blob
24 const SkGlyphRunList& glyphRunList, sk_sp<GrTextBlob> blob) { in addOrReturnExisting() argument
26 blob = this->internalAdd(std::move(blob)); in addOrReturnExisting()
28 return blob; in addOrReturnExisting()
38 sk_sp<GrTextBlob> blob = idEntry->find(key); in find() local
39 GrTextBlob* blobPtr = blob.get(); in find()
44 return blob; in find()
47 void GrTextBlobCache::remove(GrTextBlob* blob) { in remove() argument
49 this->internalRemove(blob); in remove()
52 void GrTextBlobCache::internalRemove(GrTextBlob* blob) { in internalRemove() argument
53 auto id = blob->key().fUniqueID; in internalRemove()
57 sk_sp<GrTextBlob> stillExists = idEntry->find(blob->key()); in internalRemove()
58 if (blob == stillExists.get()) { in internalRemove()
59 fCurrentSize -= blob->size(); in internalRemove()
60 fBlobList.remove(blob); in internalRemove()
61 idEntry->removeBlob(blob); in internalRemove()
98 for (const auto& blob : idEntry->fBlobs) { in internalPurgeStaleBlobs() local
99 fCurrentSize -= blob->size(); in internalPurgeStaleBlobs()
100 fBlobList.remove(blob.get()); in internalPurgeStaleBlobs()
118 void GrTextBlobCache::internalCheckPurge(GrTextBlob* blob) { in internalCheckPurge() argument
127 while (fCurrentSize > fSizeBudget && (lruBlob = iter.get()) && lruBlob != blob) { in internalCheckPurge()
142 sk_sp<GrTextBlob> GrTextBlobCache::internalAdd(sk_sp<GrTextBlob> blob) { in internalAdd() argument
143 auto id = blob->key().fUniqueID; in internalAdd()
149 if (sk_sp<GrTextBlob> alreadyIn = idEntry->find(blob->key()); alreadyIn) { in internalAdd()
150 blob = std::move(alreadyIn); in internalAdd()
152 fBlobList.addToHead(blob.get()); in internalAdd()
153 fCurrentSize += blob->size(); in internalAdd()
154 idEntry->addBlob(blob); in internalAdd()
157 this->internalCheckPurge(blob.get()); in internalAdd()
158 return blob; in internalAdd()
169 void GrTextBlobCache::BlobIDCacheEntry::addBlob(sk_sp<GrTextBlob> blob) { in addBlob() argument
170 SkASSERT(blob); in addBlob()
171 SkASSERT(blob->key().fUniqueID == fID); in addBlob()
172 SkASSERT(!this->find(blob->key())); in addBlob()
174 fBlobs.emplace_back(std::move(blob)); in addBlob()
177 void GrTextBlobCache::BlobIDCacheEntry::removeBlob(GrTextBlob* blob) { in removeBlob() argument
178 SkASSERT(blob); in removeBlob()
179 SkASSERT(blob->key().fUniqueID == fID); in removeBlob()
181 auto index = this->findBlobIndex(blob->key()); in removeBlob()