OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "gm.h" | 8 #include "gm.h" |
| 9 #include "SkBlurMask.h" |
9 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
10 #include "SkBlurMask.h" | |
11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
12 #include "SkPath.h" | 12 #include "SkPath.h" |
13 | 13 |
14 #define STROKE_WIDTH SkIntToScalar(10) | 14 #define STROKE_WIDTH SkIntToScalar(10) |
15 | 15 |
16 typedef void (*Proc)(SkCanvas*, const SkRect&, const SkPaint&); | 16 typedef void (*Proc)(SkCanvas*, const SkRect&, const SkPaint&); |
17 | 17 |
18 static void fill_rect(SkCanvas* canvas, const SkRect& r, const SkPaint& p) { | 18 static void fill_rect(SkCanvas* canvas, const SkRect& r, const SkPaint& p) { |
19 canvas->drawRect(r, p); | 19 canvas->drawRect(r, p); |
20 } | 20 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 }; | 65 }; |
66 | 66 |
67 class BlurRectGM : public skiagm::GM { | 67 class BlurRectGM : public skiagm::GM { |
68 SkAutoTUnref<SkMaskFilter> fMaskFilter; | 68 SkAutoTUnref<SkMaskFilter> fMaskFilter; |
69 SkString fName; | 69 SkString fName; |
70 PaintProc fPProc; | 70 PaintProc fPProc; |
71 SkAlpha fAlpha; | 71 SkAlpha fAlpha; |
72 public: | 72 public: |
73 BlurRectGM(const char name[], PaintProc pproc, U8CPU alpha, | 73 BlurRectGM(const char name[], PaintProc pproc, U8CPU alpha, |
74 SkBlurMaskFilter::BlurStyle bs) | 74 SkBlurMaskFilter::BlurStyle bs) |
75 : fMaskFilter(SkBlurMaskFilter::Create(STROKE_WIDTH/2, bs, | 75 : fMaskFilter(SkBlurMaskFilter::Create(bs, |
| 76 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(STRO
KE_WIDTH/2)), |
76 SkBlurMaskFilter::kHighQuality_BlurFlag)) | 77 SkBlurMaskFilter::kHighQuality_BlurFlag)) |
77 , fName(name) | 78 , fName(name) |
78 , fPProc(pproc) | 79 , fPProc(pproc) |
79 , fAlpha(SkToU8(alpha)) { | 80 , fAlpha(SkToU8(alpha)) { |
80 fName.appendf("_%s", gBlurStyle2Name[bs]); | 81 fName.appendf("_%s", gBlurStyle2Name[bs]); |
81 } | 82 } |
82 | 83 |
83 protected: | 84 protected: |
84 virtual SkString onShortName() { | 85 virtual SkString onShortName() { |
85 return fName; | 86 return fName; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 private: | 134 private: |
134 typedef GM INHERITED; | 135 typedef GM INHERITED; |
135 }; | 136 }; |
136 | 137 |
137 class BlurRectCompareGM : public skiagm::GM { | 138 class BlurRectCompareGM : public skiagm::GM { |
138 SkString fName; | 139 SkString fName; |
139 unsigned int fRectWidth, fRectHeight; | 140 unsigned int fRectWidth, fRectHeight; |
140 SkScalar fRadius; | 141 SkScalar fRadius; |
141 SkBlurMask::Style fStyle; | 142 SkBlurMask::Style fStyle; |
142 public: | 143 public: |
143 BlurRectCompareGM(const char name[], unsigned int rectWidth, unsigned int re
ctHeight, float radius, SkBlurMask::Style style) | 144 BlurRectCompareGM(const char name[], unsigned int rectWidth, |
| 145 unsigned int rectHeight, float radius, |
| 146 SkBlurMask::Style style) |
144 : fName(name) | 147 : fName(name) |
145 , fRectWidth(rectWidth) | 148 , fRectWidth(rectWidth) |
146 , fRectHeight(rectHeight) | 149 , fRectHeight(rectHeight) |
147 , fRadius(radius) | 150 , fRadius(radius) |
148 , fStyle(style) | 151 , fStyle(style) { |
149 {} | 152 } |
150 | |
151 int width() const { | 153 int width() const { |
152 return fRectWidth; | 154 return fRectWidth; |
153 } | 155 } |
154 int height() const { | 156 int height() const { |
155 return fRectHeight; | 157 return fRectHeight; |
156 } | 158 } |
157 SkScalar radius() const { | 159 SkScalar radius() const { |
158 return fRadius; | 160 return fRadius; |
159 } | 161 } |
160 SkBlurMask::Style style() const { | 162 SkBlurMask::Style style() const { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 class BlurRectFastGM: public BlurRectCompareGM { | 211 class BlurRectFastGM: public BlurRectCompareGM { |
210 public: | 212 public: |
211 BlurRectFastGM(const char name[], unsigned int rectWidth, | 213 BlurRectFastGM(const char name[], unsigned int rectWidth, |
212 unsigned int rectHeight, float blurRadius, | 214 unsigned int rectHeight, float blurRadius, |
213 SkBlurMask::Style style) : | 215 SkBlurMask::Style style) : |
214 INHERITED(name, rectWidth, rectHeight, blurRadius, style) { | 216 INHERITED(name, rectWidth, rectHeight, blurRadius, style) { |
215 } | 217 } |
216 | 218 |
217 protected: | 219 protected: |
218 virtual bool makeMask(SkMask *m, const SkRect& r) SK_OVERRIDE { | 220 virtual bool makeMask(SkMask *m, const SkRect& r) SK_OVERRIDE { |
219 return SkBlurMask::BlurRect(m, r, this->radius(), this->style()); | 221 return SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(this->radiu
s()), |
| 222 m, r, this->style()); |
220 } | 223 } |
221 private: | 224 private: |
222 typedef BlurRectCompareGM INHERITED; | 225 typedef BlurRectCompareGM INHERITED; |
223 }; | 226 }; |
224 | 227 |
225 class BlurRectSlowGM: public BlurRectCompareGM { | 228 class BlurRectSlowGM: public BlurRectCompareGM { |
226 public: | 229 public: |
227 BlurRectSlowGM(const char name[], unsigned int rect_width, unsigned int rect
_height, | 230 BlurRectSlowGM(const char name[], unsigned int rectWidth, unsigned int rectH
eight, |
228 float blur_radius, SkBlurMask::Style style) : | 231 float blurRadius, SkBlurMask::Style style) |
229 INHERITED(name, rect_width, rect_height, blur_radius, style) | 232 : INHERITED(name, rectWidth, rectHeight, blurRadius, style) { |
230 { | 233 } |
231 | 234 |
232 } | |
233 protected: | 235 protected: |
234 virtual bool makeMask(SkMask *m, const SkRect& r) SK_OVERRIDE { | 236 virtual bool makeMask(SkMask *m, const SkRect& r) SK_OVERRIDE { |
235 SkMask src; | 237 SkMask src; |
236 r.roundOut(&src.fBounds); | 238 r.roundOut(&src.fBounds); |
237 src.fBounds.offset(-src.fBounds.fLeft, -src.fBounds.fTop); // move to o
rigin | 239 src.fBounds.offset(-src.fBounds.fLeft, -src.fBounds.fTop); // move to o
rigin |
238 src.fFormat = SkMask::kA8_Format; | 240 src.fFormat = SkMask::kA8_Format; |
239 src.fRowBytes = src.fBounds.width(); | 241 src.fRowBytes = src.fBounds.width(); |
240 src.fImage = SkMask::AllocImage(src.computeTotalImageSize()); | 242 src.fImage = SkMask::AllocImage(src.computeTotalImageSize()); |
241 SkAutoMaskFreeImage amfi(src.fImage); | 243 SkAutoMaskFreeImage amfi(src.fImage); |
242 | 244 |
243 memset(src.fImage, 0xff, src.computeTotalImageSize()); | 245 memset(src.fImage, 0xff, src.computeTotalImageSize()); |
244 | 246 |
245 return SkBlurMask::Blur(m, src, this->radius(), this->style(), this->get
Quality()); | 247 return SkBlurMask::BoxBlur(m, src, |
| 248 SkBlurMask::ConvertRadiusToSigma(this->radius
()), |
| 249 this->style(), this->getQuality()); |
246 } | 250 } |
247 | 251 |
248 virtual SkBlurMask::Quality getQuality() { | 252 virtual SkBlurMask::Quality getQuality() { |
249 return SkBlurMask::kHigh_Quality; | 253 return SkBlurMask::kHigh_Quality; |
250 } | 254 } |
251 private: | 255 private: |
252 typedef BlurRectCompareGM INHERITED; | 256 typedef BlurRectCompareGM INHERITED; |
253 }; | 257 }; |
254 | 258 |
255 class BlurRectSlowLowGM: public BlurRectSlowGM { | 259 class BlurRectSlowLowGM: public BlurRectSlowGM { |
256 public: | 260 public: |
257 BlurRectSlowLowGM(const char name[], unsigned int rectWidth, unsigned int re
ctHeight, | 261 BlurRectSlowLowGM(const char name[], unsigned int rectWidth, unsigned int re
ctHeight, |
258 float blurRadius, SkBlurMask::Style style) : | 262 float blurRadius, SkBlurMask::Style style) |
259 INHERITED(name, rectWidth, rectHeight, blurRadius, style) | 263 : INHERITED(name, rectWidth, rectHeight, blurRadius, style) { |
260 { | 264 } |
261 | 265 |
262 } | |
263 protected: | 266 protected: |
264 virtual SkBlurMask::Quality getQuality() SK_OVERRIDE { | 267 virtual SkBlurMask::Quality getQuality() SK_OVERRIDE { |
265 return SkBlurMask::kLow_Quality; | 268 return SkBlurMask::kLow_Quality; |
266 } | 269 } |
267 private: | 270 private: |
268 typedef BlurRectSlowGM INHERITED; | 271 typedef BlurRectSlowGM INHERITED; |
269 }; | 272 }; |
270 | 273 |
271 class BlurRectGroundTruthGM: public BlurRectCompareGM { | 274 class BlurRectGroundTruthGM: public BlurRectCompareGM { |
272 public: | 275 public: |
273 BlurRectGroundTruthGM(const char name[], unsigned int rectWidth, unsigned in
t rectHeight, | 276 BlurRectGroundTruthGM(const char name[], unsigned int rectWidth, unsigned in
t rectHeight, |
274 float blurRadius, SkBlurMask::Style style) : | 277 float blurRadius, SkBlurMask::Style style) |
275 INHERITED(name, rectWidth, rectHeight, blurRadius, style) | 278 : INHERITED(name, rectWidth, rectHeight, blurRadius, style) { |
276 { | 279 } |
277 | 280 |
278 } | |
279 protected: | 281 protected: |
280 virtual bool makeMask(SkMask *m, const SkRect& r) SK_OVERRIDE { | 282 virtual bool makeMask(SkMask *m, const SkRect& r) SK_OVERRIDE { |
281 SkMask src; | 283 SkMask src; |
282 r.roundOut(&src.fBounds); | 284 r.roundOut(&src.fBounds); |
283 src.fBounds.offset(-src.fBounds.fLeft, -src.fBounds.fTop); // move to o
rigin | 285 src.fBounds.offset(-src.fBounds.fLeft, -src.fBounds.fTop); // move to o
rigin |
284 src.fFormat = SkMask::kA8_Format; | 286 src.fFormat = SkMask::kA8_Format; |
285 src.fRowBytes = src.fBounds.width(); | 287 src.fRowBytes = src.fBounds.width(); |
286 src.fImage = SkMask::AllocImage(src.computeTotalImageSize()); | 288 src.fImage = SkMask::AllocImage(src.computeTotalImageSize()); |
287 SkAutoMaskFreeImage amfi(src.fImage); | 289 SkAutoMaskFreeImage amfi(src.fImage); |
288 | 290 |
289 memset(src.fImage, 0xff, src.computeTotalImageSize()); | 291 memset(src.fImage, 0xff, src.computeTotalImageSize()); |
290 | 292 |
291 return SkBlurMask::BlurGroundTruth(m, src, this->radius(), this->style()
); | 293 return SkBlurMask::BlurGroundTruth(SkBlurMask::ConvertRadiusToSigma(this
->radius()), |
| 294 m, src, this->style()); |
292 } | 295 } |
293 | 296 |
294 virtual SkBlurMask::Quality getQuality() { | 297 virtual SkBlurMask::Quality getQuality() { |
295 return SkBlurMask::kHigh_Quality; | 298 return SkBlurMask::kHigh_Quality; |
296 } | 299 } |
297 private: | 300 private: |
298 typedef BlurRectCompareGM INHERITED; | 301 typedef BlurRectCompareGM INHERITED; |
299 }; | 302 }; |
300 | 303 |
301 | 304 |
302 ////////////////////////////////////////////////////////////////////////////// | 305 ////////////////////////////////////////////////////////////////////////////// |
303 | 306 |
304 DEF_GM(return new BlurRectGM("blurrect", NULL, 0xFF, SkBlurMaskFilter::kNormal_B
lurStyle);) | 307 DEF_GM(return new BlurRectGM("blurrect", NULL, 0xFF, SkBlurMaskFilter::kNormal_B
lurStyle);) |
305 DEF_GM(return new BlurRectGM("blurrect", NULL, 0xFF, SkBlurMaskFilter::kSolid_Bl
urStyle);) | 308 DEF_GM(return new BlurRectGM("blurrect", NULL, 0xFF, SkBlurMaskFilter::kSolid_Bl
urStyle);) |
306 DEF_GM(return new BlurRectGM("blurrect", NULL, 0xFF, SkBlurMaskFilter::kOuter_Bl
urStyle);) | 309 DEF_GM(return new BlurRectGM("blurrect", NULL, 0xFF, SkBlurMaskFilter::kOuter_Bl
urStyle);) |
307 DEF_GM(return new BlurRectGM("blurrect", NULL, 0xFF, SkBlurMaskFilter::kInner_Bl
urStyle);) | 310 DEF_GM(return new BlurRectGM("blurrect", NULL, 0xFF, SkBlurMaskFilter::kInner_Bl
urStyle);) |
308 | 311 |
| 312 static const SkScalar kBig = SkFloatToScalar(20); |
| 313 static const SkScalar kSmall = SkFloatToScalar(2); |
| 314 |
309 // regular size rects, blurs should be small enough not to completely overlap. | 315 // regular size rects, blurs should be small enough not to completely overlap. |
310 | 316 |
311 DEF_GM(return new BlurRectFastGM( "blurrect_25_100_2_normal_fast", 25, 100, 2,
SkBlurMask::kNormal_Style);) | 317 DEF_GM(return new BlurRectFastGM( "blurrect_25_100_2_normal_fast", 25, 100, kSma
ll, SkBlurMask::kNormal_Style);) |
312 DEF_GM(return new BlurRectFastGM("blurrect_25_100_20_normal_fast", 25, 100, 20,
SkBlurMask::kNormal_Style);) | 318 DEF_GM(return new BlurRectFastGM("blurrect_25_100_20_normal_fast", 25, 100, kBig
, SkBlurMask::kNormal_Style);) |
313 DEF_GM(return new BlurRectSlowGM( "blurrect_25_100_2_normal_slow", 25, 100, 2,
SkBlurMask::kNormal_Style);) | 319 DEF_GM(return new BlurRectSlowGM( "blurrect_25_100_2_normal_slow", 25, 100, kSma
ll, SkBlurMask::kNormal_Style);) |
314 DEF_GM(return new BlurRectSlowGM("blurrect_25_100_20_normal_slow", 25, 100, 20,
SkBlurMask::kNormal_Style);) | 320 DEF_GM(return new BlurRectSlowGM("blurrect_25_100_20_normal_slow", 25, 100, kBig
, SkBlurMask::kNormal_Style);) |
315 DEF_GM(return new BlurRectFastGM( "blurrect_25_100_2_inner_fast", 25, 100, 2, S
kBlurMask::kInner_Style);) | 321 DEF_GM(return new BlurRectFastGM( "blurrect_25_100_2_inner_fast", 25, 100, kSmal
l, SkBlurMask::kInner_Style);) |
316 DEF_GM(return new BlurRectFastGM("blurrect_25_100_20_inner_fast", 25, 100, 20, S
kBlurMask::kInner_Style);) | 322 DEF_GM(return new BlurRectFastGM("blurrect_25_100_20_inner_fast", 25, 100, kBig,
SkBlurMask::kInner_Style);) |
317 DEF_GM(return new BlurRectSlowGM( "blurrect_25_100_2_inner_slow", 25, 100, 2, S
kBlurMask::kInner_Style);) | 323 DEF_GM(return new BlurRectSlowGM( "blurrect_25_100_2_inner_slow", 25, 100, kSmal
l, SkBlurMask::kInner_Style);) |
318 DEF_GM(return new BlurRectSlowGM("blurrect_25_100_20_inner_slow", 25, 100, 20, S
kBlurMask::kInner_Style);) | 324 DEF_GM(return new BlurRectSlowGM("blurrect_25_100_20_inner_slow", 25, 100, kBig,
SkBlurMask::kInner_Style);) |
319 DEF_GM(return new BlurRectFastGM( "blurrect_25_100_2_outer_fast", 25, 100, 2, S
kBlurMask::kOuter_Style);) | 325 DEF_GM(return new BlurRectFastGM( "blurrect_25_100_2_outer_fast", 25, 100, kSmal
l, SkBlurMask::kOuter_Style);) |
320 DEF_GM(return new BlurRectFastGM("blurrect_25_100_20_outer_fast", 25, 100, 20, S
kBlurMask::kOuter_Style);) | 326 DEF_GM(return new BlurRectFastGM("blurrect_25_100_20_outer_fast", 25, 100, kBig,
SkBlurMask::kOuter_Style);) |
321 DEF_GM(return new BlurRectSlowGM( "blurrect_25_100_2_outer_slow", 25, 100, 2, S
kBlurMask::kOuter_Style);) | 327 DEF_GM(return new BlurRectSlowGM( "blurrect_25_100_2_outer_slow", 25, 100, kSmal
l, SkBlurMask::kOuter_Style);) |
322 DEF_GM(return new BlurRectSlowGM("blurrect_25_100_20_outer_slow", 25, 100, 20, S
kBlurMask::kOuter_Style);) | 328 DEF_GM(return new BlurRectSlowGM("blurrect_25_100_20_outer_slow", 25, 100, kBig,
SkBlurMask::kOuter_Style);) |
323 | 329 |
324 // skinny tall rects, blurs overlap in X but not y | 330 // skinny tall rects, blurs overlap in X but not y |
325 | 331 |
326 DEF_GM(return new BlurRectFastGM( "blurrect_5_100_2_normal_fast", 5, 100, 2 , Sk
BlurMask::kNormal_Style);) | 332 DEF_GM(return new BlurRectFastGM( "blurrect_5_100_2_normal_fast", 5, 100, kSmall
, SkBlurMask::kNormal_Style);) |
327 DEF_GM(return new BlurRectFastGM("blurrect_5_100_20_normal_fast", 5, 100, 20, Sk
BlurMask::kNormal_Style);) | 333 DEF_GM(return new BlurRectFastGM("blurrect_5_100_20_normal_fast", 5, 100, kBig,
SkBlurMask::kNormal_Style);) |
328 DEF_GM(return new BlurRectSlowGM( "blurrect_5_100_2_normal_slow", 5, 100, 2 , Sk
BlurMask::kNormal_Style);) | 334 DEF_GM(return new BlurRectSlowGM( "blurrect_5_100_2_normal_slow", 5, 100, kSmall
, SkBlurMask::kNormal_Style);) |
329 DEF_GM(return new BlurRectSlowGM("blurrect_5_100_20_normal_slow", 5, 100, 20, Sk
BlurMask::kNormal_Style);) | 335 DEF_GM(return new BlurRectSlowGM("blurrect_5_100_20_normal_slow", 5, 100, kBig,
SkBlurMask::kNormal_Style);) |
330 DEF_GM(return new BlurRectFastGM( "blurrect_5_100_2_inner_fast", 5, 100, 2 , SkB
lurMask::kInner_Style);) | 336 DEF_GM(return new BlurRectFastGM( "blurrect_5_100_2_inner_fast", 5, 100, kSmall,
SkBlurMask::kInner_Style);) |
331 DEF_GM(return new BlurRectFastGM("blurrect_5_100_20_inner_fast", 5, 100, 20, SkB
lurMask::kInner_Style);) | 337 DEF_GM(return new BlurRectFastGM("blurrect_5_100_20_inner_fast", 5, 100, kBig, S
kBlurMask::kInner_Style);) |
332 DEF_GM(return new BlurRectSlowGM( "blurrect_5_100_2_inner_slow", 5, 100, 2 , SkB
lurMask::kInner_Style);) | 338 DEF_GM(return new BlurRectSlowGM( "blurrect_5_100_2_inner_slow", 5, 100, kSmall,
SkBlurMask::kInner_Style);) |
333 DEF_GM(return new BlurRectSlowGM("blurrect_5_100_20_inner_slow", 5, 100, 20, SkB
lurMask::kInner_Style);) | 339 DEF_GM(return new BlurRectSlowGM("blurrect_5_100_20_inner_slow", 5, 100, kBig, S
kBlurMask::kInner_Style);) |
334 DEF_GM(return new BlurRectFastGM( "blurrect_5_100_2_outer_fast", 5, 100, 2 , SkB
lurMask::kOuter_Style);) | 340 DEF_GM(return new BlurRectFastGM( "blurrect_5_100_2_outer_fast", 5, 100, kSmall,
SkBlurMask::kOuter_Style);) |
335 DEF_GM(return new BlurRectFastGM("blurrect_5_100_20_outer_fast", 5, 100, 20, SkB
lurMask::kOuter_Style);) | 341 DEF_GM(return new BlurRectFastGM("blurrect_5_100_20_outer_fast", 5, 100, kBig, S
kBlurMask::kOuter_Style);) |
336 DEF_GM(return new BlurRectSlowGM( "blurrect_5_100_2_outer_slow", 5, 100, 2 , SkB
lurMask::kOuter_Style);) | 342 DEF_GM(return new BlurRectSlowGM( "blurrect_5_100_2_outer_slow", 5, 100, kSmall,
SkBlurMask::kOuter_Style);) |
337 DEF_GM(return new BlurRectSlowGM("blurrect_5_100_20_outer_slow", 5, 100, 20, SkB
lurMask::kOuter_Style);) | 343 DEF_GM(return new BlurRectSlowGM("blurrect_5_100_20_outer_slow", 5, 100, kBig, S
kBlurMask::kOuter_Style);) |
338 | 344 |
339 // tiny rects, blurs overlap in X and Y | 345 // tiny rects, blurs overlap in X and Y |
340 | 346 |
341 DEF_GM(return new BlurRectFastGM( "blurrect_5_5_2_normal_fast", 5, 5, 2 , SkBlur
Mask::kNormal_Style);) | 347 DEF_GM(return new BlurRectFastGM( "blurrect_5_5_2_normal_fast", 5, 5, kSmall, Sk
BlurMask::kNormal_Style);) |
342 DEF_GM(return new BlurRectFastGM("blurrect_5_5_20_normal_fast", 5, 5, 20, SkBlur
Mask::kNormal_Style);) | 348 DEF_GM(return new BlurRectFastGM("blurrect_5_5_20_normal_fast", 5, 5, kBig, SkBl
urMask::kNormal_Style);) |
343 DEF_GM(return new BlurRectSlowGM( "blurrect_5_5_2_normal_slow", 5, 5, 2 , SkBlur
Mask::kNormal_Style);) | 349 DEF_GM(return new BlurRectSlowGM( "blurrect_5_5_2_normal_slow", 5, 5, kSmall, Sk
BlurMask::kNormal_Style);) |
344 DEF_GM(return new BlurRectSlowGM("blurrect_5_5_20_normal_slow", 5, 5, 20, SkBlur
Mask::kNormal_Style);) | 350 DEF_GM(return new BlurRectSlowGM("blurrect_5_5_20_normal_slow", 5, 5, kBig, SkBl
urMask::kNormal_Style);) |
345 DEF_GM(return new BlurRectFastGM( "blurrect_5_5_2_inner_fast", 5, 5, 2 , SkBlurM
ask::kInner_Style);) | 351 DEF_GM(return new BlurRectFastGM( "blurrect_5_5_2_inner_fast", 5, 5, kSmall, SkB
lurMask::kInner_Style);) |
346 DEF_GM(return new BlurRectFastGM("blurrect_5_5_20_inner_fast", 5, 5, 20, SkBlurM
ask::kInner_Style);) | 352 DEF_GM(return new BlurRectFastGM("blurrect_5_5_20_inner_fast", 5, 5, kBig, SkBlu
rMask::kInner_Style);) |
347 DEF_GM(return new BlurRectSlowGM( "blurrect_5_5_2_inner_slow", 5, 5, 2 , SkBlurM
ask::kInner_Style);) | 353 DEF_GM(return new BlurRectSlowGM( "blurrect_5_5_2_inner_slow", 5, 5, kSmall, SkB
lurMask::kInner_Style);) |
348 DEF_GM(return new BlurRectSlowGM("blurrect_5_5_20_inner_slow", 5, 5, 20, SkBlurM
ask::kInner_Style);) | 354 DEF_GM(return new BlurRectSlowGM("blurrect_5_5_20_inner_slow", 5, 5, kBig, SkBlu
rMask::kInner_Style);) |
349 DEF_GM(return new BlurRectFastGM( "blurrect_5_5_2_outer_fast", 5, 5, 2 , SkBlurM
ask::kOuter_Style);) | 355 DEF_GM(return new BlurRectFastGM( "blurrect_5_5_2_outer_fast", 5, 5, kSmall, SkB
lurMask::kOuter_Style);) |
350 DEF_GM(return new BlurRectFastGM("blurrect_5_5_20_outer_fast", 5, 5, 20, SkBlurM
ask::kOuter_Style);) | 356 DEF_GM(return new BlurRectFastGM("blurrect_5_5_20_outer_fast", 5, 5, kBig, SkBlu
rMask::kOuter_Style);) |
351 DEF_GM(return new BlurRectSlowGM( "blurrect_5_5_2_outer_slow", 5, 5, 2 , SkBlurM
ask::kOuter_Style);) | 357 DEF_GM(return new BlurRectSlowGM( "blurrect_5_5_2_outer_slow", 5, 5, kSmall, SkB
lurMask::kOuter_Style);) |
352 DEF_GM(return new BlurRectSlowGM("blurrect_5_5_20_outer_slow", 5, 5, 20, SkBlurM
ask::kOuter_Style);) | 358 DEF_GM(return new BlurRectSlowGM("blurrect_5_5_20_outer_slow", 5, 5, kBig, SkBlu
rMask::kOuter_Style);) |
353 | 359 |
354 | 360 |
355 #if 0 | 361 #if 0 |
356 // dont' need to GM the gaussian convolution; it's slow and intended | 362 // dont' need to GM the gaussian convolution; it's slow and intended |
357 // as a ground truth comparison only. Leaving these here in case we | 363 // as a ground truth comparison only. Leaving these here in case we |
358 // ever want to turn these back on for debugging reasons. | 364 // ever want to turn these back on for debugging reasons. |
359 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_1_simple", 25, 100, 1)
;) | 365 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_1_simple", 25, 100, 1)
;) |
360 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_2_simple", 25, 100, 2)
;) | 366 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_2_simple", 25, 100, 2)
;) |
361 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_3_simple", 25, 100, 3)
;) | 367 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_3_simple", 25, 100, 3)
;) |
362 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_4_simple", 25, 100, 4)
;) | 368 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_4_simple", 25, 100, 4)
;) |
363 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_5_simple", 25, 100, 5)
;) | 369 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_5_simple", 25, 100, 5)
;) |
364 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_6_simple", 25, 100, 6)
;) | 370 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_6_simple", 25, 100, 6)
;) |
365 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_7_simple", 25, 100, 7)
;) | 371 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_7_simple", 25, 100, 7)
;) |
366 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_8_simple", 25, 100, 8)
;) | 372 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_8_simple", 25, 100, 8)
;) |
367 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_9_simple", 25, 100, 9)
;) | 373 DEF_GM(return new BlurRectGroundTruthGM( "blurrect_25_100_9_simple", 25, 100, 9)
;) |
368 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_10_simple", 25, 100, 10
);) | 374 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_10_simple", 25, 100, 10
);) |
369 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_11_simple", 25, 100, 11
);) | 375 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_11_simple", 25, 100, 11
);) |
370 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_12_simple", 25, 100, 12
);) | 376 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_12_simple", 25, 100, 12
);) |
371 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_13_simple", 25, 100, 13
);) | 377 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_13_simple", 25, 100, 13
);) |
372 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_14_simple", 25, 100, 14
);) | 378 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_14_simple", 25, 100, 14
);) |
373 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_15_simple", 25, 100, 15
);) | 379 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_15_simple", 25, 100, 15
);) |
374 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_16_simple", 25, 100, 16
);) | 380 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_16_simple", 25, 100, 16
);) |
375 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_17_simple", 25, 100, 17
);) | 381 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_17_simple", 25, 100, 17
);) |
376 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_18_simple", 25, 100, 18
);) | 382 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_18_simple", 25, 100, 18
);) |
377 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_19_simple", 25, 100, 19
);) | 383 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_19_simple", 25, 100, 19
);) |
378 #endif | 384 #endif |
OLD | NEW |