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; |