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

Unified Diff: bench/XfermodeBench.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/WriterBench.cpp ('k') | bench/benchmain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/XfermodeBench.cpp
diff --git a/bench/XfermodeBench.cpp b/bench/XfermodeBench.cpp
index 41b00e6c709e145f5053cc07bc632ca2317a7abe..1910b75b210a4ca7238bf448df566fdd6802f609 100644
--- a/bench/XfermodeBench.cpp
+++ b/bench/XfermodeBench.cpp
@@ -31,10 +31,10 @@ public:
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 {
SkISize size = canvas->getDeviceSize();
SkRandom random;
- for (int i = 0; i < this->getLoops(); ++i) {
+ for (int i = 0; i < loops; ++i) {
SkPaint paint;
paint.setXfermode(fXfermode.get());
paint.setColor(random.nextU());
@@ -70,8 +70,8 @@ public:
protected:
virtual const char* onGetName() SK_OVERRIDE { return "xfermode_create"; }
- virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
- for (int outer = 0; outer < this->getLoops() * 10; ++outer) {
+ virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
+ for (int outer = 0; outer < loops * 10; ++outer) {
for (int i = 0; i <= SkXfermode::kLastMode; ++i) {
SkXfermode* xfer = SkXfermode::Create(SkXfermode::Mode(i));
SkSafeUnref(xfer);
« no previous file with comments | « bench/WriterBench.cpp ('k') | bench/benchmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698