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

Side by Side Diff: bench/MatrixBench.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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 | « bench/Matrix44Bench.cpp ('k') | bench/MemcpyBench.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkMatrix.h" 9 #include "SkMatrix.h"
10 #include "SkMatrixUtils.h" 10 #include "SkMatrixUtils.h"
11 #include "SkRandom.h" 11 #include "SkRandom.h"
12 #include "SkString.h" 12 #include "SkString.h"
13 13
14 class MatrixBench : public Benchmark { 14 class MatrixBench : public Benchmark {
15 SkString fName; 15 SkString fName;
16 public: 16 public:
17 MatrixBench(const char name[]) { 17 MatrixBench(const char name[]) {
18 fName.printf("matrix_%s", name); 18 fName.printf("matrix_%s", name);
19 } 19 }
20 20
21 virtual bool isSuitableFor(Backend backend) SK_OVERRIDE { 21 bool isSuitableFor(Backend backend) SK_OVERRIDE {
22 return backend == kNonRendering_Backend; 22 return backend == kNonRendering_Backend;
23 } 23 }
24 24
25 virtual void performTest() = 0; 25 virtual void performTest() = 0;
26 26
27 protected: 27 protected:
28 virtual int mulLoopCount() const { return 1; } 28 virtual int mulLoopCount() const { return 1; }
29 29
30 virtual const char* onGetName() { 30 virtual const char* onGetName() {
31 return fName.c_str(); 31 return fName.c_str();
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 DEF_BENCH( return new InvertMapRectMatrixBench( 464 DEF_BENCH( return new InvertMapRectMatrixBench(
465 "invert_maprect_typemask_nonpersp", 465 "invert_maprect_typemask_nonpersp",
466 InvertMapRectMatrixBench::kUncachedTypeMask_Flag | 466 InvertMapRectMatrixBench::kUncachedTypeMask_Flag |
467 InvertMapRectMatrixBench::kScale_Flag | 467 InvertMapRectMatrixBench::kScale_Flag |
468 InvertMapRectMatrixBench::kRotate_Flag | 468 InvertMapRectMatrixBench::kRotate_Flag |
469 InvertMapRectMatrixBench::kTranslate_Flag); ) 469 InvertMapRectMatrixBench::kTranslate_Flag); )
470 470
471 DEF_BENCH( return new ScaleTransMixedMatrixBench(); ) 471 DEF_BENCH( return new ScaleTransMixedMatrixBench(); )
472 DEF_BENCH( return new ScaleTransDoubleMatrixBench(); ) 472 DEF_BENCH( return new ScaleTransDoubleMatrixBench(); )
OLDNEW
« no previous file with comments | « bench/Matrix44Bench.cpp ('k') | bench/MemcpyBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698