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" | 8 #include "Test.h" |
9 #include "SkAAClip.h" | 9 #include "SkAAClip.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 case SkMask::k3D_Format: | 32 case SkMask::k3D_Format: |
33 break; | 33 break; |
34 case SkMask::kLCD16_Format: | 34 case SkMask::kLCD16_Format: |
35 wbytes <<= 1; | 35 wbytes <<= 1; |
36 break; | 36 break; |
37 case SkMask::kLCD32_Format: | 37 case SkMask::kLCD32_Format: |
38 case SkMask::kARGB32_Format: | 38 case SkMask::kARGB32_Format: |
39 wbytes <<= 2; | 39 wbytes <<= 2; |
40 break; | 40 break; |
41 default: | 41 default: |
42 SkASSERT(!"unknown mask format"); | 42 SkDEBUGFAIL("unknown mask format"); |
43 return false; | 43 return false; |
44 } | 44 } |
45 | 45 |
46 const int h = a.fBounds.height(); | 46 const int h = a.fBounds.height(); |
47 const char* aptr = (const char*)a.fImage; | 47 const char* aptr = (const char*)a.fImage; |
48 const char* bptr = (const char*)b.fImage; | 48 const char* bptr = (const char*)b.fImage; |
49 for (int y = 0; y < h; ++y) { | 49 for (int y = 0; y < h; ++y) { |
50 if (memcmp(aptr, bptr, wbytes)) { | 50 if (memcmp(aptr, bptr, wbytes)) { |
51 return false; | 51 return false; |
52 } | 52 } |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 test_path_bounds(reporter); | 399 test_path_bounds(reporter); |
400 test_irect(reporter); | 400 test_irect(reporter); |
401 test_rgn(reporter); | 401 test_rgn(reporter); |
402 test_path_with_hole(reporter); | 402 test_path_with_hole(reporter); |
403 test_regressions(); | 403 test_regressions(); |
404 test_nearly_integral(reporter); | 404 test_nearly_integral(reporter); |
405 } | 405 } |
406 | 406 |
407 #include "TestClassDef.h" | 407 #include "TestClassDef.h" |
408 DEFINE_TESTCLASS("AAClip", AAClipTestClass, TestAAClip) | 408 DEFINE_TESTCLASS("AAClip", AAClipTestClass, TestAAClip) |
OLD | NEW |