Lines Matching refs:resource

54  *         resource instances with the same properties (e.g. multipass rendering that ping-pongs
55 * between two temporary surfaces). The scratch key is set at resource creation time and
58 * resource may have a given unique key. The unique key can be set, cleared, or changed
59 * anytime after resource creation.
61 * A unique key always takes precedence over a scratch key when a resource has both types of keys.
62 * If a resource has neither key type then it will be deleted as soon as the last reference to it
81 * Get current resource tag for gpu cache recycle.
91 * Pop resource tag.
162 * Find a resource that matches a scratch key.
174 * Find a resource that matches a unique key.
177 GrGpuResource* resource = fUniqueHash.find(key);
178 if (resource && this->isInCache(resource)) {
179 this->refAndMakeResourceMRU(resource);
180 return resource;
182 SK_LOGD("OHOS resource is not in cache, return nullptr!");
234 * resource types.
238 * resource types.
270 void update(GrGpuResource* resource) {
271 if (resource->cacheAccess().isScratch()) {
274 if (resource->resourcePriv().refsWrappedObjects()) {
277 if (GrBudgetedType::kBudgeted != resource->resourcePriv().budgetedType()) {
278 fUnbudgetedSize += resource->gpuMemorySize();
317 // OH ISSUE: change the fbyte when the resource tag changes.
371 void refResource(GrGpuResource* resource);
405 void updatePurgeableWidMap(GrGpuResource* resource,
410 void updatePurgeablePidMap(GrGpuResource* resource,
414 void updatePurgeableFidMap(GrGpuResource* resource,
418 void updateRealAllocWidMap(GrGpuResource* resource,
423 void updateRealAllocPidMap(GrGpuResource* resource,
427 void updateRealAllocFidMap(GrGpuResource* resource,
506 // Whenever a resource is added to the cache or the result of a cache lookup, fTimestamp is
507 // assigned as the resource's timestamp and then incremented. fPurgeableQueue orders the
551 // This resource is allowed to be in the nonpurgeable array for the sake of validate() because
555 //Indicates the cached resource tags.
589 * Insert a resource into the cache.
591 void insertResource(GrGpuResource* resource) { fCache->insertResource(resource); }
594 * Removes a resource from the cache.
596 void removeResource(GrGpuResource* resource) { fCache->removeResource(resource); }
599 * Adds a ref to a resource with proper tracking if the resource has 0 refs prior to
602 void refResource(GrGpuResource* resource) { fCache->refResource(resource); }
605 * Get current resource tag for gpu cache recycle.
614 /** All types of refs on the resource have reached zero. */
623 void notifyARefCntReachedZero(GrGpuResource* resource,
625 fCache->notifyARefCntReachedZero(resource, removedRef);
631 void changeUniqueKey(GrGpuResource* resource, const GrUniqueKey& newKey) {
632 fCache->changeUniqueKey(resource, newKey);
638 void removeUniqueKey(GrGpuResource* resource) { fCache->removeUniqueKey(resource); }
643 void willRemoveScratchKey(const GrGpuResource* resource) {
644 fCache->willRemoveScratchKey(resource);
650 void didChangeBudgetStatus(GrGpuResource* resource) { fCache->didChangeBudgetStatus(resource); }
652 // OH ISSUE: change the fbyte when the resource tag changes.