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

Side by Side Diff: bench/BlurRectsBench.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/BlurRectBench.cpp ('k') | bench/BlurRoundRectBench.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 "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 const char* onGetName() override { 24 const char* onGetName() override {
25 return fName.c_str(); 25 return fName.c_str();
26 } 26 }
27 27
28 void setName(const SkString& name) { 28 void setName(const SkString& name) {
29 fName = name; 29 fName = name;
30 } 30 }
31 31
32 void onDraw(const int loops, SkCanvas* canvas) override { 32 void onDraw(int loops, SkCanvas* canvas) override {
33 SkPaint paint; 33 SkPaint paint;
34 paint.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, fRadiu s))->unref(); 34 paint.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, fRadiu s))->unref();
35 35
36 SkPath path; 36 SkPath path;
37 path.addRect(fOuter, SkPath::kCW_Direction); 37 path.addRect(fOuter, SkPath::kCW_Direction);
38 path.addRect(fInner, SkPath::kCW_Direction); 38 path.addRect(fInner, SkPath::kCW_Direction);
39 39
40 for (int i = 0; i < loops; i++) { 40 for (int i = 0; i < loops; i++) {
41 canvas->drawPath(path, paint); 41 canvas->drawPath(path, paint);
42 } 42 }
(...skipping 28 matching lines...) Expand all
71 private: 71 private:
72 typedef BlurRectsBench INHERITED; 72 typedef BlurRectsBench INHERITED;
73 }; 73 };
74 74
75 DEF_BENCH(return new BlurRectsNinePatchBench(SkRect::MakeXYWH(10, 10, 100, 100), 75 DEF_BENCH(return new BlurRectsNinePatchBench(SkRect::MakeXYWH(10, 10, 100, 100),
76 SkRect::MakeXYWH(20, 20, 60, 60), 76 SkRect::MakeXYWH(20, 20, 60, 60),
77 2.3f);) 77 2.3f);)
78 DEF_BENCH(return new BlurRectsNonNinePatchBench(SkRect::MakeXYWH(10, 10, 100, 10 0), 78 DEF_BENCH(return new BlurRectsNonNinePatchBench(SkRect::MakeXYWH(10, 10, 100, 10 0),
79 SkRect::MakeXYWH(50, 50, 10, 10) , 79 SkRect::MakeXYWH(50, 50, 10, 10) ,
80 4.3f);) 80 4.3f);)
OLDNEW
« no previous file with comments | « bench/BlurRectBench.cpp ('k') | bench/BlurRoundRectBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698