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

Unified Diff: bench/GrResourceCacheBench.cpp

Issue 921453002: Rename GrResourceCache2 to GrResourceCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | gyp/gpu.gypi » ('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 7469217c3f469263c0cb7bcc512f91204801c519..39007c30b2a6a63da090f9c6e91cca5bef92738c 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -13,7 +13,7 @@
#include "GrGpuResource.h"
#include "GrContext.h"
#include "GrGpu.h"
-#include "GrResourceCache2.h"
+#include "GrResourceCache.h"
#include "SkCanvas.h"
enum {
@@ -69,17 +69,17 @@ protected:
// Set the cache budget to be very large so no purging occurs.
context->setResourceCacheLimits(CACHE_SIZE_COUNT, 1 << 30);
- GrResourceCache2* cache2 = context->getResourceCache2();
+ GrResourceCache* cache = context->getResourceCache();
// Make sure the cache is empty.
- cache2->purgeAllUnlocked();
- SkASSERT(0 == cache2->getResourceCount() && 0 == cache2->getResourceBytes());
+ cache->purgeAllUnlocked();
+ SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes());
GrGpu* gpu = context->getGpu();
for (int i = 0; i < loops; ++i) {
populate_cache(gpu, CACHE_SIZE_COUNT);
- SkASSERT(CACHE_SIZE_COUNT == cache2->getResourceCount());
+ SkASSERT(CACHE_SIZE_COUNT == cache->getResourceCount());
}
}
@@ -106,11 +106,11 @@ protected:
// Set the cache budget to be very large so no purging occurs.
fContext->setResourceCacheLimits(CACHE_SIZE_COUNT, 1 << 30);
- GrResourceCache2* cache2 = fContext->getResourceCache2();
+ GrResourceCache* cache = fContext->getResourceCache();
// Make sure the cache is empty.
- cache2->purgeAllUnlocked();
- SkASSERT(0 == cache2->getResourceCount() && 0 == cache2->getResourceBytes());
+ cache->purgeAllUnlocked();
+ SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes());
GrGpu* gpu = fContext->getGpu();
@@ -121,13 +121,13 @@ protected:
if (!fContext) {
return;
}
- GrResourceCache2* cache2 = fContext->getResourceCache2();
- SkASSERT(CACHE_SIZE_COUNT == cache2->getResourceCount());
+ GrResourceCache* cache = fContext->getResourceCache();
+ SkASSERT(CACHE_SIZE_COUNT == cache->getResourceCount());
for (int i = 0; i < loops; ++i) {
for (int k = 0; k < CACHE_SIZE_COUNT; ++k) {
GrContentKey key;
BenchResource::ComputeKey(k, &key);
- SkAutoTUnref<GrGpuResource> resource(cache2->findAndRefContentResource(key));
+ SkAutoTUnref<GrGpuResource> resource(cache->findAndRefContentResource(key));
SkASSERT(resource);
}
}
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698