aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuResourceCacheAccess.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-02-17 11:47:40 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-17 11:47:41 -0800
commit9f2d1571ed1f0ed579e5d7779c46a90e20f30f22 (patch)
treef2106bb579bcb7cc7498818a4441b4ecff53d875 /src/gpu/GrGpuResourceCacheAccess.h
parent9e779d495130009926fc5394a8971eec20494e5f (diff)
Make GrResourceCache use a priority queue of purgeable resources.
Diffstat (limited to 'src/gpu/GrGpuResourceCacheAccess.h')
-rw-r--r--src/gpu/GrGpuResourceCacheAccess.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h
index 922e3b36b5..52294cef90 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -55,6 +55,11 @@ private:
}
}
+ uint32_t timestamp() const { return fResource->fTimestamp; }
+ void setTimestamp(uint32_t ts) { fResource->fTimestamp = ts; }
+
+ int* accessCacheIndex() const { return &fResource->fCacheArrayIndex; }
+
CacheAccess(GrGpuResource* resource) : fResource(resource) {}
CacheAccess(const CacheAccess& that) : fResource(that.fResource) {}
CacheAccess& operator=(const CacheAccess&); // unimpl