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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 SkShader::kClamp_TileMo
de); | 88 SkShader::kClamp_TileMo
de); |
89 p.setShader(s)->unref(); | 89 p.setShader(s)->unref(); |
90 fPaints.push_back(p); | 90 fPaints.push_back(p); |
91 } | 91 } |
92 | 92 |
93 { | 93 { |
94 // AA with blur | 94 // AA with blur |
95 SkPaint p; | 95 SkPaint p; |
96 p.setColor(SK_ColorWHITE); | 96 p.setColor(SK_ColorWHITE); |
97 p.setAntiAlias(true); | 97 p.setAntiAlias(true); |
98 SkBlurDrawLooper* shadowLooper = | 98 SkDrawLooper* shadowLooper = |
99 SkBlurDrawLooper::Create(SK_ColorWHITE, | 99 SkBlurDrawLooper::Create(SK_ColorWHITE, |
100 SkBlurMask::ConvertRadiusToSigma(SkIntT
oScalar(10)), | 100 SkBlurMask::ConvertRadiusToSigma(SkIntT
oScalar(10)), |
101 SkIntToScalar(5), SkIntToScalar(10), | 101 SkIntToScalar(5), SkIntToScalar(10), |
102 SkBlurDrawLooper::kIgnoreTransform_Blur
Flag | | 102 SkBlurDrawLooper::kIgnoreTransform_Blur
Flag | |
103 SkBlurDrawLooper::kOverrideColor_BlurFl
ag | | 103 SkBlurDrawLooper::kOverrideColor_BlurFl
ag | |
104 SkBlurDrawLooper::kHighQuality_BlurFlag
); | 104 SkBlurDrawLooper::kHighQuality_BlurFlag
); |
105 SkAutoUnref aurL0(shadowLooper); | 105 SkAutoUnref aurL0(shadowLooper); |
106 p.setLooper(shadowLooper); | 106 p.setLooper(shadowLooper); |
107 fPaints.push_back(p); | 107 fPaints.push_back(p); |
108 } | 108 } |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 typedef GM INHERITED; | 288 typedef GM INHERITED; |
289 }; | 289 }; |
290 | 290 |
291 ////////////////////////////////////////////////////////////////////////////// | 291 ////////////////////////////////////////////////////////////////////////////// |
292 | 292 |
293 static GM* MyFactory(void*) { return new RectsGM; } | 293 static GM* MyFactory(void*) { return new RectsGM; } |
294 static GMRegistry reg(MyFactory); | 294 static GMRegistry reg(MyFactory); |
295 | 295 |
296 } | 296 } |
OLD | NEW |