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 | 9 |
10 #include "Sk2DPathEffect.h" | 10 #include "Sk2DPathEffect.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 SkXfermode::Mode fMode; | 54 SkXfermode::Mode fMode; |
55 SkColor fColor; | 55 SkColor fColor; |
56 SkPaint::Style fStyle; | 56 SkPaint::Style fStyle; |
57 SkScalar fWidth; | 57 SkScalar fWidth; |
58 SkScalar fOffset; | 58 SkScalar fOffset; |
59 SkScalar fSkewX; | 59 SkScalar fSkewX; |
60 bool fEffect; | 60 bool fEffect; |
61 }; | 61 }; |
62 | 62 |
63 static void mask_filter(SkPaint* paint) { | 63 static void mask_filter(SkPaint* paint) { |
64 SkMaskFilter* mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle, | 64 paint->setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, |
65 SkBlurMask::ConvertRadiusToSigma(3.f)); | 65 SkBlurMask::ConvertRadiusToSigma
(3.f))); |
66 paint->setMaskFilter(mf)->unref(); | |
67 } | 66 } |
68 | 67 |
69 static sk_sp<SkPathEffect> make_tile_effect() { | 68 static sk_sp<SkPathEffect> make_tile_effect() { |
70 SkMatrix m; | 69 SkMatrix m; |
71 m.setScale(1.f, 1.f); | 70 m.setScale(1.f, 1.f); |
72 | 71 |
73 SkPath path; | 72 SkPath path; |
74 path.addCircle(0, 0, SkIntToScalar(5)); | 73 path.addCircle(0, 0, SkIntToScalar(5)); |
75 | 74 |
76 return SkPath2DPathEffect::Make(m, path); | 75 return SkPath2DPathEffect::Make(m, path); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 SkAutoTUnref<const SkTextBlob> fBlob; | 248 SkAutoTUnref<const SkTextBlob> fBlob; |
250 SkTArray<sk_sp<SkDrawLooper>, true> fLoopers; | 249 SkTArray<sk_sp<SkDrawLooper>, true> fLoopers; |
251 | 250 |
252 typedef GM INHERITED; | 251 typedef GM INHERITED; |
253 }; | 252 }; |
254 | 253 |
255 ////////////////////////////////////////////////////////////////////////////// | 254 ////////////////////////////////////////////////////////////////////////////// |
256 | 255 |
257 DEF_GM(return new TextBlobLooperGM;) | 256 DEF_GM(return new TextBlobLooperGM;) |
258 } | 257 } |
OLD | NEW |