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

Unified Diff: bench/ReadPixBench.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/RTreeBench.cpp ('k') | bench/RectBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ReadPixBench.cpp
diff --git a/bench/ReadPixBench.cpp b/bench/ReadPixBench.cpp
index f62917b6ea1640dca591591b2bd5c12f0533d9e5..f761e3306c760933c3e97d12784ccd9e246b8715 100644
--- a/bench/ReadPixBench.cpp
+++ b/bench/ReadPixBench.cpp
@@ -24,7 +24,7 @@ protected:
return "readpix";
}
- virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
+ virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
canvas->clear(SK_ColorBLACK);
SkISize size = canvas->getDeviceSize();
@@ -45,7 +45,7 @@ protected:
bitmap.setConfig(SkBitmap::kARGB_8888_Config, kWindowSize, kWindowSize);
- for (int i = 0; i < this->getLoops(); i++) {
+ for (int i = 0; i < loops; i++) {
for (int x = 0; x < kNumStepsX; ++x) {
for (int y = 0; y < kNumStepsY; ++y) {
canvas->readPixels(&bitmap, x * offX, y * offY);
« no previous file with comments | « bench/RTreeBench.cpp ('k') | bench/RectBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698