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 p.setShader(s)->unref(); | 88 p.setShader(s)->unref(); |
89 fPaints.push_back(p); | 89 fPaints.push_back(p); |
90 } | 90 } |
91 | 91 |
92 { | 92 { |
93 // AA with blur | 93 // AA with blur |
94 SkPaint p; | 94 SkPaint p; |
95 p.setColor(SK_ColorWHITE); | 95 p.setColor(SK_ColorWHITE); |
96 p.setAntiAlias(true); | 96 p.setAntiAlias(true); |
97 SkBlurDrawLooper* shadowLooper = | 97 SkBlurDrawLooper* shadowLooper = |
98 new SkBlurDrawLooper (SK_ColorWHITE, | 98 SkBlurDrawLooper::Create(SK_ColorWHITE, |
99 SkBlurMask::ConvertRadiusToSigma(SkIntToSc
alar(10)), | 99 SkBlurMask::ConvertRadiusToSigma(SkIntT
oScalar(10)), |
100 SkIntToScalar(5), SkIntToScalar(10), | 100 SkIntToScalar(5), SkIntToScalar(10), |
101 SkBlurDrawLooper::kIgnoreTransform_BlurFla
g | | 101 SkBlurDrawLooper::kIgnoreTransform_Blur
Flag | |
102 SkBlurDrawLooper::kOverrideColor_BlurFlag
| | 102 SkBlurDrawLooper::kOverrideColor_BlurFl
ag | |
103 SkBlurDrawLooper::kHighQuality_BlurFlag); | 103 SkBlurDrawLooper::kHighQuality_BlurFlag
); |
104 SkAutoUnref aurL0(shadowLooper); | 104 SkAutoUnref aurL0(shadowLooper); |
105 p.setLooper(shadowLooper); | 105 p.setLooper(shadowLooper); |
106 fPaints.push_back(p); | 106 fPaints.push_back(p); |
107 } | 107 } |
108 | 108 |
109 { | 109 { |
110 // AA with stroke style | 110 // AA with stroke style |
111 SkPaint p; | 111 SkPaint p; |
112 p.setColor(SK_ColorWHITE); | 112 p.setColor(SK_ColorWHITE); |
113 p.setAntiAlias(true); | 113 p.setAntiAlias(true); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 292 |
293 typedef GM INHERITED; | 293 typedef GM INHERITED; |
294 }; | 294 }; |
295 | 295 |
296 ////////////////////////////////////////////////////////////////////////////// | 296 ////////////////////////////////////////////////////////////////////////////// |
297 | 297 |
298 static GM* MyFactory(void*) { return new RectsGM; } | 298 static GM* MyFactory(void*) { return new RectsGM; } |
299 static GMRegistry reg(MyFactory); | 299 static GMRegistry reg(MyFactory); |
300 | 300 |
301 } | 301 } |
OLD | NEW |