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 "gm.h" | 8 #include "gm.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 SkIntToScalar(10), | 100 SkIntToScalar(10), |
101 SkIntToScalar(10), | 101 SkIntToScalar(10), |
102 SkIntToScalar(3), | 102 SkIntToScalar(3), |
103 SkIntToScalar(3), | 103 SkIntToScalar(3), |
104 SK_ColorBLUE, | 104 SK_ColorBLUE, |
105 SkDropShadowImageFilter::kDrawShadowAndForeg
round_ShadowMode, | 105 SkDropShadowImageFilter::kDrawShadowAndForeg
round_ShadowMode, |
106 noopCropped, | 106 noopCropped, |
107 &bigRect)); | 107 &bigRect)); |
108 | 108 |
109 Draw(canvas, checkerboard, rect, | 109 Draw(canvas, checkerboard, rect, |
110 SkDisplacementMapEffect::Make(SkDisplacementMapEffect::kR_Chann
elSelectorType, | 110 sk_sp<SkImageFilter>(SkDisplacementMapEffect::Create( |
111 SkDisplacementMapEffect::kR_Chann
elSelectorType, | 111 SkDisplacementMapEffect::kR_Chan
nelSelectorType, |
112 SkIntToScalar(12), | 112 SkDisplacementMapEffect::kR_Chan
nelSelectorType, |
113 std::move(gradientCircleSource), | 113 SkIntToScalar(12), |
114 noopCropped, | 114 gradientCircleSource.get(), |
115 &bigRect)); | 115 noopCropped.get(), |
| 116 &bigRect))); |
116 | 117 |
117 Draw(canvas, checkerboard, rect, | 118 Draw(canvas, checkerboard, rect, |
118 SkOffsetImageFilter::Make(SkIntToScalar(-8), SkIntToScalar(16), | 119 SkOffsetImageFilter::Make(SkIntToScalar(-8), SkIntToScalar(16), |
119 noopCropped, | 120 noopCropped, |
120 &bigRect)); | 121 &bigRect)); |
121 | 122 |
122 Draw(canvas, checkerboard, rect, | 123 Draw(canvas, checkerboard, rect, |
123 SkLightingImageFilter::MakePointLitDiffuse(pointLocation, | 124 SkLightingImageFilter::MakePointLitDiffuse(pointLocation, |
124 SK_ColorWHITE, | 125 SK_ColorWHITE, |
125 surfaceScale, | 126 surfaceScale, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 188 |
188 canvas->translate(SkIntToScalar(80), 0); | 189 canvas->translate(SkIntToScalar(80), 0); |
189 } | 190 } |
190 | 191 |
191 typedef GM INHERITED; | 192 typedef GM INHERITED; |
192 }; | 193 }; |
193 | 194 |
194 /////////////////////////////////////////////////////////////////////////////// | 195 /////////////////////////////////////////////////////////////////////////////// |
195 | 196 |
196 DEF_GM( return new ImageFiltersCropExpandGM; ) | 197 DEF_GM( return new ImageFiltersCropExpandGM; ) |
OLD | NEW |