| 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 "SkBlurMaskFilter.h" | 9 #include "SkBlurMaskFilter.h" |
| 10 #include "SkBlurMask.h" | 10 #include "SkBlurMask.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 SkMask src; | 236 SkMask src; |
| 237 r.roundOut(&src.fBounds); | 237 r.roundOut(&src.fBounds); |
| 238 src.fBounds.offset(-src.fBounds.fLeft, -src.fBounds.fTop); // move to o
rigin | 238 src.fBounds.offset(-src.fBounds.fLeft, -src.fBounds.fTop); // move to o
rigin |
| 239 src.fFormat = SkMask::kA8_Format; | 239 src.fFormat = SkMask::kA8_Format; |
| 240 src.fRowBytes = src.fBounds.width(); | 240 src.fRowBytes = src.fBounds.width(); |
| 241 src.fImage = SkMask::AllocImage(src.computeTotalImageSize()); | 241 src.fImage = SkMask::AllocImage(src.computeTotalImageSize()); |
| 242 SkAutoMaskFreeImage amfi(src.fImage); | 242 SkAutoMaskFreeImage amfi(src.fImage); |
| 243 | 243 |
| 244 memset(src.fImage, 0xff, src.computeTotalImageSize()); | 244 memset(src.fImage, 0xff, src.computeTotalImageSize()); |
| 245 | 245 |
| 246 return SkBlurMask::BlurSeparable(m, src, this->radius(), this->style(),
this->getQuality()); | 246 return SkBlurMask::Blur(m, src, this->radius(), this->style(), this->get
Quality()); |
| 247 } | 247 } |
| 248 | 248 |
| 249 virtual SkBlurMask::Quality getQuality() { | 249 virtual SkBlurMask::Quality getQuality() { |
| 250 return SkBlurMask::kHigh_Quality; | 250 return SkBlurMask::kHigh_Quality; |
| 251 } | 251 } |
| 252 private: | 252 private: |
| 253 typedef BlurRectCompareGM INHERITED; | 253 typedef BlurRectCompareGM INHERITED; |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 class BlurRectSlowLowGM: public BlurRectSlowGM { | 256 class BlurRectSlowLowGM: public BlurRectSlowGM { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_11_simple", 25, 100, 11
);) | 370 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_11_simple", 25, 100, 11
);) |
| 371 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_12_simple", 25, 100, 12
);) | 371 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_12_simple", 25, 100, 12
);) |
| 372 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_13_simple", 25, 100, 13
);) | 372 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_13_simple", 25, 100, 13
);) |
| 373 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_14_simple", 25, 100, 14
);) | 373 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_14_simple", 25, 100, 14
);) |
| 374 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_15_simple", 25, 100, 15
);) | 374 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_15_simple", 25, 100, 15
);) |
| 375 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_16_simple", 25, 100, 16
);) | 375 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_16_simple", 25, 100, 16
);) |
| 376 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_17_simple", 25, 100, 17
);) | 376 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_17_simple", 25, 100, 17
);) |
| 377 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_18_simple", 25, 100, 18
);) | 377 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_18_simple", 25, 100, 18
);) |
| 378 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_19_simple", 25, 100, 19
);) | 378 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_19_simple", 25, 100, 19
);) |
| 379 #endif | 379 #endif |
| OLD | NEW |