void GrResourceCache::makeNonExclusive(GrResourceEntry* entry) { GrAutoResourceCacheValidate atcv(this); #if GR_DEBUG fExclusiveList.remove(entry); #endif if (entry->resource()->isValid()) { attachToHead(entry, true); fCache.insert(entry->key(), entry); } else { this->removeInvalidResource(entry); } }
void GrResourceCache::makeNonExclusive(GrResourceEntry* entry) { GrAutoResourceCacheValidate atcv(this); #if GR_DEBUG fExclusiveList.remove(entry); #endif if (entry->resource()->isValid()) { // Since scratch textures still count against the cache budget even // when they have been removed from the cache, re-adding them doesn't // alter the budget information. attachToHead(entry, kIgnore_BudgetBehavior); fCache.insert(entry->key(), entry); } else { this->removeInvalidResource(entry); } }