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

Side by Side Diff: bench/BlurRectBench.cpp

Issue 21835004: Blur refactoring (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Removed unneeded #includes Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | gm/blurrect.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 "SkBenchmark.h" 8 #include "SkBenchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 setName(name); 135 setName(name);
136 } 136 }
137 137
138 protected: 138 protected:
139 139
140 virtual void makeBlurryRect(const SkRect&) SK_OVERRIDE { 140 virtual void makeBlurryRect(const SkRect&) SK_OVERRIDE {
141 SkMask mask; 141 SkMask mask;
142 mask.fImage = NULL; 142 mask.fImage = NULL;
143 SkBlurMask::Blur(&mask, fSrcMask, this->radius(), 143 SkBlurMask::Blur(&mask, fSrcMask, this->radius(),
144 SkBlurMask::kNormal_Style, 144 SkBlurMask::kNormal_Style,
145 SkBlurMask::kHigh_Quality); 145 SkBlurMask::kHigh_Quality);
146 SkMask::FreeImage(mask.fImage); 146 SkMask::FreeImage(mask.fImage);
147 } 147 }
148 private: 148 private:
149 typedef BlurRectSeparableBench INHERITED; 149 typedef BlurRectSeparableBench INHERITED;
150 }; 150 };
151 151
152 class BlurRectGaussianBench: public BlurRectSeparableBench { 152 class BlurRectGaussianBench: public BlurRectSeparableBench {
153 public: 153 public:
154 BlurRectGaussianBench(void *param, SkScalar rad) : INHERITED(param, rad) { 154 BlurRectGaussianBench(void *param, SkScalar rad) : INHERITED(param, rad) {
155 SkString name; 155 SkString name;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(12));) 213 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(12));)
214 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(13));) 214 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(13));)
215 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(14));) 215 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(14));)
216 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(15));) 216 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(15));)
217 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(16));) 217 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(16));)
218 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(17));) 218 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(17));)
219 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(18));) 219 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(18));)
220 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(19));) 220 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(19));)
221 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(20));) 221 DEF_BENCH(return new BlurRectGaussianBench(p, SkIntToScalar(20));)
222 #endif 222 #endif
OLDNEW
« no previous file with comments | « no previous file | gm/blurrect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698