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

Unified Diff: bench/WritePixelsBench.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/VertBench.cpp ('k') | bench/WriterBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/WritePixelsBench.cpp
diff --git a/bench/WritePixelsBench.cpp b/bench/WritePixelsBench.cpp
index 949b5bc4c2a52248ffdebce7205707187dc008cf..0313846a3bc503f9429a4b76c242954551e77763 100644
--- a/bench/WritePixelsBench.cpp
+++ b/bench/WritePixelsBench.cpp
@@ -46,7 +46,7 @@ protected:
return fName.c_str();
}
- virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
+ virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
SkISize size = canvas->getDeviceSize();
canvas->clear(0xFFFF0000);
@@ -55,7 +55,7 @@ protected:
bmp.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height());
canvas->readPixels(&bmp, 0, 0);
- for (int loop = 0; loop < this->getLoops(); ++loop) {
+ for (int loop = 0; loop < loops; ++loop) {
canvas->writePixels(bmp, 0, 0, fConfig);
}
}
« no previous file with comments | « bench/VertBench.cpp ('k') | bench/WriterBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698