Chromium Code Reviews| 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 "gm.h" | 8 #include "gm.h" |
| 9 #include "SkBlurDrawLooper.h" | 9 #include "SkBlurDrawLooper.h" |
| 10 #include "SkBlurMask.h" | 10 #include "SkBlurMask.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 SK_ARRAY_COUNT(colors), | 84 SK_ARRAY_COUNT(colors), |
| 85 SkShader::kClamp_TileMode)) ; | 85 SkShader::kClamp_TileMode)) ; |
| 86 fPaints.push_back(p); | 86 fPaints.push_back(p); |
| 87 } | 87 } |
| 88 | 88 |
| 89 { | 89 { |
| 90 // AA with blur | 90 // AA with blur |
| 91 SkPaint p; | 91 SkPaint p; |
| 92 p.setColor(SK_ColorWHITE); | 92 p.setColor(SK_ColorWHITE); |
| 93 p.setAntiAlias(true); | 93 p.setAntiAlias(true); |
| 94 SkDrawLooper* shadowLooper = | 94 auto shadowLooper = |
| 95 SkBlurDrawLooper::Create(SK_ColorWHITE, | 95 SkBlurDrawLooper::Make(SK_ColorWHITE, |
| 96 SkBlurMask::ConvertRadiusToSigma(SkIntT oScalar(10)), | 96 SkBlurMask::ConvertRadiusToSigma(SkIntT oScalar(10)), |
| 97 SkIntToScalar(5), SkIntToScalar(10), | 97 SkIntToScalar(5), SkIntToScalar(10), |
| 98 SkBlurDrawLooper::kIgnoreTransform_Blur Flag | | 98 SkBlurDrawLooper::kIgnoreTransform_Blur Flag | |
| 99 SkBlurDrawLooper::kOverrideColor_BlurFl ag | | 99 SkBlurDrawLooper::kOverrideColor_BlurFl ag | |
| 100 SkBlurDrawLooper::kHighQuality_BlurFlag ); | 100 SkBlurDrawLooper::kHighQuality_BlurFlag ); |
| 101 SkAutoUnref aurL0(shadowLooper); | |
| 102 p.setLooper(shadowLooper); | 101 p.setLooper(shadowLooper); |
|
f(malita)
2016/03/21 13:53:43
nit: ditto
reed1
2016/03/21 17:15:23
Done.
| |
| 103 fPaints.push_back(p); | 102 fPaints.push_back(p); |
| 104 } | 103 } |
| 105 | 104 |
| 106 { | 105 { |
| 107 // AA with stroke style | 106 // AA with stroke style |
| 108 SkPaint p; | 107 SkPaint p; |
| 109 p.setColor(SK_ColorWHITE); | 108 p.setColor(SK_ColorWHITE); |
| 110 p.setAntiAlias(true); | 109 p.setAntiAlias(true); |
| 111 p.setStyle(SkPaint::kStroke_Style); | 110 p.setStyle(SkPaint::kStroke_Style); |
| 112 p.setStrokeWidth(SkIntToScalar(3)); | 111 p.setStrokeWidth(SkIntToScalar(3)); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 | 282 |
| 284 typedef GM INHERITED; | 283 typedef GM INHERITED; |
| 285 }; | 284 }; |
| 286 | 285 |
| 287 ////////////////////////////////////////////////////////////////////////////// | 286 ////////////////////////////////////////////////////////////////////////////// |
| 288 | 287 |
| 289 static GM* MyFactory(void*) { return new RectsGM; } | 288 static GM* MyFactory(void*) { return new RectsGM; } |
| 290 static GMRegistry reg(MyFactory); | 289 static GMRegistry reg(MyFactory); |
| 291 | 290 |
| 292 } | 291 } |
| OLD | NEW |