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

Unified Diff: bench/RTreeBench.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/PremulAndUnpremulAlphaOpsBench.cpp ('k') | bench/ReadPixBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/RTreeBench.cpp
diff --git a/bench/RTreeBench.cpp b/bench/RTreeBench.cpp
index 6991b3fb87ae296541251c289648c7c65867e333..b51cc4c6a90b4dc552e9e3fda499bdf4a33c7dee 100644
--- a/bench/RTreeBench.cpp
+++ b/bench/RTreeBench.cpp
@@ -47,9 +47,9 @@ protected:
virtual const char* onGetName() SK_OVERRIDE {
return fName.c_str();
}
- virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
+ virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
SkRandom rand;
- for (int i = 0; i < this->getLoops(); ++i) {
+ for (int i = 0; i < loops; ++i) {
for (int j = 0; j < NUM_BUILD_RECTS; ++j) {
fTree->insert(reinterpret_cast<void*>(j), fProc(rand, j, NUM_BUILD_RECTS),
fBulkLoad);
@@ -111,9 +111,9 @@ protected:
fTree->flushDeferredInserts();
}
- virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
+ virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
SkRandom rand;
- for (int i = 0; i < this->getLoops(); ++i) {
+ for (int i = 0; i < loops; ++i) {
SkTDArray<void*> hits;
SkIRect query;
switch(fQuery) {
« no previous file with comments | « bench/PremulAndUnpremulAlphaOpsBench.cpp ('k') | bench/ReadPixBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698