aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/GrResourceCacheBench.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-02-19 07:24:21 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-19 07:24:21 -0800
commit8718aafec239c93485e45bbe8fed19d9a8def079 (patch)
tree209402fb1f20c023f822b4af7dd4212e44956821 /bench/GrResourceCacheBench.cpp
parent2e4414e60b1f98e1736aa1925cbe181ed37d11e8 (diff)
Rename GrContentKey to GrUniqueKey
Diffstat (limited to 'bench/GrResourceCacheBench.cpp')
-rw-r--r--bench/GrResourceCacheBench.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp
index 61ab4d0a73..def736c8b8 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -29,9 +29,9 @@ public:
this->registerWithCache();
}
- static void ComputeKey(int i, GrContentKey* key) {
- static GrContentKey::Domain kDomain = GrContentKey::GenerateDomain();
- GrContentKey::Builder builder(key, kDomain, 1);
+ static void ComputeKey(int i, GrUniqueKey* key) {
+ static GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain();
+ GrUniqueKey::Builder builder(key, kDomain, 1);
builder[0] = i;
}
@@ -43,10 +43,10 @@ private:
static void populate_cache(GrGpu* gpu, int resourceCount) {
for (int i = 0; i < resourceCount; ++i) {
- GrContentKey key;
+ GrUniqueKey key;
BenchResource::ComputeKey(i, &key);
GrGpuResource* resource = SkNEW_ARGS(BenchResource, (gpu));
- resource->resourcePriv().setContentKey(key);
+ resource->resourcePriv().setUniqueKey(key);
resource->unref();
}
}
@@ -126,9 +126,9 @@ protected:
SkASSERT(CACHE_SIZE_COUNT == cache->getResourceCount());
for (int i = 0; i < loops; ++i) {
for (int k = 0; k < CACHE_SIZE_COUNT; ++k) {
- GrContentKey key;
+ GrUniqueKey key;
BenchResource::ComputeKey(k, &key);
- SkAutoTUnref<GrGpuResource> resource(cache->findAndRefContentResource(key));
+ SkAutoTUnref<GrGpuResource> resource(cache->findAndRefUniqueResource(key));
SkASSERT(resource);
}
}