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

Unified Diff: bench/GrResourceCacheBench.cpp

Issue 940463006: Rename GrContentKey to GrUniqueKey (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments 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 | include/gpu/GrContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GrResourceCacheBench.cpp
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp
index 61ab4d0a73b52f4beeda6ffdd611aa1040fd2a8a..def736c8b87439fcb43446e86c1d2891718c87ad 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);
}
}
« no previous file with comments | « no previous file | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698