Lines Matching refs:resource
31 SkFAIL("Too many Resource Types");
41 GrCacheable* resource)
44 fResource(resource),
45 fCachedSize(resource->gpuMemorySize()),
47 // we assume ownership of the resource, and will unref it when we die
48 SkASSERT(resource);
49 resource->ref();
196 return entry->resource()->unique();
220 // Make this resource MRU
229 GrCacheable* resource,
231 SkASSERT(NULL == resource->getCacheEntry());
234 // each resource destroyed creates and locks 2 resources and
239 GrResourceCacheEntry* entry = SkNEW_ARGS(GrResourceCacheEntry, (this, key, resource));
240 resource->setCacheEntry(entry);
258 // still count against the resource budget
268 // If the resource went invalid while it was detached then purge it
288 if (entry->resource()->isValidOnGpu()) {
321 * Destroying a resource may potentially trigger the unlock of additional
326 * resource's destructor inserting new resources into the cache. If these
330 * extraCount and extraBytes are added to the current resource totals to account
466 bytes += entry->resource()->gpuMemorySize();