OLD | NEW |
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 "Benchmark.h" | 8 #include "Benchmark.h" |
9 #include "SkMatrix44.h" | 9 #include "SkMatrix44.h" |
10 #include "SkRandom.h" | 10 #include "SkRandom.h" |
(...skipping 12 matching lines...) Expand all Loading... |
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 const char* onGetName() override { | 29 const char* onGetName() override { |
30 return fName.c_str(); | 30 return fName.c_str(); |
31 } | 31 } |
32 | 32 |
33 void onDraw(const int loops, SkCanvas*) override { | 33 void onDraw(int loops, SkCanvas*) override { |
34 for (int i = 0; i < loops; 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 Benchmark INHERITED; | 40 typedef Benchmark INHERITED; |
41 }; | 41 }; |
42 | 42 |
43 class EqualsMatrix44Bench : public Matrix44Bench { | 43 class EqualsMatrix44Bench : public Matrix44Bench { |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 DEF_BENCH( return new EqualsMatrix44Bench(); ) | 305 DEF_BENCH( return new EqualsMatrix44Bench(); ) |
306 DEF_BENCH( return new PreScaleMatrix44Bench(); ) | 306 DEF_BENCH( return new PreScaleMatrix44Bench(); ) |
307 DEF_BENCH( return new PostScaleMatrix44Bench(); ) | 307 DEF_BENCH( return new PostScaleMatrix44Bench(); ) |
308 DEF_BENCH( return new InvertMatrix44Bench(); ) | 308 DEF_BENCH( return new InvertMatrix44Bench(); ) |
309 DEF_BENCH( return new InvertAffineMatrix44Bench(); ) | 309 DEF_BENCH( return new InvertAffineMatrix44Bench(); ) |
310 DEF_BENCH( return new InvertScaleTranslateMatrix44Bench(); ) | 310 DEF_BENCH( return new InvertScaleTranslateMatrix44Bench(); ) |
311 DEF_BENCH( return new InvertTranslateMatrix44Bench(); ) | 311 DEF_BENCH( return new InvertTranslateMatrix44Bench(); ) |
312 DEF_BENCH( return new SetConcatMatrix44Bench(true); ) | 312 DEF_BENCH( return new SetConcatMatrix44Bench(true); ) |
313 DEF_BENCH( return new SetConcatMatrix44Bench(false); ) | 313 DEF_BENCH( return new SetConcatMatrix44Bench(false); ) |
314 DEF_BENCH( return new GetTypeMatrix44Bench(); ) | 314 DEF_BENCH( return new GetTypeMatrix44Bench(); ) |
OLD | NEW |