OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "sk_tool_utils.h" | 8 #include "sk_tool_utils.h" |
9 #include "SkBlurImageFilter.h" | 9 #include "SkBlurImageFilter.h" |
10 #include "SkColor.h" | 10 #include "SkColor.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 SkDropShadowImageFilter::Create(SkIntToScalar(10), SkIntToScalar(10)
, | 101 SkDropShadowImageFilter::Create(SkIntToScalar(10), SkIntToScalar(10)
, |
102 SkIntToScalar(3), SkIntToScalar(3), SK_ColorGREEN, | 102 SkIntToScalar(3), SkIntToScalar(3), SK_ColorGREEN, |
103 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode), | 103 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode), |
104 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS
electorType, | 104 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS
electorType, |
105 SkDisplacementMapEffect::kR_ChannelS
electorType, | 105 SkDisplacementMapEffect::kR_ChannelS
electorType, |
106 SkIntToScalar(12), | 106 SkIntToScalar(12), |
107 gradient.get(), | 107 gradient.get(), |
108 checkerboard.get()), | 108 checkerboard.get()), |
109 SkDilateImageFilter::Create(2, 2, checkerboard.get()), | 109 SkDilateImageFilter::Create(2, 2, checkerboard.get()), |
110 SkErodeImageFilter::Create(2, 2, checkerboard.get()), | 110 SkErodeImageFilter::Create(2, 2, checkerboard.get()), |
111 SkOffsetImageFilter::Create(SkIntToScalar(-16), SkIntToScalar(32)), | 111 SkOffsetImageFilter::Make(SkIntToScalar(-16), |
| 112 SkIntToScalar(32), |
| 113 nullptr).release(), |
112 SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQualit
y), | 114 SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQualit
y), |
113 SkLightingImageFilter::CreatePointLitDiffuse(pointLocation, SK_Color
WHITE, SK_Scalar1, SkIntToScalar(2), checkerboard.get()), | 115 SkLightingImageFilter::CreatePointLitDiffuse(pointLocation, SK_Color
WHITE, SK_Scalar1, SkIntToScalar(2), checkerboard.get()), |
114 | 116 |
115 }; | 117 }; |
116 | 118 |
117 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); | 119 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); |
118 SkScalar margin = SkIntToScalar(16); | 120 SkScalar margin = SkIntToScalar(16); |
119 SkRect bounds = r; | 121 SkRect bounds = r; |
120 bounds.outset(margin, margin); | 122 bounds.outset(margin, margin); |
121 | 123 |
(...skipping 28 matching lines...) Expand all Loading... |
150 private: | 152 private: |
151 sk_sp<SkImage> fCheckerboard, fGradientCircle; | 153 sk_sp<SkImage> fCheckerboard, fGradientCircle; |
152 | 154 |
153 typedef GM INHERITED; | 155 typedef GM INHERITED; |
154 }; | 156 }; |
155 | 157 |
156 ////////////////////////////////////////////////////////////////////////////// | 158 ////////////////////////////////////////////////////////////////////////////// |
157 | 159 |
158 DEF_GM(return new ImageFiltersClippedGM;) | 160 DEF_GM(return new ImageFiltersClippedGM;) |
159 } | 161 } |
OLD | NEW |