| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Intel Inc. | 3 * Copyright 2012 Intel Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 SkShader::kClamp_TileMode); | 74 SkShader::kClamp_TileMode); |
| 75 p.setShader(s)->unref(); | 75 p.setShader(s)->unref(); |
| 76 fPaints.push_back(p); | 76 fPaints.push_back(p); |
| 77 } | 77 } |
| 78 | 78 |
| 79 { | 79 { |
| 80 // AA with blur | 80 // AA with blur |
| 81 SkPaint p; | 81 SkPaint p; |
| 82 p.setAntiAlias(true); | 82 p.setAntiAlias(true); |
| 83 SkBlurDrawLooper* shadowLooper = | 83 SkBlurDrawLooper* shadowLooper = |
| 84 new SkBlurDrawLooper (SK_ColorBLUE, | 84 SkBlurDrawLooper::Create(SK_ColorBLUE, |
| 85 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar
(10)), | 85 SkBlurMask::ConvertRadiusToSigma(SkIntToSca
lar(10)), |
| 86 SkIntToScalar(5), SkIntToScalar(10), | 86 SkIntToScalar(5), SkIntToScalar(10), |
| 87 SkBlurDrawLooper::kIgnoreTransform_BlurFlag | | 87 SkBlurDrawLooper::kIgnoreTransform_BlurFlag
| |
| 88 SkBlurDrawLooper::kOverrideColor_BlurFlag | | 88 SkBlurDrawLooper::kOverrideColor_BlurFlag | |
| 89 SkBlurDrawLooper::kHighQuality_BlurFlag); | 89 SkBlurDrawLooper::kHighQuality_BlurFlag); |
| 90 SkAutoUnref aurL0(shadowLooper); | 90 SkAutoUnref aurL0(shadowLooper); |
| 91 p.setLooper(shadowLooper); | 91 p.setLooper(shadowLooper); |
| 92 fPaints.push_back(p); | 92 fPaints.push_back(p); |
| 93 } | 93 } |
| 94 | 94 |
| 95 { | 95 { |
| 96 // AA with stroke style | 96 // AA with stroke style |
| 97 SkPaint p; | 97 SkPaint p; |
| 98 p.setAntiAlias(true); | 98 p.setAntiAlias(true); |
| 99 p.setStyle(SkPaint::kStroke_Style); | 99 p.setStyle(SkPaint::kStroke_Style); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 SkTArray<SkPaint> fPaints; | 198 SkTArray<SkPaint> fPaints; |
| 199 SkTArray<SkMatrix> fMatrices; | 199 SkTArray<SkMatrix> fMatrices; |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 ////////////////////////////////////////////////////////////////////////////// | 202 ////////////////////////////////////////////////////////////////////////////// |
| 203 | 203 |
| 204 static GM* MyFactory(void*) { return new CircleGM; } | 204 static GM* MyFactory(void*) { return new CircleGM; } |
| 205 static GMRegistry reg(MyFactory); | 205 static GMRegistry reg(MyFactory); |
| 206 | 206 |
| 207 } | 207 } |
| OLD | NEW |