OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "PathOpsQuadIntersectionTestData.h" | 7 #include "PathOpsQuadIntersectionTestData.h" |
8 #include "SkIntersections.h" | 8 #include "SkIntersections.h" |
9 #include "SkPathOpsRect.h" | 9 #include "SkPathOpsRect.h" |
10 #include "SkReduceOrder.h" | 10 #include "SkReduceOrder.h" |
11 #include "Test.h" | 11 #include "Test.h" |
12 #include "TestClassDef.h" | |
13 | 12 |
14 static const SkDQuad testSet[] = { | 13 static const SkDQuad testSet[] = { |
15 {{{1, 1}, {2, 2}, {1, 1.000003}}}, | 14 {{{1, 1}, {2, 2}, {1, 1.000003}}}, |
16 {{{1, 0}, {2, 6}, {3, 0}}} | 15 {{{1, 0}, {2, 6}, {3, 0}}} |
17 }; | 16 }; |
18 | 17 |
19 static const size_t testSetCount = SK_ARRAY_COUNT(testSet); | 18 static const size_t testSetCount = SK_ARRAY_COUNT(testSet); |
20 | 19 |
21 static void oneOffTest(skiatest::Reporter* reporter) { | 20 static void oneOffTest(skiatest::Reporter* reporter) { |
22 for (size_t index = 0; index < testSetCount; ++index) { | 21 for (size_t index = 0; index < testSetCount; ++index) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 if (order != 3) { | 59 if (order != 3) { |
61 SkDebugf("[%d] line mod quad order=%d\n", (int) index, order); | 60 SkDebugf("[%d] line mod quad order=%d\n", (int) index, order); |
62 } | 61 } |
63 } | 62 } |
64 } | 63 } |
65 | 64 |
66 DEF_TEST(PathOpsReduceOrderQuad, reporter) { | 65 DEF_TEST(PathOpsReduceOrderQuad, reporter) { |
67 oneOffTest(reporter); | 66 oneOffTest(reporter); |
68 standardTestCases(reporter); | 67 standardTestCases(reporter); |
69 } | 68 } |
OLD | NEW |