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

Side by Side Diff: bench/Matrix44Bench.cpp

Issue 1174583002: Pump up matrix44_setconcat benches 1000x so they can be timed on Android. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 6 months 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
« no previous file with comments | « no previous file | no next file » | 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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkMatrix44.h" 9 #include "SkMatrix44.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 for (int x = 0; x < 4; x++) { 264 for (int x = 0; x < 4; x++) {
265 for (int y = 0; y < 4; y++) { 265 for (int y = 0; y < 4; y++) {
266 fM1.setFloat(x,y, rand.nextF()); 266 fM1.setFloat(x,y, rand.nextF());
267 fM2.setFloat(x,y, rand.nextF()); 267 fM2.setFloat(x,y, rand.nextF());
268 }} 268 }}
269 } 269 }
270 } 270 }
271 protected: 271 protected:
272 virtual void performTest() { 272 virtual void performTest() {
273 fM0.reset(); // just to normalize this test with prescale/postscale 273 fM0.reset(); // just to normalize this test with prescale/postscale
274 for (int i = 0; i < 10; ++i) { 274 for (int i = 0; i < 10000; ++i) {
275 fM0.setConcat(fM1, fM2); 275 fM0.setConcat(fM1, fM2);
276 } 276 }
277 } 277 }
278 private: 278 private:
279 SkMatrix44 fM0, fM1, fM2; 279 SkMatrix44 fM0, fM1, fM2;
280 typedef Matrix44Bench INHERITED; 280 typedef Matrix44Bench INHERITED;
281 }; 281 };
282 282
283 class GetTypeMatrix44Bench : public Matrix44Bench { 283 class GetTypeMatrix44Bench : public Matrix44Bench {
284 public: 284 public:
(...skipping 20 matching lines...) Expand all
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(); )
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698