Lines Matching refs:resource
20 GrCrash("Too many Resource Types");
28 GrResourceEntry::GrResourceEntry(const GrResourceKey& key, GrResource* resource)
29 : fKey(key), fResource(resource) {
30 // we assume ownership of the resource, and will unref it when we die
31 GrAssert(resource);
32 resource->ref();
117 fClientDetachedBytes += entry->resource()->sizeInBytes();
132 fEntryBytes -= entry->resource()->sizeInBytes();
143 fClientDetachedBytes -= entry->resource()->sizeInBytes();
148 fEntryBytes += entry->resource()->sizeInBytes();
167 return entry->resource()->unique();
191 // Make this resource MRU
200 GrResource* resource,
202 GrAssert(NULL == resource->getCacheEntry());
205 // each resource destroyed creates and locks 2 resources and
210 GrResourceEntry* entry = SkNEW_ARGS(GrResourceEntry, (key, resource));
211 resource->setCacheEntry(entry);
226 // still count against the resource budget
236 // If the resource went invalid while it was detached then purge it
243 size_t size = entry->resource()->sizeInBytes();
255 if (entry->resource()->isValid()) {
267 * Destroying a resource may potentially trigger the unlock of additional
272 * resource's destructor inserting new resources into the cache. If these
276 * extraCount and extraBytes are added to the current resource totals to account
392 bytes += entry->resource()->sizeInBytes();