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

Side by Side Diff: bench/BlurRoundRectBench.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/BlurRectsBench.cpp ('k') | bench/ChartBench.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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 21 matching lines...) Expand all
32 32
33 const char* onGetName() override { 33 const char* onGetName() override {
34 return fName.c_str(); 34 return fName.c_str();
35 } 35 }
36 36
37 SkIPoint onGetSize() override { 37 SkIPoint onGetSize() override {
38 return SkIPoint::Make(SkScalarCeilToInt(fRRect.rect().width()), 38 return SkIPoint::Make(SkScalarCeilToInt(fRRect.rect().width()),
39 SkScalarCeilToInt(fRRect.rect().height())); 39 SkScalarCeilToInt(fRRect.rect().height()));
40 } 40 }
41 41
42 void onDraw(const int loops, SkCanvas* canvas) override { 42 void onDraw(int loops, SkCanvas* canvas) override {
43 SkLayerDrawLooper::Builder looperBuilder; 43 SkLayerDrawLooper::Builder looperBuilder;
44 { 44 {
45 SkLayerDrawLooper::LayerInfo info; 45 SkLayerDrawLooper::LayerInfo info;
46 info.fPaintBits = SkLayerDrawLooper::kMaskFilter_Bit 46 info.fPaintBits = SkLayerDrawLooper::kMaskFilter_Bit
47 | SkLayerDrawLooper::kColorFilter_Bit; 47 | SkLayerDrawLooper::kColorFilter_Bit;
48 info.fColorMode = SkXfermode::kSrc_Mode; 48 info.fColorMode = SkXfermode::kSrc_Mode;
49 info.fOffset = SkPoint::Make(SkIntToScalar(-1), SkIntToScalar(0)); 49 info.fOffset = SkPoint::Make(SkIntToScalar(-1), SkIntToScalar(0));
50 info.fPostTranslate = false; 50 info.fPostTranslate = false;
51 SkPaint* paint = looperBuilder.addLayerOnTop(info); 51 SkPaint* paint = looperBuilder.addLayerOnTop(info);
52 SkMaskFilter* maskFilter = SkBlurMaskFilter::Create( 52 SkMaskFilter* maskFilter = SkBlurMaskFilter::Create(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 typedef Benchmark INHERITED; 84 typedef Benchmark INHERITED;
85 }; 85 };
86 86
87 // Create one with dimensions/rounded corners based on the skp 87 // Create one with dimensions/rounded corners based on the skp
88 DEF_BENCH(return new BlurRoundRectBench(600, 5514, 6);) 88 DEF_BENCH(return new BlurRoundRectBench(600, 5514, 6);)
89 // Same radii, much smaller rectangle 89 // Same radii, much smaller rectangle
90 DEF_BENCH(return new BlurRoundRectBench(100, 100, 6);) 90 DEF_BENCH(return new BlurRoundRectBench(100, 100, 6);)
91 // Other radii options 91 // Other radii options
92 DEF_BENCH(return new BlurRoundRectBench(100, 100, 30);) 92 DEF_BENCH(return new BlurRoundRectBench(100, 100, 30);)
93 DEF_BENCH(return new BlurRoundRectBench(100, 100, 90);) 93 DEF_BENCH(return new BlurRoundRectBench(100, 100, 90);)
OLDNEW
« no previous file with comments | « bench/BlurRectsBench.cpp ('k') | bench/ChartBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698