OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "Test.h" | 8 #include "Test.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
11 #include "SkColorPriv.h" | 11 #include "SkColorPriv.h" |
12 #include "SkGradientShader.h" | 12 #include "SkGradientShader.h" |
13 #include "SkRect.h" | 13 #include "SkRect.h" |
14 | 14 |
15 static inline const char* boolStr(bool value) { | |
16 return value ? "true" : "false"; | |
17 } | |
18 | |
19 // these are in the same order as the SkBitmap::Config enum | 15 // these are in the same order as the SkBitmap::Config enum |
20 static const char* gConfigName[] = { | 16 static const char* gConfigName[] = { |
21 "None", "A1", "A8", "Index8", "565", "4444", "8888", "RLE_Index8" | 17 "None", "A1", "A8", "Index8", "565", "4444", "8888", "RLE_Index8" |
22 }; | 18 }; |
23 | 19 |
24 /** Returns -1 on success, else the x coord of the first bad pixel, return its | 20 /** Returns -1 on success, else the x coord of the first bad pixel, return its |
25 value in bad | 21 value in bad |
26 */ | 22 */ |
27 typedef int (*Proc)(const void*, int width, uint32_t expected, uint32_t* bad); | 23 typedef int (*Proc)(const void*, int width, uint32_t expected, uint32_t* bad); |
28 | 24 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 262 } |
267 } | 263 } |
268 | 264 |
269 static void TestBlitRow(skiatest::Reporter* reporter) { | 265 static void TestBlitRow(skiatest::Reporter* reporter) { |
270 test_00_FF(reporter); | 266 test_00_FF(reporter); |
271 test_diagonal(reporter); | 267 test_diagonal(reporter); |
272 } | 268 } |
273 | 269 |
274 #include "TestClassDef.h" | 270 #include "TestClassDef.h" |
275 DEFINE_TESTCLASS("BlitRow", TestBlitRowClass, TestBlitRow) | 271 DEFINE_TESTCLASS("BlitRow", TestBlitRowClass, TestBlitRow) |
OLD | NEW |