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

Side by Side Diff: bench/InterpBench.cpp

Issue 1379923005: Remove const from `const int loops`. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: n too Created 5 years, 2 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/ImageFilterDAGBench.cpp ('k') | bench/LightingBench.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 2015 Google Inc. 2 * Copyright 2015 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 "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkMatrix.h" 10 #include "SkMatrix.h"
(...skipping 24 matching lines...) Expand all
35 35
36 virtual void performTest(int16_t dst[], float x, float dx, int count) = 0; 36 virtual void performTest(int16_t dst[], float x, float dx, int count) = 0;
37 37
38 protected: 38 protected:
39 virtual int mulLoopCount() const { return 1; } 39 virtual int mulLoopCount() const { return 1; }
40 40
41 const char* onGetName() override { 41 const char* onGetName() override {
42 return fName.c_str(); 42 return fName.c_str();
43 } 43 }
44 44
45 void onDraw(const int loops, SkCanvas*) override { 45 void onDraw(int loops, SkCanvas*) override {
46 int n = loops * this->mulLoopCount(); 46 int n = loops * this->mulLoopCount();
47 for (int i = 0; i < n; i++) { 47 for (int i = 0; i < n; i++) {
48 this->performTest(fDst, fFx, fDx, kBuffer); 48 this->performTest(fDst, fFx, fDx, kBuffer);
49 } 49 }
50 } 50 }
51 51
52 private: 52 private:
53 typedef Benchmark INHERITED; 53 typedef Benchmark INHERITED;
54 }; 54 };
55 55
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 typedef InterpBench INHERITED; 161 typedef InterpBench INHERITED;
162 }; 162 };
163 163
164 /////////////////////////////////////////////////////////////////////////////// 164 ///////////////////////////////////////////////////////////////////////////////
165 165
166 DEF_BENCH( return new Fixed16D16Interp(); ) 166 DEF_BENCH( return new Fixed16D16Interp(); )
167 DEF_BENCH( return new Fixed32D32Interp(); ) 167 DEF_BENCH( return new Fixed32D32Interp(); )
168 DEF_BENCH( return new Fixed16D48Interp(); ) 168 DEF_BENCH( return new Fixed16D48Interp(); )
169 DEF_BENCH( return new FloatInterp(); ) 169 DEF_BENCH( return new FloatInterp(); )
170 DEF_BENCH( return new DoubleInterp(); ) 170 DEF_BENCH( return new DoubleInterp(); )
OLDNEW
« no previous file with comments | « bench/ImageFilterDAGBench.cpp ('k') | bench/LightingBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698