Home | History | Annotate | Download | only in gpu

Lines Matching refs:entry

74     while (GrResourceEntry* entry = fList.head()) {
78 fCache.remove(entry->fKey, entry);
81 this->internalDetach(entry);
83 delete entry;
107 void GrResourceCache::internalDetach(GrResourceEntry* entry,
109 fList.remove(entry);
114 fClientDetachedBytes += entry->resource()->sizeInBytes();
129 fEntryBytes -= entry->resource()->sizeInBytes();
133 void GrResourceCache::attachToHead(GrResourceEntry* entry,
135 fList.addToHead(entry);
140 fClientDetachedBytes -= entry->resource()->sizeInBytes();
145 fEntryBytes += entry->resource()->sizeInBytes();
158 // This functor just searches for an entry with only a single ref (from
163 bool operator()(const GrResourceEntry* entry) const {
164 return 1 == entry->resource()->getRefCnt();
171 GrResourceEntry* entry = NULL;
176 entry = fCache.find<GrTFindUnreffedFunctor>(key, functor);
178 entry = fCache.find(key);
181 if (NULL == entry) {
186 this->makeExclusive(entry);
189 this->internalDetach(entry);
190 this->attachToHead(entry);
193 return entry->fResource;
211 GrResourceEntry* entry = SkNEW_ARGS(GrResourceEntry, (key, resource));
212 resource->setCacheEntry(entry);
214 this->attachToHead(entry);
215 fCache.insert(key, entry);
219 entry, fEntryCount, resource->sizeInBytes(), fEntryBytes);
223 this->makeExclusive(entry);
228 void GrResourceCache::makeExclusive(GrResourceEntry* entry) {
233 this->internalDetach(entry, kIgnore_BudgetBehavior);
234 fCache.remove(entry->key(), entry);
237 fExclusiveList.addToHead(entry);
241 void GrResourceCache::removeInvalidResource(GrResourceEntry* entry) {
249 size_t size = entry->resource()->sizeInBytes();
254 void GrResourceCache::makeNonExclusive(GrResourceEntry* entry) {
258 fExclusiveList.remove(entry);
261 if (entry->resource()->isValid()) {
265 attachToHead(entry, kIgnore_BudgetBehavior);
266 fCache.insert(entry->key(), entry);
268 this->removeInvalidResource(entry);
299 GrResourceEntry* entry = iter.init(fList, EntryList::Iter::kTail_IterStart);
301 while (NULL != entry) {
310 if (1 == entry->fResource->getRefCnt()) {
314 fCache.remove(entry->key(), entry);
317 this->internalDetach(entry);
321 entry->resource(),
322 entry->resource()->width(),
323 entry->resource()->height());
326 delete entry;
328 entry = prev;
340 // entry out. Instead change the budget and purge.
373 const GrResourceEntry* entry = iter.init(const_cast<EntryList&>(list),
376 for ( ; NULL != entry; entry = iter.prev()) {
377 bytes += entry->resource()->sizeInBytes();
401 const GrResourceEntry* entry = iter.init(const_cast<EntryList&>(fExclusiveList),
404 for ( ; NULL != entry; entry = iter.next()) {
405 entry->validate();
409 entry = iter.init(const_cast<EntryList&>(fList), EntryList::Iter::kHead_IterStart);
412 for ( ; NULL != entry; entry = iter.next()) {
413 entry->validate();
414 GrAssert(fCache.find(entry->key()));
438 GrResourceEntry* entry = iter.init(fList, EntryList::Iter::kTail_IterStart);
440 for ( ; NULL != entry; entry = iter.prev()) {
441 if (entry->fResource->getRefCnt() > 1) {
451 SkDebugf("\t\tDetached Entry Count: current %d high %d\n",