Lines Matching refs:Entry
18 struct GrGradientBitmapCache::Entry {
19 Entry* fPrev;
20 Entry* fNext;
26 Entry(const void* buffer, size_t size, const SkBitmap& bm)
35 ~Entry() { sk_free(fBuffer); }
54 Entry* entry = fHead;
55 while (entry) {
56 Entry* next = entry->fNext;
57 delete entry;
58 entry = next;
62 GrGradientBitmapCache::Entry* GrGradientBitmapCache::release(Entry* entry) const {
63 if (entry->fPrev) {
64 SkASSERT(fHead != entry);
65 entry->fPrev->fNext = entry->fNext;
67 SkASSERT(fHead == entry);
68 fHead = entry->fNext;
70 if (entry->fNext) {
71 SkASSERT(fTail != entry);
72 entry->fNext->fPrev = entry->fPrev;
74 SkASSERT(fTail == entry);
75 fTail = entry->fPrev;
77 return entry;
80 void GrGradientBitmapCache::attachToHead(Entry* entry) const {
81 entry->fPrev = nullptr;
82 entry->fNext = fHead;
84 fHead->fPrev = entry;
86 fTail = entry;
88 fHead = entry;
94 Entry* entry = fHead;
95 while (entry) {
96 if (entry->equals(buffer, size)) {
98 *bm = entry->fBitmap;
101 this->release(entry);
102 this->attachToHead(entry);
105 entry = entry->fNext;
119 Entry* entry = new Entry(buffer, len, bm);
120 this->attachToHead(entry);
229 Entry* entry = fHead;
231 while (entry) {
233 entry = entry->fNext;
237 entry = fTail;
238 while (entry) {
240 entry = entry->fPrev;