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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode), | 106 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode), |
107 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS
electorType, | 107 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS
electorType, |
108 SkDisplacementMapEffect::kR_ChannelS
electorType, | 108 SkDisplacementMapEffect::kR_ChannelS
electorType, |
109 SkIntToScalar(12), | 109 SkIntToScalar(12), |
110 gradient.get(), | 110 gradient.get(), |
111 checkerboard.get()), | 111 checkerboard.get()), |
112 SkDilateImageFilter::Create(2, 2, checkerboard.get()), | 112 SkDilateImageFilter::Create(2, 2, checkerboard.get()), |
113 SkErodeImageFilter::Create(2, 2, checkerboard.get()), | 113 SkErodeImageFilter::Create(2, 2, checkerboard.get()), |
114 SkOffsetImageFilter::Create(SkIntToScalar(-16), SkIntToScalar(32)), | 114 SkOffsetImageFilter::Create(SkIntToScalar(-16), SkIntToScalar(32)), |
115 SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQualit
y), | 115 SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQualit
y), |
116 SkLightingImageFilter::CreatePointLitDiffuse(pointLocation, SK_Color
WHITE, SK_Scalar1, SkIntToScalar(2), checkerboard.get()), | 116 SkLightingImageFilter::CreatePointLitDiffuse(pointLocation, SK_Color
WHITE, SK_Scalar1, SkIntToScalar(2), checkerboard.get(), NULL), |
117 | 117 |
118 }; | 118 }; |
119 | 119 |
120 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); | 120 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); |
121 SkScalar margin = SkIntToScalar(16); | 121 SkScalar margin = SkIntToScalar(16); |
122 SkRect bounds = r; | 122 SkRect bounds = r; |
123 bounds.outset(margin, margin); | 123 bounds.outset(margin, margin); |
124 | 124 |
125 canvas->save(); | 125 canvas->save(); |
126 for (int xOffset = 0; xOffset < 80; xOffset += 16) { | 126 for (int xOffset = 0; xOffset < 80; xOffset += 16) { |
(...skipping 24 matching lines...) Expand all Loading... |
151 private: | 151 private: |
152 SkAutoTUnref<SkImage> fCheckerboard, fGradientCircle; | 152 SkAutoTUnref<SkImage> fCheckerboard, fGradientCircle; |
153 | 153 |
154 typedef GM INHERITED; | 154 typedef GM INHERITED; |
155 }; | 155 }; |
156 | 156 |
157 ////////////////////////////////////////////////////////////////////////////// | 157 ////////////////////////////////////////////////////////////////////////////// |
158 | 158 |
159 DEF_GM(return new ImageFiltersClippedGM;) | 159 DEF_GM(return new ImageFiltersClippedGM;) |
160 } | 160 } |
OLD | NEW |