OLD | NEW |
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 "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 SkScalar radius() const { | 46 SkScalar radius() const { |
47 return fRadius; | 47 return fRadius; |
48 } | 48 } |
49 | 49 |
50 void setName(const SkString& name) { | 50 void setName(const SkString& name) { |
51 fName = name; | 51 fName = name; |
52 } | 52 } |
53 | 53 |
54 virtual void onDraw(const int loops, SkCanvas*) { | 54 virtual void onDraw(int loops, SkCanvas*) { |
55 SkPaint paint; | 55 SkPaint paint; |
56 this->setupPaint(&paint); | 56 this->setupPaint(&paint); |
57 | 57 |
58 paint.setAntiAlias(true); | 58 paint.setAntiAlias(true); |
59 | 59 |
60 SkScalar pad = fRadius*3/2 + SK_Scalar1; | 60 SkScalar pad = fRadius*3/2 + SK_Scalar1; |
61 SkRect r = SkRect::MakeWH(2 * pad + SK_Scalar1, 2 * pad + SK_Scalar1); | 61 SkRect r = SkRect::MakeWH(2 * pad + SK_Scalar1, 2 * pad + SK_Scalar1); |
62 | 62 |
63 preBenchSetup(r); | 63 preBenchSetup(r); |
64 | 64 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(12));) | 219 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(12));) |
220 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(13));) | 220 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(13));) |
221 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(14));) | 221 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(14));) |
222 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(15));) | 222 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(15));) |
223 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(16));) | 223 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(16));) |
224 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(17));) | 224 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(17));) |
225 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(18));) | 225 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(18));) |
226 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(19));) | 226 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(19));) |
227 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(20));) | 227 DEF_BENCH(return new BlurRectGaussianBench(SkIntToScalar(20));) |
228 #endif | 228 #endif |
OLD | NEW |