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

Side by Side Diff: bench/HairlinePathBench.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/GradientBench.cpp ('k') | bench/ImageBench.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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 protected: 45 protected:
46 const char* onGetName() override { 46 const char* onGetName() override {
47 fName.printf("path_hairline_%s_%s_", 47 fName.printf("path_hairline_%s_%s_",
48 fFlags & kBig_Flag ? "big" : "small", 48 fFlags & kBig_Flag ? "big" : "small",
49 fFlags & kAA_Flag ? "AA" : "noAA"); 49 fFlags & kAA_Flag ? "AA" : "noAA");
50 this->appendName(&fName); 50 this->appendName(&fName);
51 return fName.c_str(); 51 return fName.c_str();
52 } 52 }
53 53
54 void onDraw(const int loops, SkCanvas* canvas) override { 54 void onDraw(int loops, SkCanvas* canvas) override {
55 SkPaint paint(fPaint); 55 SkPaint paint(fPaint);
56 this->setupPaint(&paint); 56 this->setupPaint(&paint);
57 57
58 paint.setAntiAlias(fFlags & kAA_Flag ? true : false); 58 paint.setAntiAlias(fFlags & kAA_Flag ? true : false);
59 59
60 SkPath path; 60 SkPath path;
61 this->makePath(&path); 61 this->makePath(&path);
62 if (fFlags & kBig_Flag) { 62 if (fFlags & kBig_Flag) {
63 const SkMatrix m = SkMatrix::MakeScale(SkIntToScalar(3), SkIntToScal ar(3)); 63 const SkMatrix m = SkMatrix::MakeScale(SkIntToScalar(3), SkIntToScal ar(3));
64 path.transform(m); 64 path.transform(m);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // Don't have default path renderer for conics yet on GPU, so must use AA 231 // Don't have default path renderer for conics yet on GPU, so must use AA
232 // DEF_BENCH( return new ConicPathBench(FLAGS00); ) 232 // DEF_BENCH( return new ConicPathBench(FLAGS00); )
233 // DEF_BENCH( return new ConicPathBench(FLAGS01); ) 233 // DEF_BENCH( return new ConicPathBench(FLAGS01); )
234 DEF_BENCH( return new ConicPathBench(FLAGS10); ) 234 DEF_BENCH( return new ConicPathBench(FLAGS10); )
235 DEF_BENCH( return new ConicPathBench(FLAGS11); ) 235 DEF_BENCH( return new ConicPathBench(FLAGS11); )
236 236
237 DEF_BENCH( return new CubicPathBench(FLAGS00); ) 237 DEF_BENCH( return new CubicPathBench(FLAGS00); )
238 DEF_BENCH( return new CubicPathBench(FLAGS01); ) 238 DEF_BENCH( return new CubicPathBench(FLAGS01); )
239 DEF_BENCH( return new CubicPathBench(FLAGS10); ) 239 DEF_BENCH( return new CubicPathBench(FLAGS10); )
240 DEF_BENCH( return new CubicPathBench(FLAGS11); ) 240 DEF_BENCH( return new CubicPathBench(FLAGS11); )
OLDNEW
« no previous file with comments | « bench/GradientBench.cpp ('k') | bench/ImageBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698