Lines Matching refs:GrGpuResource

26 #include "src/gpu/GrGpuResource.h"
49 * Manages the lifetime of all GrGpuResource instances.
76 /** Used to access functionality needed by GrGpuResource for lifetime management. */
141 * Abandons the backend API resources owned by all GrGpuResource objects and removes them from
147 * Releases the backend API resources owned by all GrGpuResource objects and removes them from
153 * Release GrGpuResource objects and removes them from the cache by tag.
157 * Get all GrGpuResource tags.
164 GrGpuResource* findAndRefScratchResource(const GrScratchKey& scratchKey);
176 GrGpuResource* findAndRefUniqueResource(const GrUniqueKey& key) {
177 GrGpuResource* resource = fUniqueHash.find(key);
270 void update(GrGpuResource* resource) {
364 void insertResource(GrGpuResource*);
365 void removeResource(GrGpuResource*);
366 void notifyARefCntReachedZero(GrGpuResource*, GrGpuResource::LastRemovedRef);
367 void changeUniqueKey(GrGpuResource*, const GrUniqueKey&);
368 void removeUniqueKey(GrGpuResource*);
369 void willRemoveScratchKey(const GrGpuResource*);
370 void didChangeBudgetStatus(GrGpuResource*);
371 void refResource(GrGpuResource* resource);
374 void refAndMakeResourceMRU(GrGpuResource*);
376 void addToNonpurgeableArray(GrGpuResource*);
377 void removeFromNonpurgeableArray(GrGpuResource*);
385 bool isInCache(const GrGpuResource* r) const;
386 bool isInPurgeableCache(const GrGpuResource* r) const;
387 bool isInNonpurgeableCache(const GrGpuResource* r) const;
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,
453 static const GrScratchKey& GetKey(const GrGpuResource& r) {
458 static void OnFree(GrGpuResource*) { }
460 typedef SkTMultiMap<GrGpuResource, GrScratchKey, ScratchMapTraits> ScratchMap;
463 static const GrUniqueKey& GetKey(const GrGpuResource& r) { return r.getUniqueKey(); }
467 typedef SkTDynamicHash<GrGpuResource, GrUniqueKey, UniqueHashTraits> UniqueHash;
488 static bool CompareTimestamp(GrGpuResource* const& a, GrGpuResource* const& b) {
492 static int* AccessResourceIndex(GrGpuResource* const& res) {
500 typedef SkTDPQueue<GrGpuResource*, CompareTimestamp, AccessResourceIndex> PurgeableQueue;
501 typedef SkTDArray<GrGpuResource*> ResourceArray;
553 SkDEBUGCODE(GrGpuResource* fNewlyPurgeableResourceForValidation = nullptr;)
591 void insertResource(GrGpuResource* resource) { fCache->insertResource(resource); }
596 void removeResource(GrGpuResource* resource) { fCache->removeResource(resource); }
602 void refResource(GrGpuResource* resource) { fCache->refResource(resource); }
623 void notifyARefCntReachedZero(GrGpuResource* resource,
624 GrGpuResource::LastRemovedRef removedRef) {
631 void changeUniqueKey(GrGpuResource* resource, const GrUniqueKey& newKey) {
636 * Called by a GrGpuResource to remove its unique key.
638 void removeUniqueKey(GrGpuResource* resource) { fCache->removeUniqueKey(resource); }
641 * Called by a GrGpuResource when it removes its scratch key.
643 void willRemoveScratchKey(const GrGpuResource* resource) {
650 void didChangeBudgetStatus(GrGpuResource* resource) { fCache->didChangeBudgetStatus(resource); }
664 friend class GrGpuResource; // To access all the proxy inline methods.