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

Side by Side Diff: bench/Matrix44Bench.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bench/MathBench.cpp ('k') | bench/MatrixBench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBenchmark.h" 8 #include "SkBenchmark.h"
9 #include "SkMatrix44.h" 9 #include "SkMatrix44.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
(...skipping 12 matching lines...) Expand all
23 23
24 virtual void performTest() = 0; 24 virtual void performTest() = 0;
25 25
26 protected: 26 protected:
27 virtual int mulLoopCount() const { return 1; } 27 virtual int mulLoopCount() const { return 1; }
28 28
29 virtual const char* onGetName() { 29 virtual const char* onGetName() {
30 return fName.c_str(); 30 return fName.c_str();
31 } 31 }
32 32
33 virtual void onDraw(SkCanvas*) { 33 virtual void onDraw(const int loops, SkCanvas*) {
34 for (int i = 0; i < this->getLoops(); i++) { 34 for (int i = 0; i < loops; i++) {
35 this->performTest(); 35 this->performTest();
36 } 36 }
37 } 37 }
38 38
39 private: 39 private:
40 typedef SkBenchmark INHERITED; 40 typedef SkBenchmark INHERITED;
41 }; 41 };
42 42
43 class EqualsMatrix44Bench : public Matrix44Bench { 43 class EqualsMatrix44Bench : public Matrix44Bench {
44 public: 44 public:
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 DEF_BENCH( return new SetIdentityMatrix44Bench(); ) 295 DEF_BENCH( return new SetIdentityMatrix44Bench(); )
296 DEF_BENCH( return new EqualsMatrix44Bench(); ) 296 DEF_BENCH( return new EqualsMatrix44Bench(); )
297 DEF_BENCH( return new PreScaleMatrix44Bench(); ) 297 DEF_BENCH( return new PreScaleMatrix44Bench(); )
298 DEF_BENCH( return new PostScaleMatrix44Bench(); ) 298 DEF_BENCH( return new PostScaleMatrix44Bench(); )
299 DEF_BENCH( return new InvertMatrix44Bench(); ) 299 DEF_BENCH( return new InvertMatrix44Bench(); )
300 DEF_BENCH( return new InvertAffineMatrix44Bench(); ) 300 DEF_BENCH( return new InvertAffineMatrix44Bench(); )
301 DEF_BENCH( return new InvertScaleTranslateMatrix44Bench(); ) 301 DEF_BENCH( return new InvertScaleTranslateMatrix44Bench(); )
302 DEF_BENCH( return new InvertTranslateMatrix44Bench(); ) 302 DEF_BENCH( return new InvertTranslateMatrix44Bench(); )
303 DEF_BENCH( return new SetConcatMatrix44Bench(); ) 303 DEF_BENCH( return new SetConcatMatrix44Bench(); )
304 DEF_BENCH( return new GetTypeMatrix44Bench(); ) 304 DEF_BENCH( return new GetTypeMatrix44Bench(); )
OLDNEW
« no previous file with comments | « bench/MathBench.cpp ('k') | bench/MatrixBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698