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

Unified Diff: bench/GrResourceCacheBench.cpp

Issue 639873002: Use presence of a content key as non-scratch indicator (Closed) Base URL: https://skia.googlesource.com/skia.git@pp
Patch Set: rebase again Created 6 years, 2 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/GrGpuResource.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 894ec14fcaf962218e0123b265dbeab24fdd34b2..6a7c89acf8925fbe6045da3daf4512fb4ea259d4 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -64,7 +64,14 @@ public:
}
static GrResourceKey ComputeKey(const GrTextureDesc& desc) {
- return GrTexturePriv::ComputeScratchKey(desc);
+ GrCacheID::Key key;
+ memset(&key, 0, sizeof(key));
+ key.fData32[0] = (desc.fWidth) | (desc.fHeight << 16);
+ key.fData32[1] = desc.fConfig | desc.fSampleCnt << 16;
+ key.fData32[2] = desc.fFlags;
+ static int gType = GrResourceKey::GenerateResourceType();
+ static int gDomain = GrCacheID::GenerateDomain();
+ return GrResourceKey(GrCacheID(gDomain, key), gType, 0);
}
int fID;
« no previous file with comments | « no previous file | include/gpu/GrGpuResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698