| 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 SK_ARRAY_COUNT(colors), | 74 SK_ARRAY_COUNT(colors), |
| 75 SkShader::kClamp_TileMode); | 75 SkShader::kClamp_TileMode); |
| 76 p.setShader(s)->unref(); | 76 p.setShader(s)->unref(); |
| 77 fPaints.push_back(p); | 77 fPaints.push_back(p); |
| 78 } | 78 } |
| 79 | 79 |
| 80 { | 80 { |
| 81 // AA with blur | 81 // AA with blur |
| 82 SkPaint p; | 82 SkPaint p; |
| 83 p.setAntiAlias(true); | 83 p.setAntiAlias(true); |
| 84 SkBlurDrawLooper* shadowLooper = | 84 SkDrawLooper* shadowLooper = |
| 85 SkBlurDrawLooper::Create(SK_ColorBLUE, | 85 SkBlurDrawLooper::Create(SK_ColorBLUE, |
| 86 SkBlurMask::ConvertRadiusToSigma(SkIntToSca
lar(10)), | 86 SkBlurMask::ConvertRadiusToSigma(SkIntToSca
lar(10)), |
| 87 SkIntToScalar(5), SkIntToScalar(10), | 87 SkIntToScalar(5), SkIntToScalar(10), |
| 88 SkBlurDrawLooper::kIgnoreTransform_BlurFlag
| | 88 SkBlurDrawLooper::kIgnoreTransform_BlurFlag
| |
| 89 SkBlurDrawLooper::kOverrideColor_BlurFlag | | 89 SkBlurDrawLooper::kOverrideColor_BlurFlag | |
| 90 SkBlurDrawLooper::kHighQuality_BlurFlag); | 90 SkBlurDrawLooper::kHighQuality_BlurFlag); |
| 91 SkAutoUnref aurL0(shadowLooper); | 91 SkAutoUnref aurL0(shadowLooper); |
| 92 p.setLooper(shadowLooper); | 92 p.setLooper(shadowLooper); |
| 93 fPaints.push_back(p); | 93 fPaints.push_back(p); |
| 94 } | 94 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 SkTArray<SkPaint> fPaints; | 210 SkTArray<SkPaint> fPaints; |
| 211 SkTArray<SkMatrix> fMatrices; | 211 SkTArray<SkMatrix> fMatrices; |
| 212 }; | 212 }; |
| 213 | 213 |
| 214 ////////////////////////////////////////////////////////////////////////////// | 214 ////////////////////////////////////////////////////////////////////////////// |
| 215 | 215 |
| 216 static GM* MyFactory(void*) { return new CircleGM; } | 216 static GM* MyFactory(void*) { return new CircleGM; } |
| 217 static GMRegistry reg(MyFactory); | 217 static GMRegistry reg(MyFactory); |
| 218 | 218 |
| 219 } | 219 } |
| OLD | NEW |