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 "PathOpsExtendedTest.h" | 7 #include "PathOpsExtendedTest.h" |
8 #include "PathOpsThreadedCommon.h" | 8 #include "PathOpsThreadedCommon.h" |
9 #include "SkIntersections.h" | 9 #include "SkIntersections.h" |
10 #include "SkPathOpsLine.h" | 10 #include "SkPathOpsLine.h" |
11 #include "SkPathOpsQuad.h" | 11 #include "SkPathOpsQuad.h" |
12 #include "SkReduceOrder.h" | 12 #include "SkReduceOrder.h" |
13 #include "TestClassDef.h" | |
14 | 13 |
15 static int doIntersect(SkIntersections& intersections, const SkDQuad& quad, cons
t SkDLine& line, | 14 static int doIntersect(SkIntersections& intersections, const SkDQuad& quad, cons
t SkDLine& line, |
16 bool& flipped) { | 15 bool& flipped) { |
17 int result; | 16 int result; |
18 flipped = false; | 17 flipped = false; |
19 if (line[0].fX == line[1].fX) { | 18 if (line[0].fX == line[1].fX) { |
20 double top = line[0].fY; | 19 double top = line[0].fY; |
21 double bottom = line[1].fY; | 20 double bottom = line[1].fY; |
22 flipped = top > bottom; | 21 flipped = top > bottom; |
23 if (flipped) { | 22 if (flipped) { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 for (int c = 0 ; c < 16; ++c) { | 119 for (int c = 0 ; c < 16; ++c) { |
121 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, | 120 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, |
122 (&testQuadLineIntersectMain, a, b, c, 0, &testRunner
)); | 121 (&testQuadLineIntersectMain, a, b, c, 0, &testRunner
)); |
123 } | 122 } |
124 if (!reporter->allowExtendedTest()) goto finish; | 123 if (!reporter->allowExtendedTest()) goto finish; |
125 } | 124 } |
126 } | 125 } |
127 finish: | 126 finish: |
128 testRunner.render(); | 127 testRunner.render(); |
129 } | 128 } |
OLD | NEW |