Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: include/gpu/GrGpuResource.h

Issue 921323002: Make GrResourceCache use a priority queue of purgeable resources. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: set resource timestamp at creation and fix order Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkTDPQueue.h » ('j') | src/gpu/GrResourceCache.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrGpuResource.h
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index baffd9ec8343bf04f9c716558003ddbf06b302ec..8a8b0b28c36546c1dfcf7b510bfb754de4dec70b 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -269,7 +269,7 @@ private:
virtual size_t onGpuMemorySize() const = 0;
- // See comments in CacheAccess.
+ // See comments in CacheAccess and ResourcePriv.
bool setContentKey(const GrContentKey& contentKey);
void removeContentKey();
void notifyIsPurgeable() const;
@@ -283,9 +283,13 @@ private:
static uint32_t CreateUniqueID();
- // We're in an internal doubly linked list owned by GrResourceCache
+ // We're in an internal doubly linked list owned by GrResourceCache. TODO: Replace this with an
+ // array of unpurgeable resources in the cache.
SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource);
robertphillips 2015/02/17 17:55:46 Maybe more detail in the comment? fCacheArrayIndex
bsalomon 2015/02/17 19:18:43 Done.
+ // These are used for cache bookkeeping
+ int fCacheArrayIndex;
+ uint32_t fTimestamp;
static const size_t kInvalidGpuMemorySize = ~static_cast<size_t>(0);
GrScratchKey fScratchKey;
« no previous file with comments | « no previous file | src/core/SkTDPQueue.h » ('j') | src/gpu/GrResourceCache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698