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

Side by Side Diff: bench/CoverageBench.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/ControlBench.cpp ('k') | bench/DashBench.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 2013 Google Inc. 2 * Copyright 2013 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 "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 30 matching lines...) Expand all
41 fDraw.fMatrix = &fIdentity; 41 fDraw.fMatrix = &fIdentity;
42 fDraw.fClip = &fRC.bwRgn(); 42 fDraw.fClip = &fRC.bwRgn();
43 fDraw.fRC = &fRC; 43 fDraw.fRC = &fRC;
44 } 44 }
45 45
46 protected: 46 protected:
47 const char* onGetName() override { 47 const char* onGetName() override {
48 return fName.c_str(); 48 return fName.c_str();
49 } 49 }
50 50
51 void onDraw(const int loops, SkCanvas* canvas) override { 51 void onDraw(int loops, SkCanvas* canvas) override {
52 if (fDrawCoverage) { 52 if (fDrawCoverage) {
53 for (int i = 0; i < loops; ++i) { 53 for (int i = 0; i < loops; ++i) {
54 fDraw.drawPathCoverage(fPath, fPaint); 54 fDraw.drawPathCoverage(fPath, fPaint);
55 } 55 }
56 } else { 56 } else {
57 for (int i = 0; i < loops; ++i) { 57 for (int i = 0; i < loops; ++i) {
58 fDraw.drawPath(fPath, fPaint); 58 fDraw.drawPath(fPath, fPaint);
59 } 59 }
60 } 60 }
61 } 61 }
62 62
63 private: 63 private:
64 typedef Benchmark INHERITED; 64 typedef Benchmark INHERITED;
65 }; 65 };
66 66
67 /////////////////////////////////////////////////////////////////////////////// 67 ///////////////////////////////////////////////////////////////////////////////
68 68
69 DEF_BENCH( return new DrawPathBench(false) ) 69 DEF_BENCH( return new DrawPathBench(false) )
70 DEF_BENCH( return new DrawPathBench(true) ) 70 DEF_BENCH( return new DrawPathBench(true) )
OLDNEW
« no previous file with comments | « bench/ControlBench.cpp ('k') | bench/DashBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698