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 "SkColor.h" | 9 #include "SkColor.h" |
10 #include "SkBitmapSource.h" | 10 #include "SkBitmapSource.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 SkScalar cutoffAngle = SkIntToScalar(15); | 103 SkScalar cutoffAngle = SkIntToScalar(15); |
104 SkScalar kd = SkIntToScalar(2); | 104 SkScalar kd = SkIntToScalar(2); |
105 SkScalar surfaceScale = SkIntToScalar(1); | 105 SkScalar surfaceScale = SkIntToScalar(1); |
106 SkColor white(0xFFFFFFFF); | 106 SkColor white(0xFFFFFFFF); |
107 SkMatrix resizeMatrix; | 107 SkMatrix resizeMatrix; |
108 resizeMatrix.setScale(RESIZE_FACTOR, RESIZE_FACTOR); | 108 resizeMatrix.setScale(RESIZE_FACTOR, RESIZE_FACTOR); |
109 | 109 |
110 SkImageFilter* filters[] = { | 110 SkImageFilter* filters[] = { |
111 SkBlurImageFilter::Create(SkIntToScalar(4), SkIntToScalar(4)), | 111 SkBlurImageFilter::Create(SkIntToScalar(4), SkIntToScalar(4)), |
112 SkDropShadowImageFilter::Create(SkIntToScalar(5), SkIntToScalar(10), | 112 SkDropShadowImageFilter::Create(SkIntToScalar(5), SkIntToScalar(10), |
113 SkIntToScalar(3), SkIntToScalar(3), | 113 SkIntToScalar(3), SkIntToScalar(3), SK_ColorYELLOW, |
114 SK_ColorYELLOW), | 114 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode), |
115 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS
electorType, | 115 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS
electorType, |
116 SkDisplacementMapEffect::kR_ChannelS
electorType, | 116 SkDisplacementMapEffect::kR_ChannelS
electorType, |
117 SkIntToScalar(12), | 117 SkIntToScalar(12), |
118 gradient.get(), | 118 gradient.get(), |
119 checkerboard.get()), | 119 checkerboard.get()), |
120 SkDilateImageFilter::Create(1, 1, checkerboard.get()), | 120 SkDilateImageFilter::Create(1, 1, checkerboard.get()), |
121 SkErodeImageFilter::Create(1, 1, checkerboard.get()), | 121 SkErodeImageFilter::Create(1, 1, checkerboard.get()), |
122 SkOffsetImageFilter::Create(SkIntToScalar(32), 0), | 122 SkOffsetImageFilter::Create(SkIntToScalar(32), 0), |
123 SkMatrixImageFilter::Create(resizeMatrix, SkPaint::kNone_FilterLevel
), | 123 SkMatrixImageFilter::Create(resizeMatrix, SkPaint::kNone_FilterLevel
), |
124 SkRectShaderImageFilter::Create(noise), | 124 SkRectShaderImageFilter::Create(noise), |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 SkBitmap fGradientCircle; | 175 SkBitmap fGradientCircle; |
176 typedef GM INHERITED; | 176 typedef GM INHERITED; |
177 }; | 177 }; |
178 | 178 |
179 ////////////////////////////////////////////////////////////////////////////// | 179 ////////////////////////////////////////////////////////////////////////////// |
180 | 180 |
181 static GM* MyFactory(void*) { return new ImageFiltersScaledGM; } | 181 static GM* MyFactory(void*) { return new ImageFiltersScaledGM; } |
182 static GMRegistry reg(MyFactory); | 182 static GMRegistry reg(MyFactory); |
183 | 183 |
184 } | 184 } |
OLD | NEW |