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

Side by Side Diff: bench/BezierBench.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/Benchmark.cpp ('k') | bench/BigPathBench.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 2014 Google Inc. 2 * Copyright 2014 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 fRec.fCubic.moveTo(20, 20); 72 fRec.fCubic.moveTo(20, 20);
73 fRec.fCubic.cubicTo(40, 20, 60, 40, 60, 60); 73 fRec.fCubic.cubicTo(40, 20, 60, 40, 60, 60);
74 fRec.fCubic.cubicTo(40, 60, 20, 80, 20, 100); 74 fRec.fCubic.cubicTo(40, 60, 20, 80, 20, 100);
75 } 75 }
76 76
77 protected: 77 protected:
78 virtual const char* onGetName() { 78 virtual const char* onGetName() {
79 return fName.c_str(); 79 return fName.c_str();
80 } 80 }
81 81
82 virtual void onDraw(const int loops, SkCanvas* canvas) { 82 virtual void onDraw(int loops, SkCanvas* canvas) {
83 fRec.fCanvas = canvas; 83 fRec.fCanvas = canvas;
84 this->setupPaint(&fRec.fPaint); 84 this->setupPaint(&fRec.fPaint);
85 fRec.fPaint.setStyle(SkPaint::kStroke_Style); 85 fRec.fPaint.setStyle(SkPaint::kStroke_Style);
86 fRec.fPaint.setStrokeCap(fCap); 86 fRec.fPaint.setStrokeCap(fCap);
87 fRec.fPaint.setStrokeJoin(fJoin); 87 fRec.fPaint.setStrokeJoin(fJoin);
88 fRec.fPaint.setStrokeWidth(fWidth); 88 fRec.fPaint.setStrokeWidth(fWidth);
89 fProc(&fRec, loops); 89 fProc(&fRec, loops);
90 } 90 }
91 91
92 private: 92 private:
93 typedef Benchmark INHERITED; 93 typedef Benchmark INHERITED;
94 }; 94 };
95 95
96 DEF_BENCH( return new BezierBench(SkPaint::kButt_Cap, SkPaint::kRound_Join, 2, d raw_quad); ) 96 DEF_BENCH( return new BezierBench(SkPaint::kButt_Cap, SkPaint::kRound_Join, 2, d raw_quad); )
97 DEF_BENCH( return new BezierBench(SkPaint::kSquare_Cap, SkPaint::kBevel_Join, 10 , draw_quad); ) 97 DEF_BENCH( return new BezierBench(SkPaint::kSquare_Cap, SkPaint::kBevel_Join, 10 , draw_quad); )
98 DEF_BENCH( return new BezierBench(SkPaint::kRound_Cap, SkPaint::kMiter_Join, 50, draw_quad); ) 98 DEF_BENCH( return new BezierBench(SkPaint::kRound_Cap, SkPaint::kMiter_Join, 50, draw_quad); )
99 99
100 DEF_BENCH( return new BezierBench(SkPaint::kButt_Cap, SkPaint::kRound_Join, 2, d raw_cubic); ) 100 DEF_BENCH( return new BezierBench(SkPaint::kButt_Cap, SkPaint::kRound_Join, 2, d raw_cubic); )
101 DEF_BENCH( return new BezierBench(SkPaint::kSquare_Cap, SkPaint::kBevel_Join, 10 , draw_cubic); ) 101 DEF_BENCH( return new BezierBench(SkPaint::kSquare_Cap, SkPaint::kBevel_Join, 10 , draw_cubic); )
102 DEF_BENCH( return new BezierBench(SkPaint::kRound_Cap, SkPaint::kMiter_Join, 50, draw_cubic); ) 102 DEF_BENCH( return new BezierBench(SkPaint::kRound_Cap, SkPaint::kMiter_Join, 50, draw_cubic); )
OLDNEW
« no previous file with comments | « bench/Benchmark.cpp ('k') | bench/BigPathBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698