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

Unified Diff: bench/GrResourceCacheBench.cpp

Issue 99893003: Simplify benchmark internal API. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years 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 | « bench/GrMemoryPoolBench.cpp ('k') | bench/GradientBench.cpp » ('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 ea8297dec5779e71822e24dfde2bf99be22b7adc..d8e63d530a6ce41e349e00f3e5d37d83f256ade5 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -183,10 +183,10 @@ protected:
return "grresourcecache_add";
}
- virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
+ virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
GrGpu* gpu = canvas->getGrContext()->getGpu();
- for (int i = 0; i < this->getLoops(); ++i) {
+ for (int i = 0; i < loops; ++i) {
GrResourceCache cache(CACHE_SIZE_COUNT, CACHE_SIZE_BYTES);
populate_cache(&cache, gpu, DUPLICATE_COUNT);
populate_cache(&cache, gpu, RESOURCE_COUNT);
@@ -219,13 +219,13 @@ protected:
return "grresourcecache_find";
}
- virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
+ virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
GrGpu* gpu = canvas->getGrContext()->getGpu();
GrResourceCache cache(CACHE_SIZE_COUNT, CACHE_SIZE_BYTES);
populate_cache(&cache, gpu, DUPLICATE_COUNT);
populate_cache(&cache, gpu, RESOURCE_COUNT);
- for (int i = 0; i < this->getLoops(); ++i) {
+ for (int i = 0; i < loops; ++i) {
for (int k = 0; k < RESOURCE_COUNT; ++k) {
check_cache_contents_or_die(&cache, k);
}
« no previous file with comments | « bench/GrMemoryPoolBench.cpp ('k') | bench/GradientBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698