OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Intel Inc. | 2 * Copyright 2012 Intel 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 #include "gm.h" | 7 #include "gm.h" |
8 #include "SkBlurDrawLooper.h" | 8 #include "SkBlurDrawLooper.h" |
9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // AA | 44 // AA |
45 SkPaint p; | 45 SkPaint p; |
46 p.setAntiAlias(true); | 46 p.setAntiAlias(true); |
47 fPaints.push_back(p); | 47 fPaints.push_back(p); |
48 } | 48 } |
49 | 49 |
50 { | 50 { |
51 // AA with mask filter | 51 // AA with mask filter |
52 SkPaint p; | 52 SkPaint p; |
53 p.setAntiAlias(true); | 53 p.setAntiAlias(true); |
54 SkMaskFilter* mf = SkBlurMaskFilter::Create( | 54 p.setMaskFilter(SkBlurMaskFilter::Make( |
55 kNormal_SkBlurStyle, | 55 kNormal_SkBlurStyle, |
56 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)
), | 56 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)
), |
57 SkBlurMaskFilter::kHighQuality_BlurFlag); | 57 SkBlurMaskFilter::kHighQuality_BlurFlag)); |
58 p.setMaskFilter(mf)->unref(); | |
59 fPaints.push_back(p); | 58 fPaints.push_back(p); |
60 } | 59 } |
61 | 60 |
62 { | 61 { |
63 // AA with radial shader | 62 // AA with radial shader |
64 SkPaint p; | 63 SkPaint p; |
65 p.setAntiAlias(true); | 64 p.setAntiAlias(true); |
66 SkPoint center = SkPoint::Make(SkIntToScalar(40), SkIntToScalar(40)); | 65 SkPoint center = SkPoint::Make(SkIntToScalar(40), SkIntToScalar(40)); |
67 SkColor colors[] = { SK_ColorBLUE, SK_ColorRED, SK_ColorGREEN }; | 66 SkColor colors[] = { SK_ColorBLUE, SK_ColorRED, SK_ColorGREEN }; |
68 SkScalar pos[] = { 0, SK_ScalarHalf, SK_Scalar1 }; | 67 SkScalar pos[] = { 0, SK_ScalarHalf, SK_Scalar1 }; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 SkTArray<SkPaint> fPaints; | 200 SkTArray<SkPaint> fPaints; |
202 SkTArray<SkMatrix> fMatrices; | 201 SkTArray<SkMatrix> fMatrices; |
203 }; | 202 }; |
204 | 203 |
205 ////////////////////////////////////////////////////////////////////////////// | 204 ////////////////////////////////////////////////////////////////////////////// |
206 | 205 |
207 static GM* MyFactory(void*) { return new CircleGM; } | 206 static GM* MyFactory(void*) { return new CircleGM; } |
208 static GMRegistry reg(MyFactory); | 207 static GMRegistry reg(MyFactory); |
209 | 208 |
210 } | 209 } |
OLD | NEW |