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" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 REPORTER_ASSERT(state.fReporter, data); | 77 REPORTER_ASSERT(state.fReporter, data); |
78 int ax = state.fA & 0x03; | 78 int ax = state.fA & 0x03; |
79 int ay = state.fA >> 2; | 79 int ay = state.fA >> 2; |
80 int bx = state.fB & 0x03; | 80 int bx = state.fB & 0x03; |
81 int by = state.fB >> 2; | 81 int by = state.fB >> 2; |
82 int cx = state.fC & 0x03; | 82 int cx = state.fC & 0x03; |
83 int cy = state.fC >> 2; | 83 int cy = state.fC >> 2; |
84 SkDQuad quad = {{{(double) ax, (double) ay}, {(double) bx, (double) by}, | 84 SkDQuad quad = {{{(double) ax, (double) ay}, {(double) bx, (double) by}, |
85 {(double) cx, (double) cy}}}; | 85 {(double) cx, (double) cy}}}; |
86 SkReduceOrder reducer; | 86 SkReduceOrder reducer; |
87 int order = reducer.reduce(quad, SkReduceOrder::kFill_Style); | 87 int order = reducer.reduce(quad); |
88 if (order < 3) { | 88 if (order < 3) { |
89 return; | 89 return; |
90 } | 90 } |
91 for (int tIndex = 0; tIndex <= 4; ++tIndex) { | 91 for (int tIndex = 0; tIndex <= 4; ++tIndex) { |
92 SkDPoint xy = quad.ptAtT(tIndex / 4.0); | 92 SkDPoint xy = quad.ptAtT(tIndex / 4.0); |
93 for (int h = -2; h <= 2; ++h) { | 93 for (int h = -2; h <= 2; ++h) { |
94 for (int v = -2; v <= 2; ++v) { | 94 for (int v = -2; v <= 2; ++v) { |
95 if (h == v && abs(h) != 1) { | 95 if (h == v && abs(h) != 1) { |
96 continue; | 96 continue; |
97 } | 97 } |
(...skipping 25 matching lines...) Expand all Loading... |
123 } | 123 } |
124 if (!reporter->allowExtendedTest()) goto finish; | 124 if (!reporter->allowExtendedTest()) goto finish; |
125 } | 125 } |
126 } | 126 } |
127 finish: | 127 finish: |
128 testRunner.render(); | 128 testRunner.render(); |
129 } | 129 } |
130 | 130 |
131 #include "TestClassDef.h" | 131 #include "TestClassDef.h" |
132 DEFINE_TESTCLASS_SHORT(PathOpsQuadLineIntersectionThreadedTest) | 132 DEFINE_TESTCLASS_SHORT(PathOpsQuadLineIntersectionThreadedTest) |
OLD | NEW |