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 "Test.h" | |
9 #include "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
10 #include "SkColorShader.h" | 9 #include "SkColorShader.h" |
11 #include "SkEmptyShader.h" | 10 #include "SkEmptyShader.h" |
12 #include "SkGradientShader.h" | 11 #include "SkGradientShader.h" |
13 #include "SkShader.h" | 12 #include "SkShader.h" |
14 #include "SkTemplates.h" | 13 #include "SkTemplates.h" |
| 14 #include "Test.h" |
15 | 15 |
16 struct GradRec { | 16 struct GradRec { |
17 int fColorCount; | 17 int fColorCount; |
18 const SkColor* fColors; | 18 const SkColor* fColors; |
19 const SkScalar* fPos; | 19 const SkScalar* fPos; |
20 const SkPoint* fPoint; // 2 | 20 const SkPoint* fPoint; // 2 |
21 const SkScalar* fRadius; // 2 | 21 const SkScalar* fRadius; // 2 |
22 SkShader::TileMode fTileMode; | 22 SkShader::TileMode fTileMode; |
23 | 23 |
24 void gradCheck(skiatest::Reporter* reporter, SkShader* shader, | 24 void gradCheck(skiatest::Reporter* reporter, SkShader* shader, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 for (size_t i = 0; i < SK_ARRAY_COUNT(gProcs); ++i) { | 190 for (size_t i = 0; i < SK_ARRAY_COUNT(gProcs); ++i) { |
191 gProcs[i](reporter, rec); | 191 gProcs[i](reporter, rec); |
192 } | 192 } |
193 } | 193 } |
194 | 194 |
195 DEF_TEST(Gradient, reporter) { | 195 DEF_TEST(Gradient, reporter) { |
196 TestGradientShaders(reporter); | 196 TestGradientShaders(reporter); |
197 TestConstantGradient(reporter); | 197 TestConstantGradient(reporter); |
198 } | 198 } |
OLD | NEW |