OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 static sk_sp<SkImageFilter> make1() { | 28 static sk_sp<SkImageFilter> make1() { |
29 return SkOffsetImageFilter::Make(SkIntToScalar(16), SkIntToScalar(16), nullp
tr); | 29 return SkOffsetImageFilter::Make(SkIntToScalar(16), SkIntToScalar(16), nullp
tr); |
30 } | 30 } |
31 | 31 |
32 static sk_sp<SkImageFilter> make2() { | 32 static sk_sp<SkImageFilter> make2() { |
33 sk_sp<SkColorFilter> cf(SkColorFilter::MakeModeFilter(SK_ColorBLUE, SkXfermo
de::kSrcIn_Mode)); | 33 sk_sp<SkColorFilter> cf(SkColorFilter::MakeModeFilter(SK_ColorBLUE, SkXfermo
de::kSrcIn_Mode)); |
34 return sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.get())); | 34 return sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.get())); |
35 } | 35 } |
36 | 36 |
37 static sk_sp<SkImageFilter> make3() { | 37 static sk_sp<SkImageFilter> make3() { |
38 return sk_sp<SkImageFilter>(SkBlurImageFilter::Create(8, 0)); | 38 return SkBlurImageFilter::Make(8, 0, nullptr); |
39 } | 39 } |
40 | 40 |
41 static sk_sp<SkImageFilter> make4() { | 41 static sk_sp<SkImageFilter> make4() { |
42 sk_sp<SkImageFilter> outer(SkOffsetImageFilter::Make(SkIntToScalar(16), | 42 sk_sp<SkImageFilter> outer(SkOffsetImageFilter::Make(SkIntToScalar(16), |
43 SkIntToScalar(16), | 43 SkIntToScalar(16), |
44 nullptr)); | 44 nullptr)); |
45 sk_sp<SkImageFilter> inner(SkDownSampleImageFilter::Create(SK_Scalar1 / 5)); | 45 sk_sp<SkImageFilter> inner(SkDownSampleImageFilter::Create(SK_Scalar1 / 5)); |
46 return SkComposeImageFilter::Make(std::move(outer), std::move(inner)); | 46 return SkComposeImageFilter::Make(std::move(outer), std::move(inner)); |
47 } | 47 } |
48 | 48 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 private: | 136 private: |
137 typedef GM INHERITED; | 137 typedef GM INHERITED; |
138 }; | 138 }; |
139 | 139 |
140 ////////////////////////////////////////////////////////////////////////////// | 140 ////////////////////////////////////////////////////////////////////////////// |
141 | 141 |
142 DEF_GM( return new TestImageFiltersGM; ) | 142 DEF_GM( return new TestImageFiltersGM; ) |
OLD | NEW |