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

Side by Side Diff: bench/BlurBench.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/BitmapScaleBench.cpp ('k') | bench/BlurImageFilterBench.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } else { 46 } else {
47 fName.printf("blur_%d_%s_%s", SkScalarRoundToInt(rad), name, quality ); 47 fName.printf("blur_%d_%s_%s", SkScalarRoundToInt(rad), name, quality );
48 } 48 }
49 } 49 }
50 50
51 protected: 51 protected:
52 virtual const char* onGetName() { 52 virtual const char* onGetName() {
53 return fName.c_str(); 53 return fName.c_str();
54 } 54 }
55 55
56 virtual void onDraw(const int loops, SkCanvas* canvas) { 56 virtual void onDraw(int loops, SkCanvas* canvas) {
57 SkPaint paint; 57 SkPaint paint;
58 this->setupPaint(&paint); 58 this->setupPaint(&paint);
59 59
60 paint.setAntiAlias(true); 60 paint.setAntiAlias(true);
61 61
62 SkRandom rand; 62 SkRandom rand;
63 for (int i = 0; i < loops; i++) { 63 for (int i = 0; i < loops; i++) {
64 SkRect r = SkRect::MakeWH(rand.nextUScalar1() * 400, 64 SkRect r = SkRect::MakeWH(rand.nextUScalar1() * 400,
65 rand.nextUScalar1() * 400); 65 rand.nextUScalar1() * 400);
66 r.offset(fRadius, fRadius); 66 r.offset(fRadius, fRadius);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 DEF_BENCH(return new BlurBench(SMALL, kNormal_SkBlurStyle, SkBlurMaskFilter::kHi ghQuality_BlurFlag);) 109 DEF_BENCH(return new BlurBench(SMALL, kNormal_SkBlurStyle, SkBlurMaskFilter::kHi ghQuality_BlurFlag);)
110 110
111 DEF_BENCH(return new BlurBench(BIG, kNormal_SkBlurStyle, SkBlurMaskFilter::kHigh Quality_BlurFlag);) 111 DEF_BENCH(return new BlurBench(BIG, kNormal_SkBlurStyle, SkBlurMaskFilter::kHigh Quality_BlurFlag);)
112 112
113 DEF_BENCH(return new BlurBench(REALBIG, kNormal_SkBlurStyle, SkBlurMaskFilter::k HighQuality_BlurFlag);) 113 DEF_BENCH(return new BlurBench(REALBIG, kNormal_SkBlurStyle, SkBlurMaskFilter::k HighQuality_BlurFlag);)
114 114
115 DEF_BENCH(return new BlurBench(REAL, kNormal_SkBlurStyle, SkBlurMaskFilter::kHig hQuality_BlurFlag);) 115 DEF_BENCH(return new BlurBench(REAL, kNormal_SkBlurStyle, SkBlurMaskFilter::kHig hQuality_BlurFlag);)
116 116
117 DEF_BENCH(return new BlurBench(0, kNormal_SkBlurStyle);) 117 DEF_BENCH(return new BlurBench(0, kNormal_SkBlurStyle);)
OLDNEW
« no previous file with comments | « bench/BitmapScaleBench.cpp ('k') | bench/BlurImageFilterBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698