blob: 88547a0f04b741ab1142ab22c477b75d22ba549c [file] [log] [blame]
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7#include "PathOpsExtendedTest.h"
8
9#define TEST(name) { name, #name }
10
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000011static void testLine1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +000012 SkPath path;
13 path.moveTo(2,0);
14 path.lineTo(1,1);
15 path.lineTo(0,0);
16 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000017 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +000018}
19
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000020static void testLine1x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +000021 SkPath path;
22 path.setFillType(SkPath::kEvenOdd_FillType);
23 path.moveTo(2,0);
24 path.lineTo(1,1);
25 path.lineTo(0,0);
26 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000027 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +000028}
29
30static void addInnerCWTriangle(SkPath& path) {
31 path.moveTo(3,0);
32 path.lineTo(4,1);
33 path.lineTo(2,1);
34 path.close();
35}
36
37static void addInnerCCWTriangle(SkPath& path) {
38 path.moveTo(3,0);
39 path.lineTo(2,1);
40 path.lineTo(4,1);
41 path.close();
42}
43
44static void addOuterCWTriangle(SkPath& path) {
45 path.moveTo(3,0);
46 path.lineTo(6,2);
47 path.lineTo(0,2);
48 path.close();
49}
50
51static void addOuterCCWTriangle(SkPath& path) {
52 path.moveTo(3,0);
53 path.lineTo(0,2);
54 path.lineTo(6,2);
55 path.close();
56}
57
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000058static void testLine2(skiatest::Reporter* reporter, const char* filename) {
59 SkPath path;
60 addInnerCWTriangle(path);
61 addOuterCWTriangle(path);
62 testSimplify(reporter, path, filename);
63}
64
65static void testLine2x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +000066 SkPath path;
67 path.setFillType(SkPath::kEvenOdd_FillType);
68 addInnerCWTriangle(path);
69 addOuterCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000070 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +000071}
72
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000073static void testLine3(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +000074 SkPath path;
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000075 addInnerCCWTriangle(path);
caryclark@google.com818b0cc2013-04-08 11:50:46 +000076 addOuterCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000077 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +000078}
79
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000080static void testLine3x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +000081 SkPath path;
82 path.setFillType(SkPath::kEvenOdd_FillType);
83 addInnerCCWTriangle(path);
84 addOuterCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000085 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +000086}
87
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000088static void testLine3a(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +000089 SkPath path;
90 addInnerCWTriangle(path);
91 addOuterCCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000092 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +000093}
94
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000095static void testLine3ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +000096 SkPath path;
97 path.setFillType(SkPath::kEvenOdd_FillType);
98 addInnerCWTriangle(path);
99 addOuterCCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000100 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000101}
102
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000103static void testLine3b(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000104 SkPath path;
105 addInnerCCWTriangle(path);
106 addOuterCCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000107 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000108}
109
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000110static void testLine3bx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000111 SkPath path;
112 path.setFillType(SkPath::kEvenOdd_FillType);
113 addInnerCCWTriangle(path);
114 addOuterCCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000115 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000116}
117
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000118static void testLine4(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000119 SkPath path;
120 addOuterCCWTriangle(path);
121 addOuterCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000122 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000123}
124
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000125static void testLine4x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000126 SkPath path;
127 path.setFillType(SkPath::kEvenOdd_FillType);
128 addOuterCCWTriangle(path);
129 addOuterCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000130 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000131}
132
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000133static void testLine5(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000134 SkPath path;
135 addOuterCWTriangle(path);
136 addOuterCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000137 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000138}
139
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000140static void testLine5x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000141 SkPath path;
142 path.setFillType(SkPath::kEvenOdd_FillType);
143 addOuterCWTriangle(path);
144 addOuterCWTriangle(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000145 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000146}
147
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000148static void testLine6(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000149 SkPath path;
150 path.moveTo(0,0);
151 path.lineTo(4,0);
152 path.lineTo(2,2);
153 path.close();
154 path.moveTo(2,0);
155 path.lineTo(6,0);
156 path.lineTo(4,2);
157 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000158 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000159}
160
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000161static void testLine6x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000162 SkPath path;
163 path.setFillType(SkPath::kEvenOdd_FillType);
164 path.moveTo(0,0);
165 path.lineTo(4,0);
166 path.lineTo(2,2);
167 path.close();
168 path.moveTo(2,0);
169 path.lineTo(6,0);
170 path.lineTo(4,2);
171 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000172 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000173}
174
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000175static void testLine7(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000176 SkPath path;
177 path.moveTo(0,0);
178 path.lineTo(4,0);
179 path.lineTo(2,2);
180 path.close();
181 path.moveTo(6,0);
182 path.lineTo(2,0);
183 path.lineTo(4,2);
184 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000185 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000186}
187
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000188static void testLine7x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000189 SkPath path;
190 path.setFillType(SkPath::kEvenOdd_FillType);
191 path.moveTo(0,0);
192 path.lineTo(4,0);
193 path.lineTo(2,2);
194 path.close();
195 path.moveTo(6,0);
196 path.lineTo(2,0);
197 path.lineTo(4,2);
198 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000199 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000200}
201
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000202static void testLine7a(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000203 SkPath path;
204 path.moveTo(0,0);
205 path.lineTo(4,0);
206 path.lineTo(2,2);
207 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000208 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000209}
210
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000211static void testLine7ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000212 SkPath path;
213 path.setFillType(SkPath::kEvenOdd_FillType);
214 path.moveTo(0,0);
215 path.lineTo(4,0);
216 path.lineTo(2,2);
217 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000218 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000219}
220
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000221static void testLine7b(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000222 SkPath path;
223 path.moveTo(0,0);
224 path.lineTo(4,0);
225 path.close();
226 path.moveTo(6,0);
227 path.lineTo(2,0);
228 path.lineTo(4,2);
229 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000230 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000231}
232
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000233static void testLine7bx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000234 SkPath path;
235 path.setFillType(SkPath::kEvenOdd_FillType);
236 path.moveTo(0,0);
237 path.lineTo(4,0);
238 path.close();
239 path.moveTo(6,0);
240 path.lineTo(2,0);
241 path.lineTo(4,2);
242 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000243 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000244}
245
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000246static void testLine8(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000247 SkPath path;
248 path.moveTo(0,4);
249 path.lineTo(4,4);
250 path.lineTo(2,2);
251 path.close();
252 path.moveTo(2,4);
253 path.lineTo(6,4);
254 path.lineTo(4,2);
255 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000256 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000257}
258
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000259static void testLine8x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000260 SkPath path;
261 path.setFillType(SkPath::kEvenOdd_FillType);
262 path.moveTo(0,4);
263 path.lineTo(4,4);
264 path.lineTo(2,2);
265 path.close();
266 path.moveTo(2,4);
267 path.lineTo(6,4);
268 path.lineTo(4,2);
269 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000270 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000271}
272
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000273static void testLine9(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000274 SkPath path;
275 path.moveTo(0,4);
276 path.lineTo(4,4);
277 path.lineTo(2,2);
278 path.close();
279 path.moveTo(6,4);
280 path.lineTo(2,4);
281 path.lineTo(4,2);
282 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000283 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000284}
285
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000286static void testLine9x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000287 SkPath path;
288 path.setFillType(SkPath::kEvenOdd_FillType);
289 path.moveTo(0,4);
290 path.lineTo(4,4);
291 path.lineTo(2,2);
292 path.close();
293 path.moveTo(6,4);
294 path.lineTo(2,4);
295 path.lineTo(4,2);
296 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000297 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000298}
299
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000300static void testLine10(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000301 SkPath path;
302 path.moveTo(0,4);
303 path.lineTo(4,4);
304 path.lineTo(2,2);
305 path.close();
306 path.moveTo(2,1);
307 path.lineTo(3,4);
308 path.lineTo(6,1);
309 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000310 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000311}
312
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000313static void testLine10x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000314 SkPath path;
315 path.setFillType(SkPath::kEvenOdd_FillType);
316 path.moveTo(0,4);
317 path.lineTo(4,4);
318 path.lineTo(2,2);
319 path.close();
320 path.moveTo(2,1);
321 path.lineTo(3,4);
322 path.lineTo(6,1);
323 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000324 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000325}
326
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000327static void testLine10a(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000328 SkPath path;
329 path.moveTo(0,4);
330 path.lineTo(8,4);
331 path.lineTo(4,0);
332 path.close();
333 path.moveTo(2,2);
334 path.lineTo(3,3);
335 path.lineTo(4,2);
336 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000337 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000338}
339
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000340static void testLine10ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000341 SkPath path;
342 path.setFillType(SkPath::kEvenOdd_FillType);
343 path.moveTo(0,4);
344 path.lineTo(8,4);
345 path.lineTo(4,0);
346 path.close();
347 path.moveTo(2,2);
348 path.lineTo(3,3);
349 path.lineTo(4,2);
350 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000351 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000352}
353
354static void addCWContainer(SkPath& path) {
355 path.moveTo(6,4);
356 path.lineTo(0,4);
357 path.lineTo(3,1);
358 path.close();
359}
360
361static void addCCWContainer(SkPath& path) {
362 path.moveTo(0,4);
363 path.lineTo(6,4);
364 path.lineTo(3,1);
365 path.close();
366}
367
368static void addCWContents(SkPath& path) {
369 path.moveTo(2,3);
370 path.lineTo(3,2);
371 path.lineTo(4,3);
372 path.close();
373}
374
375static void addCCWContents(SkPath& path) {
376 path.moveTo(3,2);
377 path.lineTo(2,3);
378 path.lineTo(4,3);
379 path.close();
380}
381
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000382static void testLine11(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000383 SkPath path;
384 addCWContainer(path);
385 addCWContents(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000386 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000387}
388
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000389static void testLine11x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000390 SkPath path;
391 path.setFillType(SkPath::kEvenOdd_FillType);
392 addCWContainer(path);
393 addCWContents(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000394 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000395}
396
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000397static void testLine12(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000398 SkPath path;
399 addCCWContainer(path);
400 addCWContents(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000401 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000402}
403
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000404static void testLine12x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000405 SkPath path;
406 path.setFillType(SkPath::kEvenOdd_FillType);
407 addCCWContainer(path);
408 addCWContents(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000409 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000410}
411
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000412static void testLine13(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000413 SkPath path;
414 addCWContainer(path);
415 addCCWContents(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000416 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000417}
418
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000419static void testLine13x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000420 SkPath path;
421 path.setFillType(SkPath::kEvenOdd_FillType);
422 addCWContainer(path);
423 addCCWContents(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000424 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000425}
426
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000427static void testLine14(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000428 SkPath path;
429 addCCWContainer(path);
430 addCCWContents(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000431 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000432}
433
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000434static void testLine14x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000435 SkPath path;
436 path.setFillType(SkPath::kEvenOdd_FillType);
437 addCCWContainer(path);
438 addCCWContents(path);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000439 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000440}
441
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000442static void testLine15(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000443 SkPath path;
444 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000445 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000446}
447
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000448static void testLine15x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000449 SkPath path;
450 path.setFillType(SkPath::kEvenOdd_FillType);
451 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000452 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000453}
454
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000455static void testLine16(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000456 SkPath path;
457 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
458 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000459 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000460}
461
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000462static void testLine16x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000463 SkPath path;
464 path.setFillType(SkPath::kEvenOdd_FillType);
465 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
466 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000467 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000468}
469
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000470static void testLine17(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000471 SkPath path;
472 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
473 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000474 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000475}
476
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000477static void testLine17x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000478 SkPath path;
479 path.setFillType(SkPath::kEvenOdd_FillType);
480 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
481 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000482 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000483}
484
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000485static void testLine18(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000486 SkPath path;
487 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
488 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000489 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000490}
491
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000492static void testLine18x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000493 SkPath path;
494 path.setFillType(SkPath::kEvenOdd_FillType);
495 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
496 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000497 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000498}
499
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000500static void testLine19(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000501 SkPath path;
502 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
503 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000504 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000505}
506
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000507static void testLine19x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000508 SkPath path;
509 path.setFillType(SkPath::kEvenOdd_FillType);
510 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
511 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000512 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000513}
514
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000515static void testLine20(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000516 SkPath path;
517 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
518 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000519 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000520}
521
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000522static void testLine20x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000523 SkPath path;
524 path.setFillType(SkPath::kEvenOdd_FillType);
525 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
526 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000527 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000528}
529
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000530static void testLine21(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000531 SkPath path;
532 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
533 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000534 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000535}
536
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000537static void testLine21x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000538 SkPath path;
539 path.setFillType(SkPath::kEvenOdd_FillType);
540 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
541 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000542 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000543}
544
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000545static void testLine22(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000546 SkPath path;
547 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
548 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000549 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000550}
551
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000552static void testLine22x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000553 SkPath path;
554 path.setFillType(SkPath::kEvenOdd_FillType);
555 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
556 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000557 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000558}
559
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000560static void testLine23(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000561 SkPath path;
562 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
563 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000564 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000565}
566
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000567static void testLine23x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000568 SkPath path;
569 path.setFillType(SkPath::kEvenOdd_FillType);
570 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
571 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000572 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000573}
574
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000575static void testLine24a(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000576 SkPath path;
577 path.moveTo(2,0);
578 path.lineTo(4,4);
579 path.lineTo(0,4);
580 path.close();
581 path.moveTo(2,0);
582 path.lineTo(1,2);
583 path.lineTo(2,2);
584 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000585 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000586}
587
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000588static void testLine24ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000589 SkPath path;
590 path.setFillType(SkPath::kEvenOdd_FillType);
591 path.moveTo(2,0);
592 path.lineTo(4,4);
593 path.lineTo(0,4);
594 path.close();
595 path.moveTo(2,0);
596 path.lineTo(1,2);
597 path.lineTo(2,2);
598 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000599 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000600}
601
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000602static void testLine24(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000603 SkPath path;
604 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
605 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000606 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000607}
608
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000609static void testLine24x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000610 SkPath path;
611 path.setFillType(SkPath::kEvenOdd_FillType);
612 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
613 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000614 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000615}
616
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000617static void testLine25(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000618 SkPath path;
619 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
620 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000621 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000622}
623
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000624static void testLine25x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000625 SkPath path;
626 path.setFillType(SkPath::kEvenOdd_FillType);
627 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
628 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000629 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000630}
631
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000632static void testLine26(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000633 SkPath path;
634 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
635 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000636 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000637}
638
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000639static void testLine26x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000640 SkPath path;
641 path.setFillType(SkPath::kEvenOdd_FillType);
642 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
643 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000644 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000645}
646
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000647static void testLine27(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000648 SkPath path;
649 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
650 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000651 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000652}
653
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000654static void testLine27x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000655 SkPath path;
656 path.setFillType(SkPath::kEvenOdd_FillType);
657 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
658 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000659 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000660}
661
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000662static void testLine28(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000663 SkPath path;
664 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
665 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000666 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000667}
668
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000669static void testLine28x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000670 SkPath path;
671 path.setFillType(SkPath::kEvenOdd_FillType);
672 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
673 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000674 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000675}
676
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000677static void testLine29(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000678 SkPath path;
679 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
680 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000681 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000682}
683
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000684static void testLine29x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000685 SkPath path;
686 path.setFillType(SkPath::kEvenOdd_FillType);
687 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
688 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000689 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000690}
691
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000692static void testLine30(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000693 SkPath path;
694 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
695 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
696 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000697 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000698}
699
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000700static void testLine30x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000701 SkPath path;
702 path.setFillType(SkPath::kEvenOdd_FillType);
703 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
704 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
705 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000706 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000707}
708
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000709static void testLine31(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000710 SkPath path;
711 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
712 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
713 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000714 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000715}
716
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000717static void testLine31x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000718 SkPath path;
719 path.setFillType(SkPath::kEvenOdd_FillType);
720 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
721 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
722 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000723 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000724}
725
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000726static void testLine32(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000727 SkPath path;
728 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
729 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
730 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000731 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000732}
733
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000734static void testLine32x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000735 SkPath path;
736 path.setFillType(SkPath::kEvenOdd_FillType);
737 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
738 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
739 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000740 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000741}
742
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000743static void testLine33(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000744 SkPath path;
745 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
746 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
747 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000748 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000749}
750
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000751static void testLine33x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000752 SkPath path;
753 path.setFillType(SkPath::kEvenOdd_FillType);
754 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
755 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
756 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000757 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000758}
759
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000760static void testLine34(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000761 SkPath path;
762 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
763 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
764 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000765 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000766}
767
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000768static void testLine34x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000769 SkPath path;
770 path.setFillType(SkPath::kEvenOdd_FillType);
771 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
772 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
773 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000774 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000775}
776
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000777static void testLine35(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000778 SkPath path;
779 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
780 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
781 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000782 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000783}
784
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000785static void testLine35x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000786 SkPath path;
787 path.setFillType(SkPath::kEvenOdd_FillType);
788 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
789 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
790 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000791 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000792}
793
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000794static void testLine36(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000795 SkPath path;
796 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
797 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
798 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000799 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000800}
801
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000802static void testLine36x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000803 SkPath path;
804 path.setFillType(SkPath::kEvenOdd_FillType);
805 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
806 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
807 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000808 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000809}
810
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000811static void testLine37(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000812 SkPath path;
813 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
814 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
815 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000816 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000817}
818
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000819static void testLine37x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000820 SkPath path;
821 path.setFillType(SkPath::kEvenOdd_FillType);
822 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
823 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
824 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000825 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000826}
827
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000828static void testLine38(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000829 SkPath path;
830 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
831 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
832 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000833 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000834}
835
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000836static void testLine38x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000837 SkPath path;
838 path.setFillType(SkPath::kEvenOdd_FillType);
839 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
840 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
841 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000842 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000843}
844
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000845static void testLine40(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000846 SkPath path;
847 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
848 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction);
849 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000850 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000851}
852
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000853static void testLine40x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000854 SkPath path;
855 path.setFillType(SkPath::kEvenOdd_FillType);
856 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
857 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction);
858 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000859 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000860}
861
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000862static void testLine41(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000863 SkPath path;
864 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
865 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
866 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000867 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000868}
869
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000870static void testLine41x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000871 SkPath path;
872 path.setFillType(SkPath::kEvenOdd_FillType);
873 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
874 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
875 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000876 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000877}
878
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000879static void testLine42(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000880 SkPath path;
881 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
882 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
883 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000884 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000885}
886
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000887static void testLine42x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000888 SkPath path;
889 path.setFillType(SkPath::kEvenOdd_FillType);
890 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
891 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
892 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000893 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000894}
895
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000896static void testLine43(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000897 SkPath path;
898 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
899 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction);
900 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000901 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000902}
903
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000904static void testLine43x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000905 SkPath path;
906 path.setFillType(SkPath::kEvenOdd_FillType);
907 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
908 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction);
909 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000910 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000911}
912
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000913static void testLine44(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000914 SkPath path;
915 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
916 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
917 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000918 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000919}
920
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000921static void testLine44x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000922 SkPath path;
923 path.setFillType(SkPath::kEvenOdd_FillType);
924 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
925 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
926 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000927 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000928}
929
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000930static void testLine45(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000931 SkPath path;
932 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
933 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
934 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000935 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000936}
937
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000938static void testLine45x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000939 SkPath path;
940 path.setFillType(SkPath::kEvenOdd_FillType);
941 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
942 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
943 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000944 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000945}
946
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000947static void testLine46(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000948 SkPath path;
949 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
950 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
951 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000952 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000953}
954
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000955static void testLine46x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000956 SkPath path;
957 path.setFillType(SkPath::kEvenOdd_FillType);
958 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
959 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
960 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000961 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000962}
963
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000964static void testLine47(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000965 SkPath path;
966 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
967 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
968 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000969 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000970}
971
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000972static void testLine47x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000973 SkPath path;
974 path.setFillType(SkPath::kEvenOdd_FillType);
975 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
976 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
977 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000978 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000979}
980
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000981static void testLine48(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000982 SkPath path;
983 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
984 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
985 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000986 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000987}
988
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000989static void testLine48x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000990 SkPath path;
991 path.setFillType(SkPath::kEvenOdd_FillType);
992 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
993 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
994 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000995 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000996}
997
commit-bot@chromium.org4431e772014-04-14 17:08:59 +0000998static void testLine49(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +0000999 SkPath path;
1000 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1001 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
1002 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001003 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001004}
1005
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001006static void testLine49x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001007 SkPath path;
1008 path.setFillType(SkPath::kEvenOdd_FillType);
1009 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1010 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
1011 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001012 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001013}
1014
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001015static void testLine50(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001016 SkPath path;
1017 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1018 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001019 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001020}
1021
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001022static void testLine50x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001023 SkPath path;
1024 path.setFillType(SkPath::kEvenOdd_FillType);
1025 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1026 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001027 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001028}
1029
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001030static void testLine51(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001031 SkPath path;
1032 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1033 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1034 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001035 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001036}
1037
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001038static void testLine51x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001039 SkPath path;
1040 path.setFillType(SkPath::kEvenOdd_FillType);
1041 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1042 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1043 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001044 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001045}
1046
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001047static void testLine52(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001048 SkPath path;
1049 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1050 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1051 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001052 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001053}
1054
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001055static void testLine52x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001056 SkPath path;
1057 path.setFillType(SkPath::kEvenOdd_FillType);
1058 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1059 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1060 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001061 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001062}
1063
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001064static void testLine53(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001065 SkPath path;
1066 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1067 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1068 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001069 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001070}
1071
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001072static void testLine53x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001073 SkPath path;
1074 path.setFillType(SkPath::kEvenOdd_FillType);
1075 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1076 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1077 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001078 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001079}
1080
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001081static void testLine54(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001082 SkPath path;
1083 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1084 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
1085 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001086 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001087}
1088
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001089static void testLine54x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001090 SkPath path;
1091 path.setFillType(SkPath::kEvenOdd_FillType);
1092 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1093 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
1094 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001095 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001096}
1097
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001098static void testLine55(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001099 SkPath path;
1100 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1101 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction);
1102 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001103 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001104}
1105
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001106static void testLine55x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001107 SkPath path;
1108 path.setFillType(SkPath::kEvenOdd_FillType);
1109 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1110 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction);
1111 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001112 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001113}
1114
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001115static void testLine56(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001116 SkPath path;
1117 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1118 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction);
1119 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001120 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001121}
1122
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001123static void testLine56x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001124 SkPath path;
1125 path.setFillType(SkPath::kEvenOdd_FillType);
1126 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1127 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction);
1128 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001129 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001130}
1131
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001132static void testLine57(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001133 SkPath path;
1134 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1135 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction);
1136 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001137 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001138}
1139
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001140static void testLine57x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001141 SkPath path;
1142 path.setFillType(SkPath::kEvenOdd_FillType);
1143 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1144 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction);
1145 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001146 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001147}
1148
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001149static void testLine58(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001150 SkPath path;
1151 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1152 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction);
1153 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001154 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001155}
1156
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001157static void testLine58x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001158 SkPath path;
1159 path.setFillType(SkPath::kEvenOdd_FillType);
1160 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1161 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction);
1162 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001163 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001164}
1165
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001166static void testLine59(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001167 SkPath path;
1168 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1169 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction);
1170 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001171 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001172}
1173
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001174static void testLine59x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001175 SkPath path;
1176 path.setFillType(SkPath::kEvenOdd_FillType);
1177 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1178 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction);
1179 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001180 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001181}
1182
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001183static void testLine60(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001184 SkPath path;
1185 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1186 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction);
1187 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001188 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001189}
1190
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001191static void testLine60x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001192 SkPath path;
1193 path.setFillType(SkPath::kEvenOdd_FillType);
1194 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1195 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction);
1196 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001197 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001198}
1199
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001200static void testLine61(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001201 SkPath path;
1202 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1203 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
1204 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001205 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001206}
1207
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001208static void testLine61x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001209 SkPath path;
1210 path.setFillType(SkPath::kEvenOdd_FillType);
1211 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1212 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
1213 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001214 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001215}
1216
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001217static void testLine62(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001218 SkPath path;
1219 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1220 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1221 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1222 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001223 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001224}
1225
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001226static void testLine62x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001227 SkPath path;
1228 path.setFillType(SkPath::kEvenOdd_FillType);
1229 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1230 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1231 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1232 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001233 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001234}
1235
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001236static void testLine63(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001237 SkPath path;
1238 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1239 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
1240 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction);
1241 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001242 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001243}
1244
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001245static void testLine63x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001246 SkPath path;
1247 path.setFillType(SkPath::kEvenOdd_FillType);
1248 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1249 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
1250 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction);
1251 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001252 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001253}
1254
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001255static void testLine64(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001256 SkPath path;
1257 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1258 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1259 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001260 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001261}
1262
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001263static void testLine64x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001264 SkPath path;
1265 path.setFillType(SkPath::kEvenOdd_FillType);
1266 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1267 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1268 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001269 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001270}
1271
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001272static void testLine65(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001273 SkPath path;
1274 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1275 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
1276 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
1277 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001278 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001279}
1280
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001281static void testLine65x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001282 SkPath path;
1283 path.setFillType(SkPath::kEvenOdd_FillType);
1284 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1285 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
1286 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
1287 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001288 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001289}
1290
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001291static void testLine66(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001292 SkPath path;
1293 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1294 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1295 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001296 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001297}
1298
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001299static void testLine66x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001300 SkPath path;
1301 path.setFillType(SkPath::kEvenOdd_FillType);
1302 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1303 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1304 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001305 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001306}
1307
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001308static void testLine67(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001309 SkPath path;
1310 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1311 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1312 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1313 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001314 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001315}
1316
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001317static void testLine67x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001318 SkPath path;
1319 path.setFillType(SkPath::kEvenOdd_FillType);
1320 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1321 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1322 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1323 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001324 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001325}
1326
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001327static void testLine68a(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001328 SkPath path;
1329 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1330 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1331 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001332 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001333}
1334
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001335static void testLine68ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001336 SkPath path;
1337 path.setFillType(SkPath::kEvenOdd_FillType);
1338 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1339 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1340 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001341 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001342}
1343
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001344static void testLine68b(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001345 SkPath path;
1346 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1347 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1348 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001349 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001350}
1351
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001352static void testLine68bx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001353 SkPath path;
1354 path.setFillType(SkPath::kEvenOdd_FillType);
1355 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1356 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1357 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001358 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001359}
1360
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001361static void testLine68c(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001362 SkPath path;
1363 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1364 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1365 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001366 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001367}
1368
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001369static void testLine68cx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001370 SkPath path;
1371 path.setFillType(SkPath::kEvenOdd_FillType);
1372 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1373 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1374 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001375 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001376}
1377
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001378static void testLine68d(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001379 SkPath path;
1380 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1381 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1382 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001383 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001384}
1385
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001386static void testLine68dx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001387 SkPath path;
1388 path.setFillType(SkPath::kEvenOdd_FillType);
1389 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1390 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1391 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001392 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001393}
1394
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001395static void testLine68e(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001396 SkPath path;
1397 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1398 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1399 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1400 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001401 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001402}
1403
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001404static void testLine68ex(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001405 SkPath path;
1406 path.setFillType(SkPath::kEvenOdd_FillType);
1407 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1408 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1409 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1410 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001411 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001412}
1413
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001414static void testLine68f(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001415 SkPath path;
1416 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1417 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1418 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1419 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001420 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001421}
1422
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001423static void testLine68fx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001424 SkPath path;
1425 path.setFillType(SkPath::kEvenOdd_FillType);
1426 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1427 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1428 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1429 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001430 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001431}
1432
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001433static void testLine68g(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001434 SkPath path;
1435 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1436 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1437 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1438 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1439 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001440 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001441}
1442
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001443static void testLine68gx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001444 SkPath path;
1445 path.setFillType(SkPath::kEvenOdd_FillType);
1446 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1447 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1448 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1449 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1450 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001451 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001452}
1453
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001454static void testLine68h(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001455 SkPath path;
1456 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1457 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1458 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1459 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1460 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001461 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001462}
1463
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001464static void testLine68hx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001465 SkPath path;
1466 path.setFillType(SkPath::kEvenOdd_FillType);
1467 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1468 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1469 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1470 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1471 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001472 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001473}
1474
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001475static void testLine69(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001476 SkPath path;
1477 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1478 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1479 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001480 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001481}
1482
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001483static void testLine69x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001484 SkPath path;
1485 path.setFillType(SkPath::kEvenOdd_FillType);
1486 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1487 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1488 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001489 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001490}
1491
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001492static void testLine70(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001493 SkPath path;
1494 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1495 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction);
1496 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001497 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001498}
1499
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001500static void testLine70x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001501 SkPath path;
1502 path.setFillType(SkPath::kEvenOdd_FillType);
1503 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1504 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction);
1505 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001506 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001507}
1508
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001509static void testLine71(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001510 SkPath path;
1511 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1512 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction);
1513 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001514 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001515}
1516
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001517static void testLine71x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001518 SkPath path;
1519 path.setFillType(SkPath::kEvenOdd_FillType);
1520 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1521 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction);
1522 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001523 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001524}
1525
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001526static void testLine72(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001527 SkPath path;
1528 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1529 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1530 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001531 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001532}
1533
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001534static void testLine72x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001535 SkPath path;
1536 path.setFillType(SkPath::kEvenOdd_FillType);
1537 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1538 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1539 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001540 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001541}
1542
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001543static void testLine73(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001544 SkPath path;
1545 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1546 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction);
1547 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1548 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001549 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001550}
1551
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001552static void testLine73x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001553 SkPath path;
1554 path.setFillType(SkPath::kEvenOdd_FillType);
1555 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1556 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction);
1557 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1558 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001559 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001560}
1561
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001562static void testLine74(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001563 SkPath path;
1564 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction);
1565 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1566 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001567 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001568}
1569
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001570static void testLine74x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001571 SkPath path;
1572 path.setFillType(SkPath::kEvenOdd_FillType);
1573 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction);
1574 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1575 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001576 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001577}
1578
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001579static void testLine75(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001580 SkPath path;
1581 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1582 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction);
1583 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction);
1584 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001585 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001586}
1587
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001588static void testLine75x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001589 SkPath path;
1590 path.setFillType(SkPath::kEvenOdd_FillType);
1591 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1592 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction);
1593 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction);
1594 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001595 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001596}
1597
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001598static void testLine76(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001599 SkPath path;
1600 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction);
1601 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
1602 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1603 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001604 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001605}
1606
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001607static void testLine76x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001608 SkPath path;
1609 path.setFillType(SkPath::kEvenOdd_FillType);
1610 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction);
1611 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
1612 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1613 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001614 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001615}
1616
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001617static void testLine77(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001618 SkPath path;
1619 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1620 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
1621 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001622 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001623}
1624
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001625static void testLine77x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001626 SkPath path;
1627 path.setFillType(SkPath::kEvenOdd_FillType);
1628 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1629 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
1630 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001631 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001632}
1633
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001634static void testLine78(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001635 SkPath path;
1636 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction);
1637 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction);
1638 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
1639 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001640 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001641}
1642
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001643static void testLine78x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001644 SkPath path;
1645 path.setFillType(SkPath::kEvenOdd_FillType);
1646 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction);
1647 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction);
1648 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
1649 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001650 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001651}
1652
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001653static void testLine79(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001654 SkPath path;
1655 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction);
1656 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction);
1657 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction);
1658 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001659 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001660}
1661
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001662static void testLine79x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001663 SkPath path;
1664 path.setFillType(SkPath::kEvenOdd_FillType);
1665 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction);
1666 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction);
1667 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction);
1668 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001669 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001670}
1671
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001672static void testLine81(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001673 SkPath path;
1674 path.addRect(-1, -1, 3, 3, SkPath::kCW_Direction);
1675 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
1676 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
1677 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
1678 path.addRect(1, 1, 2, 2, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001679 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001680}
1681
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001682static void testDegenerate1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001683 SkPath path;
1684 path.moveTo(0, 0);
1685 path.lineTo(0, 0);
1686 path.lineTo(2, 0);
1687 path.close();
1688 path.moveTo(0, 0);
1689 path.lineTo(1, 0);
1690 path.lineTo(2, 0);
1691 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001692 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001693}
1694
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001695static void testDegenerate1x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001696 SkPath path;
1697 path.setFillType(SkPath::kEvenOdd_FillType);
1698 path.moveTo(0, 0);
1699 path.lineTo(0, 0);
1700 path.lineTo(2, 0);
1701 path.close();
1702 path.moveTo(0, 0);
1703 path.lineTo(1, 0);
1704 path.lineTo(2, 0);
1705 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001706 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001707}
1708
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001709static void testDegenerate2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001710 SkPath path;
1711 path.moveTo(0, 0);
1712 path.lineTo(0, 0);
1713 path.lineTo(0, 0);
1714 path.close();
1715 path.moveTo(0, 0);
1716 path.lineTo(1, 0);
1717 path.lineTo(0, 1);
1718 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001719 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001720}
1721
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001722static void testDegenerate2x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001723 SkPath path;
1724 path.setFillType(SkPath::kEvenOdd_FillType);
1725 path.moveTo(0, 0);
1726 path.lineTo(0, 0);
1727 path.lineTo(0, 0);
1728 path.close();
1729 path.moveTo(0, 0);
1730 path.lineTo(1, 0);
1731 path.lineTo(0, 1);
1732 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001733 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001734}
1735
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001736static void testDegenerate3(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001737 SkPath path;
1738 path.moveTo(0, 0);
1739 path.lineTo(2, 0);
1740 path.lineTo(1, 0);
1741 path.close();
1742 path.moveTo(0, 0);
1743 path.lineTo(0, 0);
1744 path.lineTo(3, 0);
1745 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001746 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001747}
1748
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001749static void testDegenerate3x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001750 SkPath path;
1751 path.setFillType(SkPath::kEvenOdd_FillType);
1752 path.moveTo(0, 0);
1753 path.lineTo(2, 0);
1754 path.lineTo(1, 0);
1755 path.close();
1756 path.moveTo(0, 0);
1757 path.lineTo(0, 0);
1758 path.lineTo(3, 0);
1759 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001760 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001761}
1762
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001763static void testDegenerate4(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001764 SkPath path;
1765 path.moveTo(0, 0);
1766 path.lineTo(1, 0);
1767 path.lineTo(1, 3);
1768 path.close();
1769 path.moveTo(1, 0);
1770 path.lineTo(1, 1);
1771 path.lineTo(1, 2);
1772 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001773 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001774}
1775
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001776static void testDegenerate4x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001777 SkPath path;
1778 path.setFillType(SkPath::kEvenOdd_FillType);
1779 path.moveTo(0, 0);
1780 path.lineTo(1, 0);
1781 path.lineTo(1, 3);
1782 path.close();
1783 path.moveTo(1, 0);
1784 path.lineTo(1, 1);
1785 path.lineTo(1, 2);
1786 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001787 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001788}
1789
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001790static void testNondegenerate1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001791 SkPath path;
1792 path.moveTo(0, 0);
1793 path.lineTo(3, 0);
1794 path.lineTo(1, 3);
1795 path.close();
1796 path.moveTo(1, 1);
1797 path.lineTo(2, 1);
1798 path.lineTo(1, 2);
1799 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001800 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001801}
1802
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001803static void testNondegenerate1x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001804 SkPath path;
1805 path.setFillType(SkPath::kEvenOdd_FillType);
1806 path.moveTo(0, 0);
1807 path.lineTo(3, 0);
1808 path.lineTo(1, 3);
1809 path.close();
1810 path.moveTo(1, 1);
1811 path.lineTo(2, 1);
1812 path.lineTo(1, 2);
1813 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001814 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001815}
1816
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001817static void testNondegenerate2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001818 SkPath path;
1819 path.moveTo(1, 0);
1820 path.lineTo(0, 1);
1821 path.lineTo(1, 1);
1822 path.close();
1823 path.moveTo(0, 2);
1824 path.lineTo(0, 3);
1825 path.lineTo(1, 2);
1826 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001827 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001828}
1829
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001830static void testNondegenerate2x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001831 SkPath path;
1832 path.setFillType(SkPath::kEvenOdd_FillType);
1833 path.moveTo(1, 0);
1834 path.lineTo(0, 1);
1835 path.lineTo(1, 1);
1836 path.close();
1837 path.moveTo(0, 2);
1838 path.lineTo(0, 3);
1839 path.lineTo(1, 2);
1840 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001841 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001842}
1843
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001844static void testNondegenerate3(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001845 SkPath path;
1846 path.moveTo(0, 0);
1847 path.lineTo(1, 0);
1848 path.lineTo(2, 1);
1849 path.close();
1850 path.moveTo(0, 1);
1851 path.lineTo(1, 1);
1852 path.lineTo(0, 2);
1853 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001854 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001855}
1856
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001857static void testNondegenerate3x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001858 SkPath path;
1859 path.setFillType(SkPath::kEvenOdd_FillType);
1860 path.moveTo(0, 0);
1861 path.lineTo(1, 0);
1862 path.lineTo(2, 1);
1863 path.close();
1864 path.moveTo(0, 1);
1865 path.lineTo(1, 1);
1866 path.lineTo(0, 2);
1867 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001868 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001869}
1870
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001871static void testNondegenerate4(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001872 SkPath path;
1873 path.moveTo(1, 0);
1874 path.lineTo(0, 1);
1875 path.lineTo(1, 2);
1876 path.close();
1877 path.moveTo(0, 2);
1878 path.lineTo(0, 3);
1879 path.lineTo(1, 3);
1880 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001881 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001882}
1883
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001884static void testNondegenerate4x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001885 SkPath path;
1886 path.setFillType(SkPath::kEvenOdd_FillType);
1887 path.moveTo(1, 0);
1888 path.lineTo(0, 1);
1889 path.lineTo(1, 2);
1890 path.close();
1891 path.moveTo(0, 2);
1892 path.lineTo(0, 3);
1893 path.lineTo(1, 3);
1894 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001895 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001896}
1897
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001898static void testQuadralateral5(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001899 SkPath path;
1900 path.moveTo(0, 0);
1901 path.lineTo(0, 0);
1902 path.lineTo(1, 0);
1903 path.lineTo(1, 1);
1904 path.close();
1905 path.moveTo(0, 0);
1906 path.lineTo(2, 2);
1907 path.lineTo(3, 2);
1908 path.lineTo(3, 3);
1909 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001910 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001911}
1912
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001913static void testQuadralateral5x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001914 SkPath path;
1915 path.setFillType(SkPath::kEvenOdd_FillType);
1916 path.moveTo(0, 0);
1917 path.lineTo(0, 0);
1918 path.lineTo(1, 0);
1919 path.lineTo(1, 1);
1920 path.close();
1921 path.moveTo(0, 0);
1922 path.lineTo(2, 2);
1923 path.lineTo(3, 2);
1924 path.lineTo(3, 3);
1925 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001926 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001927}
1928
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001929static void testQuadralateral6(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001930 SkPath path;
1931 path.moveTo(0, 0);
1932 path.lineTo(0, 0);
1933 path.lineTo(1, 0);
1934 path.lineTo(1, 1);
1935 path.close();
1936 path.moveTo(1, 0);
1937 path.lineTo(2, 0);
1938 path.lineTo(0, 2);
1939 path.lineTo(2, 2);
1940 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001941 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001942}
1943
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001944static void testQuadralateral6x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001945 SkPath path;
1946 path.setFillType(SkPath::kEvenOdd_FillType);
1947 path.moveTo(0, 0);
1948 path.lineTo(0, 0);
1949 path.lineTo(1, 0);
1950 path.lineTo(1, 1);
1951 path.close();
1952 path.moveTo(1, 0);
1953 path.lineTo(2, 0);
1954 path.lineTo(0, 2);
1955 path.lineTo(2, 2);
1956 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001957 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001958}
1959
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001960static void testFauxQuadralateral6(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001961 SkPath path;
1962 path.moveTo(0, 0);
1963 path.lineTo(1, 0);
1964 path.lineTo(1, 1);
1965 path.close();
1966 path.moveTo(1, 0);
1967 path.lineTo(2, 0);
1968 path.lineTo(1 + 1.0f/3, 2.0f/3);
1969 path.close();
1970 path.moveTo(1 + 1.0f/3, 2.0f/3);
1971 path.lineTo(0, 2);
1972 path.lineTo(2, 2);
1973 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001974 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001975}
1976
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001977static void testFauxQuadralateral6x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001978 SkPath path;
1979 path.setFillType(SkPath::kEvenOdd_FillType);
1980 path.moveTo(0, 0);
1981 path.lineTo(1, 0);
1982 path.lineTo(1, 1);
1983 path.close();
1984 path.moveTo(1, 0);
1985 path.lineTo(2, 0);
1986 path.lineTo(1 + 1.0f/3, 2.0f/3);
1987 path.close();
1988 path.moveTo(1 + 1.0f/3, 2.0f/3);
1989 path.lineTo(0, 2);
1990 path.lineTo(2, 2);
1991 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001992 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001993}
1994
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00001995static void testFauxQuadralateral6a(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001996 SkPath path;
1997 path.moveTo(0, 0);
1998 path.lineTo(3, 0);
1999 path.lineTo(3, 3);
2000 path.close();
2001 path.moveTo(3, 0);
2002 path.lineTo(6, 0);
2003 path.lineTo(4, 2);
2004 path.close();
2005 path.moveTo(4, 2);
2006 path.lineTo(0, 6);
2007 path.lineTo(6, 6);
2008 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002009 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002010}
2011
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002012static void testFauxQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002013 SkPath path;
2014 path.setFillType(SkPath::kEvenOdd_FillType);
2015 path.moveTo(0, 0);
2016 path.lineTo(3, 0);
2017 path.lineTo(3, 3);
2018 path.close();
2019 path.moveTo(3, 0);
2020 path.lineTo(6, 0);
2021 path.lineTo(4, 2);
2022 path.close();
2023 path.moveTo(4, 2);
2024 path.lineTo(0, 6);
2025 path.lineTo(6, 6);
2026 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002027 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002028}
2029
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002030static void testFauxQuadralateral6b(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002031 SkPath path;
2032 path.moveTo(0, 0);
2033 path.lineTo(3, 0);
2034 path.lineTo(3, 3);
2035 path.close();
2036 path.moveTo(3, 0);
2037 path.lineTo(6, 0);
2038 path.lineTo(4, 2);
2039 path.close();
2040 path.moveTo(4, 2);
2041 path.lineTo(6, 6);
2042 path.lineTo(0, 6);
2043 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002044 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002045}
2046
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002047static void testFauxQuadralateral6bx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002048 SkPath path;
2049 path.setFillType(SkPath::kEvenOdd_FillType);
2050 path.moveTo(0, 0);
2051 path.lineTo(3, 0);
2052 path.lineTo(3, 3);
2053 path.close();
2054 path.moveTo(3, 0);
2055 path.lineTo(6, 0);
2056 path.lineTo(4, 2);
2057 path.close();
2058 path.moveTo(4, 2);
2059 path.lineTo(6, 6);
2060 path.lineTo(0, 6);
2061 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002062 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002063}
2064
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002065static void testFauxQuadralateral6c(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002066 SkPath path;
2067 path.moveTo(0, 0);
2068 path.lineTo(3, 3);
2069 path.lineTo(3, 0);
2070 path.close();
2071 path.moveTo(3, 0);
2072 path.lineTo(6, 0);
2073 path.lineTo(4, 2);
2074 path.close();
2075 path.moveTo(4, 2);
2076 path.lineTo(0, 6);
2077 path.lineTo(6, 6);
2078 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002079 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002080}
2081
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002082static void testFauxQuadralateral6cx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002083 SkPath path;
2084 path.setFillType(SkPath::kEvenOdd_FillType);
2085 path.moveTo(0, 0);
2086 path.lineTo(3, 3);
2087 path.lineTo(3, 0);
2088 path.close();
2089 path.moveTo(3, 0);
2090 path.lineTo(6, 0);
2091 path.lineTo(4, 2);
2092 path.close();
2093 path.moveTo(4, 2);
2094 path.lineTo(0, 6);
2095 path.lineTo(6, 6);
2096 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002097 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002098}
2099
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002100static void testFauxQuadralateral6d(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002101 SkPath path;
2102 path.moveTo(0, 0);
2103 path.lineTo(3, 3);
2104 path.lineTo(3, 0);
2105 path.close();
2106 path.moveTo(3, 0);
2107 path.lineTo(6, 0);
2108 path.lineTo(4, 2);
2109 path.close();
2110 path.moveTo(4, 2);
2111 path.lineTo(6, 6);
2112 path.lineTo(0, 6);
2113 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002114 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002115}
2116
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002117static void testFauxQuadralateral6dx(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002118 SkPath path;
2119 path.setFillType(SkPath::kEvenOdd_FillType);
2120 path.moveTo(0, 0);
2121 path.lineTo(3, 3);
2122 path.lineTo(3, 0);
2123 path.close();
2124 path.moveTo(3, 0);
2125 path.lineTo(6, 0);
2126 path.lineTo(4, 2);
2127 path.close();
2128 path.moveTo(4, 2);
2129 path.lineTo(6, 6);
2130 path.lineTo(0, 6);
2131 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002132 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002133}
2134
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002135static void testQuadralateral6a(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002136 SkPath path;
2137 path.moveTo(0, 0);
2138 path.lineTo(0, 0);
2139 path.lineTo(3, 0);
2140 path.lineTo(3, 3);
2141 path.close();
2142 path.moveTo(3, 0);
2143 path.lineTo(6, 0);
2144 path.lineTo(0, 6);
2145 path.lineTo(6, 6);
2146 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002147 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002148}
2149
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002150static void testQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002151 SkPath path;
2152 path.setFillType(SkPath::kEvenOdd_FillType);
2153 path.moveTo(0, 0);
2154 path.lineTo(0, 0);
2155 path.lineTo(3, 0);
2156 path.lineTo(3, 3);
2157 path.close();
2158 path.moveTo(3, 0);
2159 path.lineTo(6, 0);
2160 path.lineTo(0, 6);
2161 path.lineTo(6, 6);
2162 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002163 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002164}
2165
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002166static void testQuadralateral7(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002167 SkPath path;
2168 path.moveTo(0, 0);
2169 path.lineTo(0, 0);
2170 path.lineTo(1, 0);
2171 path.lineTo(2, 1);
2172 path.close();
2173 path.moveTo(1, 0);
2174 path.lineTo(1, 1);
2175 path.lineTo(2, 2);
2176 path.lineTo(1, 3);
2177 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002178 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002179}
2180
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002181static void testQuadralateral7x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002182 SkPath path;
2183 path.setFillType(SkPath::kEvenOdd_FillType);
2184 path.moveTo(0, 0);
2185 path.lineTo(0, 0);
2186 path.lineTo(1, 0);
2187 path.lineTo(2, 1);
2188 path.close();
2189 path.moveTo(1, 0);
2190 path.lineTo(1, 1);
2191 path.lineTo(2, 2);
2192 path.lineTo(1, 3);
2193 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002194 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002195}
2196
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002197static void testQuadralateral8(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002198 SkPath path;
2199 path.moveTo(0, 0);
2200 path.lineTo(3, 1);
2201 path.lineTo(1, 3);
2202 path.lineTo(3, 3);
2203 path.close();
2204 path.moveTo(2, 1);
2205 path.lineTo(0, 2);
2206 path.lineTo(3, 2);
2207 path.lineTo(2, 3);
2208 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002209 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002210}
2211
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002212static void testQuadralateral8x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002213 SkPath path;
2214 path.setFillType(SkPath::kEvenOdd_FillType);
2215 path.moveTo(0, 0);
2216 path.lineTo(3, 1);
2217 path.lineTo(1, 3);
2218 path.lineTo(3, 3);
2219 path.close();
2220 path.moveTo(2, 1);
2221 path.lineTo(0, 2);
2222 path.lineTo(3, 2);
2223 path.lineTo(2, 3);
2224 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002225 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002226}
2227
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002228static void testQuadralateral9(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002229 SkPath path;
2230 path.moveTo(0, 0);
2231 path.lineTo(1, 0);
2232 path.lineTo(1, 2);
2233 path.lineTo(2, 2);
2234 path.close();
2235 path.moveTo(1, 1);
2236 path.lineTo(2, 1);
2237 path.lineTo(1, 3);
2238 path.lineTo(2, 3);
2239 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002240 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002241}
2242
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002243static void testQuadralateral9x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002244 SkPath path;
2245 path.setFillType(SkPath::kEvenOdd_FillType);
2246 path.moveTo(0, 0);
2247 path.lineTo(1, 0);
2248 path.lineTo(1, 2);
2249 path.lineTo(2, 2);
2250 path.close();
2251 path.moveTo(1, 1);
2252 path.lineTo(2, 1);
2253 path.lineTo(1, 3);
2254 path.lineTo(2, 3);
2255 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002256 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002257}
2258
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002259static void testLine1a(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002260 SkPath path;
2261 path.setFillType(SkPath::kWinding_FillType);
2262 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
2263 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002264 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002265}
2266
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002267static void testLine1ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002268 SkPath path;
2269 path.setFillType(SkPath::kEvenOdd_FillType);
2270 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
2271 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002272 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002273}
2274
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002275static void testLine2ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002276 SkPath path;
2277 path.setFillType(SkPath::kEvenOdd_FillType);
2278 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
2279 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
2280 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002281 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002282}
2283
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002284static void testLine3aax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002285 SkPath path;
2286 path.setFillType(SkPath::kEvenOdd_FillType);
2287 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
2288 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
2289 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002290 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002291}
2292
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002293static void testLine4ax(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002294 SkPath path;
2295 path.setFillType(SkPath::kEvenOdd_FillType);
2296 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
2297 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
2298 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002299 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002300}
2301
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002302static void testQuadratic1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002303 SkPath path;
2304 path.moveTo(0, 0);
2305 path.quadTo(0, 0, 0, 0);
2306 path.lineTo(1, 0);
2307 path.close();
2308 path.moveTo(0, 0);
2309 path.lineTo(0, 0);
2310 path.quadTo(0, 0, 0, 0);
2311 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002312 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002313}
2314
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002315static void testQuadratic1x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002316 SkPath path;
2317 path.setFillType(SkPath::kEvenOdd_FillType);
2318 path.moveTo(0, 0);
2319 path.quadTo(0, 0, 0, 0);
2320 path.lineTo(1, 0);
2321 path.close();
2322 path.moveTo(0, 0);
2323 path.lineTo(0, 0);
2324 path.quadTo(0, 0, 0, 0);
2325 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002326 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002327}
2328
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002329static void testQuadratic2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002330 SkPath path;
2331 path.moveTo(0, 0);
2332 path.quadTo(0, 0, 0, 0);
2333 path.lineTo(3, 0);
2334 path.close();
2335 path.moveTo(0, 0);
2336 path.lineTo(0, 0);
2337 path.quadTo(1, 0, 0, 1);
2338 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002339 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002340}
2341
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002342static void testQuadratic2x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002343 SkPath path;
2344 path.setFillType(SkPath::kEvenOdd_FillType);
2345 path.moveTo(0, 0);
2346 path.quadTo(0, 0, 0, 0);
2347 path.lineTo(3, 0);
2348 path.close();
2349 path.moveTo(0, 0);
2350 path.lineTo(0, 0);
2351 path.quadTo(1, 0, 0, 1);
2352 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002353 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002354}
2355
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002356static void testQuadratic3(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002357 SkPath path;
2358 path.moveTo(0, 0);
2359 path.quadTo(0, 0, 1, 0);
2360 path.lineTo(0, 2);
2361 path.close();
2362 path.moveTo(0, 0);
2363 path.lineTo(0, 0);
2364 path.quadTo(1, 0, 0, 1);
2365 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002366 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002367}
2368
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002369static void testQuadratic3x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002370 SkPath path;
2371 path.setFillType(SkPath::kEvenOdd_FillType);
2372 path.moveTo(0, 0);
2373 path.quadTo(0, 0, 1, 0);
2374 path.lineTo(0, 2);
2375 path.close();
2376 path.moveTo(0, 0);
2377 path.lineTo(0, 0);
2378 path.quadTo(1, 0, 0, 1);
2379 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002380 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002381}
2382
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002383static void testQuadratic4(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002384 SkPath path;
2385 path.moveTo(0, 0);
2386 path.quadTo(0, 0, 1, 0);
2387 path.lineTo(0, 2);
2388 path.close();
2389 path.moveTo(0, 0);
2390 path.lineTo(0, 0);
2391 path.quadTo(1, 0, 0, 2);
2392 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002393 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002394}
2395
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002396static void testQuadratic4x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002397 SkPath path;
2398 path.setFillType(SkPath::kEvenOdd_FillType);
2399 path.moveTo(0, 0);
2400 path.quadTo(0, 0, 1, 0);
2401 path.lineTo(0, 2);
2402 path.close();
2403 path.moveTo(0, 0);
2404 path.lineTo(0, 0);
2405 path.quadTo(1, 0, 0, 2);
2406 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002407 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002408}
2409
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002410static void testQuadratic5(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002411 SkPath path;
2412 path.moveTo(0, 0);
2413 path.quadTo(0, 0, 0, 0);
2414 path.lineTo(0, 1);
2415 path.close();
2416 path.moveTo(0, 0);
2417 path.lineTo(1, 0);
2418 path.quadTo(0, 1, 0, 2);
2419 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002420 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002421}
2422
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002423static void testQuadratic6(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002424 SkPath path;
2425 path.moveTo(0, 0);
2426 path.quadTo(0, 0, 1, 0);
2427 path.lineTo(2, 1);
2428 path.close();
2429 path.moveTo(0, 0);
2430 path.lineTo(0, 0);
2431 path.quadTo(2, 0, 0, 1);
2432 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002433 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002434}
2435
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002436static void testQuadratic7(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002437 SkPath path;
2438 path.moveTo(0, 0);
2439 path.quadTo(0, 0, 1, 0);
2440 path.lineTo(3, 1);
2441 path.close();
2442 path.moveTo(0, 0);
2443 path.lineTo(0, 0);
2444 path.quadTo(3, 0, 1, 2);
2445 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002446 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002447}
2448
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002449static void testQuadratic8(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002450 SkPath path;
2451 path.moveTo(0, 0);
2452 path.quadTo(0, 0, 1, 0);
2453 path.lineTo(0, 2);
2454 path.close();
2455 path.moveTo(0, 0);
2456 path.lineTo(1, 0);
2457 path.quadTo(0, 1, 1, 2);
2458 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002459 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002460}
2461
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002462static void testQuadratic9(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002463 SkPath path;
2464 path.moveTo(0, 0);
2465 path.quadTo(0, 0, 1, 0);
2466 path.lineTo(3, 1);
2467 path.close();
2468 path.moveTo(0, 0);
2469 path.lineTo(1, 0);
2470 path.quadTo(1, 2, 3, 2);
2471 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002472 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002473}
2474
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002475static void testQuadratic14(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002476 SkPath path;
2477 path.moveTo(0, 0);
2478 path.quadTo(0, 0, 1, 0);
2479 path.lineTo(3, 2);
2480 path.close();
2481 path.moveTo(0, 0);
2482 path.lineTo(1, 0);
2483 path.quadTo(3, 2, 3, 3);
2484 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002485 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002486}
2487
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002488static void testQuadratic15(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002489 SkPath path;
2490 path.moveTo(0, 0);
2491 path.quadTo(0, 0, 1, 0);
2492 path.lineTo(1, 3);
2493 path.close();
2494 path.moveTo(1, 0);
2495 path.lineTo(0, 1);
2496 path.quadTo(1, 1, 0, 3);
2497 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002498 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002499}
2500
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002501static void testQuadratic17x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002502 SkPath path;
2503 path.setFillType(SkPath::kEvenOdd_FillType);
2504 path.moveTo(0, 0);
2505 path.quadTo(0, 0, 3, 1);
2506 path.lineTo(0, 2);
2507 path.close();
2508 path.moveTo(0, 0);
2509 path.lineTo(1, 0);
2510 path.quadTo(3, 1, 0, 2);
2511 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002512 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002513}
2514
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002515static void testQuadratic18(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002516 SkPath path;
2517 path.moveTo(0, 0);
2518 path.quadTo(1, 0, 0, 1);
2519 path.lineTo(0, 1);
2520 path.close();
2521 path.moveTo(0, 0);
2522 path.lineTo(0, 0);
2523 path.quadTo(1, 0, 1, 1);
2524 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002525 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002526}
2527
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002528static void testQuadratic19(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002529 SkPath path;
2530 path.moveTo(0, 0);
2531 path.quadTo(1, 0, 0, 1);
2532 path.lineTo(0, 1);
2533 path.close();
2534 path.moveTo(0, 0);
2535 path.lineTo(0, 0);
2536 path.quadTo(2, 0, 0, 1);
2537 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002538 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002539}
2540
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002541static void testQuadratic20(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002542 SkPath path;
2543 path.moveTo(0, 0);
2544 path.quadTo(1, 0, 0, 1);
2545 path.lineTo(0, 1);
2546 path.close();
2547 path.moveTo(0, 0);
2548 path.lineTo(0, 0);
2549 path.quadTo(1, 0, 0, 1);
2550 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002551 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002552}
2553
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002554static void testQuadratic21(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002555 SkPath path;
2556 path.moveTo(0, 0);
2557 path.quadTo(1, 0, 0, 1);
2558 path.lineTo(0, 1);
2559 path.close();
2560 path.moveTo(0, 0);
2561 path.lineTo(0, 0);
2562 path.quadTo(1, 0, 0, 2);
2563 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002564 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002565}
2566
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002567static void testQuadratic22(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002568 SkPath path;
2569 path.moveTo(0, 0);
2570 path.quadTo(1, 0, 0, 1);
2571 path.lineTo(0, 1);
2572 path.close();
2573 path.moveTo(0, 0);
2574 path.lineTo(0, 0);
2575 path.quadTo(0, 1, 2, 1);
2576 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002577 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002578}
2579
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002580static void testQuadratic23(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002581 SkPath path;
2582 path.moveTo(0, 0);
2583 path.quadTo(1, 0, 0, 1);
2584 path.lineTo(0, 1);
2585 path.close();
2586 path.moveTo(0, 0);
2587 path.lineTo(0, 0);
2588 path.quadTo(0, 2, 1, 2);
2589 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002590 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002591}
2592
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002593static void testQuadratic24(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002594 SkPath path;
2595 path.moveTo(0, 0);
2596 path.quadTo(1, 0, 0, 1);
2597 path.lineTo(0, 1);
2598 path.close();
2599 path.moveTo(0, 0);
2600 path.lineTo(1, 0);
2601 path.quadTo(2, 0, 0, 1);
2602 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002603 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002604}
2605
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002606static void testQuadratic25(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002607 SkPath path;
2608 path.moveTo(0, 0);
2609 path.quadTo(1, 0, 1, 1);
2610 path.lineTo(1, 1);
2611 path.close();
2612 path.moveTo(0, 0);
2613 path.lineTo(0, 0);
2614 path.quadTo(2, 1, 0, 2);
2615 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002616 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002617}
2618
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002619static void testQuadratic26(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002620 SkPath path;
2621 path.moveTo(0, 0);
2622 path.quadTo(1, 0, 1, 1);
2623 path.lineTo(0, 2);
2624 path.close();
2625 path.moveTo(0, 0);
2626 path.lineTo(0, 0);
2627 path.quadTo(1, 0, 0, 1);
2628 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002629 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002630}
2631
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002632static void testQuadratic27(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002633 SkPath path;
2634 path.moveTo(0, 0);
2635 path.quadTo(1, 0, 1, 1);
2636 path.lineTo(2, 1);
2637 path.close();
2638 path.moveTo(0, 0);
2639 path.lineTo(0, 0);
2640 path.quadTo(2, 1, 0, 2);
2641 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002642 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002643}
2644
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002645static void testQuadratic28(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002646 SkPath path;
2647 path.moveTo(0, 0);
2648 path.quadTo(1, 0, 0, 1);
2649 path.lineTo(0, 1);
2650 path.close();
2651 path.moveTo(0, 0);
2652 path.lineTo(0, 2);
2653 path.quadTo(1, 2, 0, 3);
2654 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002655 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002656}
2657
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002658static void testQuadratic29(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002659 SkPath path;
2660 path.moveTo(0, 0);
2661 path.quadTo(1, 0, 2, 1);
2662 path.lineTo(0, 2);
2663 path.close();
2664 path.moveTo(0, 0);
2665 path.lineTo(0, 0);
2666 path.quadTo(1, 0, 0, 1);
2667 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002668 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002669}
2670
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002671static void testQuadratic30(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002672 SkPath path;
2673 path.moveTo(0, 0);
2674 path.quadTo(1, 0, 1, 2);
2675 path.lineTo(1, 2);
2676 path.close();
2677 path.moveTo(0, 0);
2678 path.lineTo(1, 0);
2679 path.quadTo(0, 1, 1, 2);
2680 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002681 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002682}
2683
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002684static void testQuadratic31(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002685 SkPath path;
2686 path.moveTo(0, 0);
2687 path.quadTo(1, 0, 1, 2);
2688 path.lineTo(1, 2);
2689 path.close();
2690 path.moveTo(0, 0);
2691 path.lineTo(1, 0);
2692 path.quadTo(0, 1, 1, 3);
2693 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002694 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002695}
2696
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002697static void testQuadratic32(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002698 SkPath path;
2699 path.moveTo(0, 0);
2700 path.quadTo(1, 0, 2, 3);
2701 path.lineTo(2, 3);
2702 path.close();
2703 path.moveTo(0, 0);
2704 path.lineTo(0, 0);
2705 path.quadTo(3, 1, 0, 2);
2706 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002707 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002708}
2709
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002710static void testQuadratic33(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002711 SkPath path;
2712 path.moveTo(0, 0);
2713 path.quadTo(2, 0, 0, 1);
2714 path.lineTo(0, 1);
2715 path.close();
2716 path.moveTo(0, 0);
2717 path.lineTo(1, 1);
2718 path.quadTo(2, 1, 2, 2);
2719 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002720 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002721}
2722
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002723static void testQuadratic34(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002724 SkPath path;
2725 path.moveTo(0, 0);
2726 path.quadTo(2, 0, 0, 1);
2727 path.lineTo(0, 1);
2728 path.close();
2729 path.moveTo(1, 0);
2730 path.lineTo(1, 1);
2731 path.quadTo(2, 1, 1, 2);
2732 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002733 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002734}
2735
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002736static void testQuadratic35(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002737 SkPath path;
2738 path.moveTo(0, 0);
2739 path.quadTo(0, 1, 1, 1);
2740 path.lineTo(1, 3);
2741 path.close();
2742 path.moveTo(2, 0);
2743 path.lineTo(3, 0);
2744 path.quadTo(0, 1, 1, 1);
2745 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002746 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002747}
2748
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002749static void testQuadratic36(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002750 SkPath path;
2751 path.moveTo(0, 0);
2752 path.quadTo(2, 1, 2, 3);
2753 path.lineTo(2, 3);
2754 path.close();
2755 path.moveTo(3, 1);
2756 path.lineTo(1, 2);
2757 path.quadTo(3, 2, 1, 3);
2758 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002759 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002760}
2761
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002762static void testQuadratic37(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002763 SkPath path;
2764 path.moveTo(0, 0);
2765 path.quadTo(0, 2, 1, 2);
2766 path.lineTo(1, 2);
2767 path.close();
2768 path.moveTo(0, 0);
2769 path.lineTo(3, 1);
2770 path.quadTo(0, 2, 1, 2);
2771 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002772 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002773}
2774
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002775static void testQuadratic38(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002776 SkPath path;
2777 path.moveTo(1, 0);
2778 path.quadTo(0, 1, 1, 1);
2779 path.lineTo(1, 1);
2780 path.close();
2781 path.moveTo(1, 0);
2782 path.lineTo(1, 2);
2783 path.quadTo(2, 2, 1, 3);
2784 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002785 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002786}
2787
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002788static void testQuadratic51(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002789 SkPath path;
2790 path.moveTo(369.863983f, 145.645813f);
2791 path.quadTo(382.380371f, 121.254936f, 406.236359f, 121.254936f);
2792 path.lineTo(369.863983f, 145.645813f);
2793 path.close();
2794 path.moveTo(369.970581f, 137.94342f);
2795 path.quadTo(383.98465f, 121.254936f, 406.235992f, 121.254936f);
2796 path.lineTo(369.970581f, 137.94342f);
2797 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002798 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002799}
2800
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002801static void testQuadratic53(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002802 SkPath path;
2803 path.moveTo(303.12088f, 141.299606f);
2804 path.lineTo(330.463562f, 217.659027f);
2805 path.lineTo(303.12088f, 141.299606f);
2806 path.close();
2807 path.moveTo(371.919067f, 205.854996f);
2808 path.lineTo(326.236786f, 205.854996f);
2809 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
2810 path.lineTo(371.919067f, 205.854996f);
2811 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002812 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002813}
caryclark@google.com570863f2013-09-16 15:55:01 +00002814
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002815static void testQuadratic55(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002816 SkPath path;
2817path.moveTo(303.12088f, 141.299606f);
2818path.lineTo(330.463562f, 217.659027f);
2819path.lineTo(358.606506f, 141.299606f);
2820path.lineTo(303.12088f, 141.299606f);
2821path.close();
2822path.moveTo(326.236786f, 205.854996f);
2823path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
2824path.lineTo(326.236786f, 205.854996f);
2825path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002826 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002827}
2828
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002829static void testQuadratic56(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002830 SkPath path;
2831path.moveTo(366.608826f, 151.196014f);
2832path.quadTo(378.803101f, 136.674606f, 398.164948f, 136.674606f);
2833path.lineTo(354.009216f, 208.816208f);
2834path.lineTo(393.291473f, 102.232819f);
2835path.lineTo(359.978058f, 136.581512f);
2836path.quadTo(378.315979f, 136.581512f, 388.322723f, 149.613556f);
2837path.lineTo(364.390686f, 157.898193f);
2838path.quadTo(375.281769f, 136.674606f, 396.039917f, 136.674606f);
2839path.lineTo(350, 120);
2840path.lineTo(366.608826f, 151.196014f);
2841path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002842 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002843}
2844
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002845static void testLine80(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002846 SkPath path;
2847path.moveTo(4, 0);
2848path.lineTo(3, 7);
2849path.lineTo(7, 5);
2850path.lineTo(2, 2);
2851path.close();
2852path.moveTo(0, 6);
2853path.lineTo(6, 12);
2854path.lineTo(8, 3);
2855path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002856 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002857}
2858
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002859static void testQuadratic58(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002860 SkPath path;
caryclark@google.com07e97fc2013-07-08 17:17:02 +00002861 path.moveTo(283.714233f, 240);
2862 path.lineTo(283.714233f, 141.299606f);
2863 path.lineTo(303.12088f, 141.299606f);
2864 path.lineTo(330.463562f, 217.659027f);
2865 path.lineTo(358.606506f, 141.299606f);
2866 path.lineTo(362.874634f, 159.705902f);
2867 path.lineTo(335.665344f, 233.397751f);
2868 path.lineTo(322.12738f, 233.397751f);
2869 path.lineTo(295.718353f, 159.505829f);
2870 path.lineTo(295.718353f, 240);
2871 path.lineTo(283.714233f, 240);
2872 path.close();
2873 path.moveTo(322.935669f, 231.030273f);
2874 path.quadTo(312.832214f, 220.393295f, 312.832214f, 203.454178f);
2875 path.quadTo(312.832214f, 186.981888f, 321.73526f, 176.444946f);
2876 path.quadTo(330.638306f, 165.90802f, 344.509705f, 165.90802f);
2877 path.quadTo(357.647522f, 165.90802f, 364.81665f, 175.244537f);
2878 path.lineTo(371.919067f, 205.854996f);
2879 path.lineTo(326.236786f, 205.854996f);
2880 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
2881 path.lineTo(322.935669f, 231.030273f);
2882 path.close();
2883 path.moveTo(326.837006f, 195.984955f);
2884 path.lineTo(358.78125f, 195.984955f);
2885 path.quadTo(358.78125f, 175.778046f, 343.709442f, 175.778046f);
2886 path.quadTo(328.570923f, 175.778046f, 326.837006f, 195.984955f);
2887 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002888 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002889}
2890
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002891static void testQuadratic59x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002892 SkPath path;
2893 path.setFillType(SkPath::kEvenOdd_FillType);
2894 path.moveTo(0, 0);
2895 path.quadTo(0, 0, 0, 0);
2896 path.lineTo(2, 2);
2897 path.close();
2898 path.moveTo(0, 0);
2899 path.lineTo(2, 0);
2900 path.quadTo(3, 1, 1, 2);
2901 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002902 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002903}
2904
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002905static void testQuadratic59(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002906 SkPath path;
2907 path.setFillType(SkPath::kWinding_FillType);
2908 path.moveTo(0, 0);
2909 path.quadTo(0, 0, 0, 0);
2910 path.lineTo(2, 2);
2911 path.close();
2912 path.moveTo(0, 0);
2913 path.lineTo(2, 0);
2914 path.quadTo(3, 1, 1, 2);
2915 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002916 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002917}
2918
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002919static void testQuadratic63(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002920 SkPath path;
2921 path.moveTo(0, 0);
2922 path.quadTo(0, 0, 0, 0);
2923 path.lineTo(3, 2);
2924 path.close();
2925 path.moveTo(1, 0);
2926 path.lineTo(2, 1);
2927 path.quadTo(2, 1, 2, 2);
2928 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002929 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002930}
2931
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002932static void testQuadratic64(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002933 SkPath path;
2934 path.moveTo(0, 0);
2935 path.quadTo(0, 0, 0, 0);
2936 path.lineTo(2, 3);
2937 path.close();
2938 path.moveTo(1, 2);
2939 path.lineTo(2, 2);
2940 path.quadTo(0, 3, 3, 3);
2941 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002942 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002943}
2944
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002945static void testQuadratic65(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002946 SkPath path;
2947 path.moveTo(0, 0);
2948 path.quadTo(0, 0, 0, 0);
2949 path.lineTo(3, 2);
2950 path.close();
2951 path.moveTo(2, 1);
2952 path.lineTo(2, 2);
2953 path.quadTo(0, 3, 1, 3);
2954 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002955 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002956}
2957
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002958static void testQuadratic67x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002959 SkPath path;
2960 path.setFillType(SkPath::kEvenOdd_FillType);
2961 path.moveTo(0, 0);
2962 path.quadTo(0, 0, 2, 1);
2963 path.lineTo(2, 2);
2964 path.close();
2965 path.moveTo(0, 0);
2966 path.lineTo(2, 0);
2967 path.quadTo(1, 1, 3, 2);
2968 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002969 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002970}
2971
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002972static void testQuadratic68(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002973 SkPath path;
2974 path.moveTo(0, 0);
2975 path.quadTo(1, 0, 0, 1);
2976 path.lineTo(1, 2);
2977 path.close();
2978 path.moveTo(0, 0);
2979 path.lineTo(0, 0);
2980 path.quadTo(0, 1, 2, 1);
2981 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002982 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002983}
2984
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002985static void testQuadratic69(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002986 SkPath path;
2987 path.moveTo(0, 0);
2988 path.quadTo(0, 0, 0, 1);
2989 path.lineTo(3, 2);
2990 path.close();
2991 path.moveTo(2, 0);
2992 path.lineTo(1, 1);
2993 path.quadTo(3, 2, 2, 3);
2994 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002995 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002996}
2997
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00002998static void testQuadratic70x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002999 SkPath path;
3000 path.setFillType(SkPath::kEvenOdd_FillType);
3001 path.moveTo(0, 0);
3002 path.quadTo(1, 0, 0, 1);
3003 path.lineTo(1, 2);
3004 path.close();
3005 path.moveTo(0, 0);
3006 path.lineTo(0, 0);
3007 path.quadTo(0, 1, 2, 1);
3008 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003009 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003010}
3011
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003012static void testQuadratic71(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003013 SkPath path;
3014 path.moveTo(0, 0);
3015 path.quadTo(1, 0, 1, 1);
3016 path.lineTo(3, 2);
3017 path.close();
3018 path.moveTo(0, 0);
3019 path.lineTo(0, 0);
3020 path.quadTo(1, 1, 3, 1);
3021 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003022 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003023}
3024
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003025static void testQuadratic72(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003026 SkPath path;
3027 path.moveTo(0, 0);
3028 path.quadTo(1, 0, 1, 2);
3029 path.lineTo(1, 2);
3030 path.close();
3031 path.moveTo(0, 0);
3032 path.lineTo(1, 0);
3033 path.quadTo(0, 1, 3, 2);
3034 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003035 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003036}
3037
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003038static void testQuadratic73(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003039 SkPath path;
3040 path.moveTo(0, 0);
3041 path.quadTo(1, 0, 0, 3);
3042 path.lineTo(0, 3);
3043 path.close();
3044 path.moveTo(0, 0);
3045 path.lineTo(1, 0);
3046 path.quadTo(0, 1, 1, 1);
3047 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003048 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003049}
3050
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003051static void testQuadratic74(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003052 SkPath path;
3053 path.moveTo(0, 0);
3054 path.quadTo(1, 0, 1, 3);
3055 path.lineTo(1, 3);
3056 path.close();
3057 path.moveTo(0, 0);
3058 path.lineTo(0, 1);
3059 path.quadTo(3, 2, 2, 3);
3060 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003061 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003062}
3063
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003064static void testQuadratic75(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003065 SkPath path;
3066 path.moveTo(0, 0);
3067 path.quadTo(1, 0, 1, 3);
3068 path.lineTo(2, 3);
3069 path.close();
3070 path.moveTo(0, 0);
3071 path.lineTo(0, 1);
3072 path.quadTo(3, 2, 2, 3);
3073 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003074 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003075}
3076
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003077static void testQuadratic76(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003078 SkPath path;
3079 path.moveTo(0, 0);
3080 path.quadTo(0, 0, 0, 0);
3081 path.lineTo(2, 3);
3082 path.close();
3083 path.moveTo(1, 0);
3084 path.lineTo(1, 2);
3085 path.quadTo(1, 2, 2, 2);
3086 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003087 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003088}
3089
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003090static void testQuadratic77(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003091 SkPath path;
3092 path.moveTo(0, 0);
3093 path.quadTo(1, 0, 1, 1);
3094 path.lineTo(3, 1);
3095 path.close();
3096 path.moveTo(0, 0);
3097 path.lineTo(1, 0);
3098 path.quadTo(0, 1, 3, 2);
3099 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003100 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003101}
3102
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003103static void testQuadratic78(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003104 SkPath path;
3105 path.moveTo(0, 0);
3106 path.quadTo(1, 0, 1, 2);
3107 path.lineTo(3, 2);
3108 path.close();
3109 path.moveTo(0, 0);
3110 path.lineTo(0, 0);
3111 path.quadTo(2, 1, 0, 2);
3112 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003113 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003114}
3115
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003116static void testQuadratic79(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003117 SkPath path;
3118 path.moveTo(0, 0);
3119 path.quadTo(1, 0, 1, 2);
3120 path.lineTo(3, 2);
3121 path.close();
3122 path.moveTo(0, 0);
3123 path.lineTo(1, 0);
3124 path.quadTo(0, 1, 3, 2);
3125 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003126 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003127}
3128
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003129static void testEight1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003130 SkPath path;
3131 path.moveTo(0, 0);
3132 path.lineTo(2, 2);
3133 path.lineTo(0, 2);
3134 path.lineTo(2, 0);
3135 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003136 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003137}
3138
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003139static void testEight2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003140 SkPath path;
3141 path.moveTo(0, 0);
3142 path.lineTo(2, 0);
3143 path.lineTo(0, 2);
3144 path.lineTo(2, 2);
3145 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003146 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003147}
3148
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003149static void testEight3(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003150 SkPath path;
3151 path.moveTo(0, 0);
3152 path.lineTo(0, 2);
3153 path.lineTo(2, 0);
3154 path.lineTo(2, 2);
3155 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003156 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003157}
3158
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003159static void testEight4(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003160 SkPath path;
3161 path.moveTo(0, 0);
3162 path.lineTo(2, 2);
3163 path.lineTo(2, 0);
3164 path.lineTo(0, 2);
3165 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003166 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003167}
3168
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003169static void testEight5(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003170 SkPath path;
3171 path.moveTo(1, 0);
3172 path.lineTo(1, 2);
3173 path.lineTo(0, 2);
3174 path.lineTo(2, 0);
3175 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003176 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003177}
3178
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003179static void testEight6(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003180 SkPath path;
3181 path.moveTo(1, 0);
3182 path.lineTo(2, 0);
3183 path.lineTo(0, 2);
3184 path.lineTo(1, 2);
3185 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003186 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003187}
3188
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003189static void testEight7(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003190 SkPath path;
3191 path.moveTo(0, 0);
3192 path.lineTo(0, 1);
3193 path.lineTo(2, 1);
3194 path.lineTo(2, 2);
3195 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003196 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003197}
3198
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003199static void testEight8(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003200 SkPath path;
3201 path.moveTo(0, 0);
3202 path.lineTo(2, 2);
3203 path.lineTo(2, 1);
3204 path.lineTo(0, 1);
3205 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003206 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003207}
3208
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003209static void testEight9(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003210 SkPath path;
3211 path.moveTo(1, 0);
3212 path.lineTo(1, 2);
3213 path.lineTo(2, 1);
3214 path.lineTo(0, 1);
3215 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003216 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003217}
3218
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003219static void testEight10(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003220 SkPath path;
3221 path.moveTo(1, 0);
3222 path.lineTo(0, 1);
3223 path.lineTo(2, 1);
3224 path.lineTo(1, 2);
3225 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003226 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003227}
3228
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003229static void testQuadratic80(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003230 SkPath path;
3231 path.moveTo(0, 0);
3232 path.quadTo(1, 0, 2, 3);
3233 path.lineTo(2, 3);
3234 path.close();
3235 path.moveTo(1, 0);
3236 path.lineTo(3, 0);
3237 path.quadTo(0, 1, 1, 1);
3238 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003239 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003240}
3241
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003242static void testQuadratic81(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003243 SkPath path;
3244 path.moveTo(0, 0);
3245 path.quadTo(2, 0, 1, 1);
3246 path.lineTo(1, 1);
3247 path.close();
3248 path.moveTo(0, 0);
3249 path.lineTo(0, 0);
3250 path.quadTo(2, 1, 0, 2);
3251 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003252 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003253}
3254
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003255static void testQuadratic82(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003256 SkPath path;
3257 path.moveTo(0, 0);
3258 path.quadTo(2, 0, 1, 1);
3259 path.lineTo(0, 3);
3260 path.close();
3261 path.moveTo(0, 0);
3262 path.lineTo(0, 0);
3263 path.quadTo(2, 1, 0, 2);
3264 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003265 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003266}
3267
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003268static void testQuadratic83(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003269 SkPath path;
3270 path.moveTo(0, 0);
3271 path.quadTo(0, 0, 2, 0);
3272 path.lineTo(2, 2);
3273 path.close();
3274 path.moveTo(0, 1);
3275 path.lineTo(0, 2);
3276 path.quadTo(2, 2, 1, 3);
3277 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003278 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003279}
3280
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003281static void testQuadratic84(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003282 SkPath path;
3283 path.moveTo(0, 0);
3284 path.quadTo(2, 0, 1, 1);
3285 path.lineTo(2, 1);
3286 path.close();
3287 path.moveTo(1, 0);
3288 path.lineTo(2, 0);
3289 path.quadTo(0, 1, 2, 2);
3290 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003291 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003292}
3293
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003294static void testQuadratic85(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003295 SkPath path;
3296 path.moveTo(0, 0);
3297 path.quadTo(3, 0, 1, 1);
3298 path.lineTo(1, 1);
3299 path.close();
3300 path.moveTo(1, 0);
3301 path.lineTo(3, 0);
3302 path.quadTo(0, 1, 1, 2);
3303 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003304 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003305}
3306
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003307static void testQuadratic86(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003308 SkPath path;
3309 path.moveTo(0, 0);
3310 path.quadTo(0, 1, 1, 1);
3311 path.lineTo(2, 3);
3312 path.close();
3313 path.moveTo(0, 0);
3314 path.lineTo(0, 0);
3315 path.quadTo(1, 1, 1, 3);
3316 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003317 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003318}
3319
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003320static void testQuadratic87(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003321 SkPath path;
3322 path.moveTo(0, 0);
3323 path.quadTo(2, 1, 0, 2);
3324 path.lineTo(2, 3);
3325 path.close();
3326 path.moveTo(0, 0);
3327 path.lineTo(1, 1);
3328 path.quadTo(0, 2, 3, 2);
3329 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003330 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003331}
3332
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003333static void testQuadratic88(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003334 SkPath path;
3335 path.moveTo(0, 0);
3336 path.quadTo(2, 1, 0, 2);
3337 path.lineTo(2, 2);
3338 path.close();
3339 path.moveTo(1, 0);
3340 path.lineTo(1, 1);
3341 path.quadTo(0, 2, 2, 2);
3342 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003343 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003344}
3345
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003346static void testQuadratic89x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003347 SkPath path;
3348 path.setFillType(SkPath::kEvenOdd_FillType);
3349 path.moveTo(0, 0);
3350 path.quadTo(3, 1, 2, 2);
3351 path.lineTo(0, 3);
3352 path.close();
3353 path.moveTo(0, 0);
3354 path.lineTo(2, 1);
3355 path.quadTo(3, 1, 3, 3);
3356 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003357 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003358}
3359
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003360static void testQuadratic90x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003361 SkPath path;
3362 path.setFillType(SkPath::kEvenOdd_FillType);
3363 path.moveTo(0, 0);
3364 path.quadTo(3, 0, 2, 2);
3365 path.lineTo(1, 3);
3366 path.close();
3367 path.moveTo(0, 0);
3368 path.lineTo(0, 1);
3369 path.quadTo(3, 2, 2, 3);
3370 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003371 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003372}
3373
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003374static void testQuadratic91(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003375 SkPath path;
3376 path.moveTo(0, 0);
3377 path.quadTo(3, 2, 2, 3);
3378 path.lineTo(2, 3);
3379 path.close();
3380 path.moveTo(0, 0);
3381 path.lineTo(1, 1);
3382 path.quadTo(2, 1, 2, 3);
3383 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003384 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003385}
3386
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003387static void testQuadratic92x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003388 SkPath path;
3389 path.setFillType(SkPath::kEvenOdd_FillType);
3390 path.moveTo(1, 0);
3391 path.quadTo(3, 0, 2, 2);
3392 path.lineTo(2, 2);
3393 path.close();
3394 path.moveTo(2, 0);
3395 path.lineTo(0, 1);
3396 path.quadTo(3, 2, 2, 3);
3397 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003398 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003399}
3400
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003401static void testLine82(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003402 SkPath path;
3403 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction);
3404 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
3405 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003406 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003407}
3408
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003409static void testLine82a(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003410 SkPath path;
3411 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3412 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3413 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003414 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003415}
3416
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003417static void testLine82b(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003418 SkPath path;
3419 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3420 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3421 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003422 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003423}
3424
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003425static void testLine82c(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003426 SkPath path;
3427 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3428 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3429 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003430 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003431}
3432
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003433static void testLine82d(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003434 SkPath path;
3435 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3436 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3437 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003438 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003439}
3440
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003441static void testLine82e(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003442 SkPath path;
3443 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3444 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3445 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003446 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003447}
3448
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003449static void testLine82f(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003450 SkPath path;
3451 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3452 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3453 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003454 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003455}
3456
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003457static void testLine82g(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003458 SkPath path;
3459 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3460 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3461 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003462 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003463}
3464
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003465static void testLine82h(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003466 SkPath path;
3467 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3468 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3469 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003470 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003471}
3472
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003473static void testLine83(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003474 SkPath path;
3475path.addRect(10, 30, 30, 40, SkPath::kCCW_Direction);
3476path.addRect(0, 12, 12, 18, SkPath::kCCW_Direction);
3477path.addRect(4, 13, 13, 16, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003478 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003479}
3480
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003481static void testLine84(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003482 SkPath path;
3483 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction);
3484 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
3485 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
3486 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003487 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003488}
3489
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003490static void testLine84x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003491 SkPath path;
3492 path.setFillType(SkPath::kEvenOdd_FillType);
3493 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction);
3494 path.addRect(10, 20, 40, 30, SkPath::kCCW_Direction);
3495 path.addRect(0, 12, 12, 12, SkPath::kCCW_Direction);
3496 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003497 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003498}
3499
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003500static void testLine85(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003501 SkPath path;
3502 path.addRect(36, 0, 66, 60, SkPath::kCCW_Direction);
3503 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction);
3504 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
3505 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003506 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003507}
3508
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003509static void testQuadralateral1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003510 SkPath path;
3511 path.moveTo(0, 0);
3512 path.lineTo(0, 0);
3513 path.lineTo(0, 0);
3514 path.lineTo(3, 2);
3515 path.close();
3516 path.moveTo(0, 0);
3517 path.lineTo(2, 1);
3518 path.lineTo(2, 2);
3519 path.lineTo(2, 3);
3520 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003521 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003522}
3523
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003524static void testCubic1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003525 SkPath path;
3526 path.moveTo(0, 0);
3527 path.cubicTo(0, 1, 1, 1, 1, 0);
3528 path.close();
3529 path.moveTo(1, 0);
3530 path.cubicTo(0, 0, 0, 1, 1, 1);
3531 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003532 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003533}
3534
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003535static void testQuadratic93(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003536 SkPath path;
3537 path.moveTo(3, 0);
3538 path.quadTo(0, 1, 3, 2);
3539 path.lineTo(0, 3);
3540 path.close();
3541 path.moveTo(1, 0);
3542 path.lineTo(2, 0);
3543 path.quadTo(1, 1, 2, 2);
3544 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003545 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003546}
3547
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003548static void testCubic2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003549 SkPath path;
3550 path.moveTo(0,2);
3551 path.cubicTo(0,3, 2,1, 4,0);
3552 path.close();
3553 path.moveTo(1,2);
3554 path.cubicTo(0,4, 2,0, 3,0);
3555 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003556 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003557}
3558
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003559static void testQuad1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003560 SkPath path;
3561 path.moveTo(0,0);
3562 path.quadTo(0,0, 0,1);
3563 path.lineTo(1,1);
3564 path.close();
3565 path.moveTo(0,0);
3566 path.quadTo(1,1, 0,2);
3567 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003568 testSimplify(reporter, path, filename);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003569}
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003570
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003571static void testQuadralateral2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.come942bc32013-04-10 18:53:01 +00003572 SkPath path;
3573 path.moveTo(0, 0);
3574 path.lineTo(2, 2);
3575 path.lineTo(0, 3);
3576 path.lineTo(3, 3);
3577 path.close();
3578 path.moveTo(2, 0);
3579 path.lineTo(3, 0);
3580 path.lineTo(0, 1);
3581 path.lineTo(1, 2);
3582 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003583 testSimplify(reporter, path, filename);
caryclark@google.come942bc32013-04-10 18:53:01 +00003584}
3585
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003586static void testQuadratic94(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003587 SkPath path;
3588 path.moveTo(0, 0);
3589 path.lineTo(8, 8);
3590 path.quadTo(8, 4, 4, 4);
3591 path.quadTo(4, 0, 0, 0);
3592 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003593 testSimplify(reporter, path, filename);
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003594}
3595
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003596static void testQuadratic95(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003597 SkPath path;
3598 path.moveTo(8, 8);
3599 path.lineTo(0, 0);
3600 path.quadTo(4, 0, 4, 4);
3601 path.quadTo(8, 4, 8, 8);
3602 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003603 testSimplify(reporter, path, filename);
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003604}
3605
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003606static void testQuadratic96(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003607 SkPath path;
3608 path.moveTo(8, 0);
3609 path.lineTo(0, 8);
3610 path.quadTo(0, 4, 4, 4);
3611 path.quadTo(4, 0, 8, 0);
3612 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003613 testSimplify(reporter, path, filename);
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003614}
3615
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003616static void testQuadratic97(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003617 SkPath path;
3618 path.moveTo(0, 8);
3619 path.lineTo(8, 0);
3620 path.quadTo(4, 0, 4, 4);
3621 path.quadTo(0, 4, 0, 8);
3622 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003623 testSimplify(reporter, path, filename);
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003624}
3625
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003626static void testTriangles1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com03610322013-04-18 15:58:21 +00003627 SkPath path;
3628 path.moveTo(0, 0);
3629 path.lineTo(1, 0);
3630 path.lineTo(3, 3);
3631 path.close();
3632 path.moveTo(0, 0);
3633 path.lineTo(1, 2);
3634 path.lineTo(1, 1);
3635 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003636 testSimplify(reporter, path, filename);
caryclark@google.com03610322013-04-18 15:58:21 +00003637}
3638
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003639static void testTriangles2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com03610322013-04-18 15:58:21 +00003640 SkPath path;
3641 path.moveTo(0, 0);
3642 path.lineTo(1, 0);
3643 path.lineTo(3, 3);
3644 path.close();
3645 path.moveTo(1, 1);
3646 path.lineTo(2, 3);
3647 path.lineTo(1, 2);
3648 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003649 testSimplify(reporter, path, filename);
caryclark@google.com03610322013-04-18 15:58:21 +00003650}
3651
caryclark@google.com66560ca2013-04-26 19:51:16 +00003652// A test this for this case:
3653// contourA has two segments that are coincident
3654// contourB has two segments that are coincident in the same place
3655// each ends up with +2/0 pairs for winding count
3656// since logic in OpSegment::addTCoincident doesn't transfer count (only increments/decrements)
3657// can this be resolved to +4/0 ?
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003658static void testAddTCoincident1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com66560ca2013-04-26 19:51:16 +00003659 SkPath path;
3660 path.moveTo(2, 0);
3661 path.lineTo(2, 2);
3662 path.lineTo(1, 1);
3663 path.lineTo(2, 0);
3664 path.lineTo(2, 2);
3665 path.lineTo(1, 1);
3666 path.close();
3667 path.moveTo(2, 0);
3668 path.lineTo(2, 2);
3669 path.lineTo(3, 1);
3670 path.lineTo(2, 0);
3671 path.lineTo(2, 2);
3672 path.lineTo(3, 1);
3673 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003674 testSimplify(reporter, path, filename);
caryclark@google.com66560ca2013-04-26 19:51:16 +00003675}
3676
3677// test with implicit close
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003678static void testAddTCoincident2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com66560ca2013-04-26 19:51:16 +00003679 SkPath path;
3680 path.moveTo(2, 0);
3681 path.lineTo(2, 2);
3682 path.lineTo(1, 1);
3683 path.lineTo(2, 0);
3684 path.lineTo(2, 2);
3685 path.lineTo(1, 1);
3686 path.moveTo(2, 0);
3687 path.lineTo(2, 2);
3688 path.lineTo(3, 1);
3689 path.lineTo(2, 0);
3690 path.lineTo(2, 2);
3691 path.lineTo(3, 1);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003692 testSimplify(reporter, path, filename);
caryclark@google.com66560ca2013-04-26 19:51:16 +00003693}
3694
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003695static void testQuad2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.coma5e55922013-05-07 18:51:31 +00003696 SkPath path;
3697 path.moveTo(1, 0);
3698 path.quadTo(0, 1, 3, 2);
3699 path.lineTo(2, 3);
3700 path.close();
3701 path.moveTo(0, 0);
3702 path.lineTo(1, 0);
3703 path.quadTo(0, 1, 1, 1);
3704 path.close();
3705}
3706
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003707static void testQuad3(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.coma5e55922013-05-07 18:51:31 +00003708 SkPath path;
3709 path.moveTo(1, 0);
3710 path.quadTo(0, 1, 3, 2);
3711 path.lineTo(3, 3);
3712 path.close();
3713 path.moveTo(0, 0);
3714 path.lineTo(1, 0);
3715 path.quadTo(0, 1, 1, 1);
3716 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003717 testSimplify(reporter, path, filename);
caryclark@google.coma5e55922013-05-07 18:51:31 +00003718}
3719
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003720static void testQuad4(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.coma5e55922013-05-07 18:51:31 +00003721 SkPath path;
3722 path.moveTo(2, 0);
3723 path.quadTo(0, 1, 1, 1);
3724 path.lineTo(3, 3);
3725 path.close();
3726 path.moveTo(0, 0);
3727 path.lineTo(2, 0);
3728 path.quadTo(0, 1, 2, 2);
3729 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003730 testSimplify(reporter, path, filename);
caryclark@google.coma5e55922013-05-07 18:51:31 +00003731}
3732
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003733static void testQuad5(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.coma5e55922013-05-07 18:51:31 +00003734 SkPath path;
3735 path.moveTo(2, 0);
3736 path.quadTo(0, 1, 2, 2);
3737 path.lineTo(1, 3);
3738 path.close();
3739 path.moveTo(0, 0);
3740 path.lineTo(2, 0);
3741 path.quadTo(0, 1, 1, 1);
3742 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003743 testSimplify(reporter, path, filename);
caryclark@google.coma5e55922013-05-07 18:51:31 +00003744}
3745
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003746static void testQuad6(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.coma5e55922013-05-07 18:51:31 +00003747 SkPath path;
3748 path.moveTo(2, 0);
3749 path.quadTo(0, 1, 2, 2);
3750 path.lineTo(1, 3);
3751 path.close();
3752 path.moveTo(1, 0);
3753 path.lineTo(2, 0);
3754 path.quadTo(0, 1, 1, 1);
3755 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003756 testSimplify(reporter, path, filename);
caryclark@google.coma5e55922013-05-07 18:51:31 +00003757}
3758
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003759static void testQuad7(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.coma5e55922013-05-07 18:51:31 +00003760 SkPath path;
3761 path.moveTo(3, 0);
3762 path.quadTo(0, 1, 1, 1);
3763 path.lineTo(1, 3);
3764 path.close();
3765 path.moveTo(1, 0);
3766 path.lineTo(3, 0);
3767 path.quadTo(0, 1, 1, 2);
3768 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003769 testSimplify(reporter, path, filename);
caryclark@google.coma5e55922013-05-07 18:51:31 +00003770}
3771
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003772static void testQuadLineIntersect1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.comcffbcc32013-06-04 17:59:42 +00003773 SkPath path;
3774 path.moveTo(0, 0);
3775 path.quadTo(3, 1, 0, 3);
3776 path.lineTo(2, 3);
3777 path.close();
3778 path.moveTo(2, 0);
3779 path.lineTo(0, 1);
3780 path.quadTo(3, 1, 0, 2);
3781 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003782 testSimplify(reporter, path, filename);
caryclark@google.comcffbcc32013-06-04 17:59:42 +00003783}
3784
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003785static void testQuadLineIntersect2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.comcffbcc32013-06-04 17:59:42 +00003786 SkPath path;
3787 path.moveTo(0, 0);
3788 path.quadTo(3, 1, 0, 3);
3789 path.lineTo(0, 3);
3790 path.close();
3791 path.moveTo(2, 0);
3792 path.lineTo(0, 1);
3793 path.quadTo(3, 1, 0, 2);
3794 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003795 testSimplify(reporter, path, filename);
caryclark@google.comcffbcc32013-06-04 17:59:42 +00003796}
3797
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003798static void testQuadLineIntersect3(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.comcffbcc32013-06-04 17:59:42 +00003799 SkPath path;
3800 path.moveTo(0, 0);
3801 path.quadTo(3, 1, 0, 3);
3802 path.lineTo(1, 3);
3803 path.close();
3804 path.moveTo(2, 0);
3805 path.lineTo(0, 1);
3806 path.quadTo(3, 1, 0, 2);
3807 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003808 testSimplify(reporter, path, filename);
caryclark@google.comcffbcc32013-06-04 17:59:42 +00003809}
3810
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003811static void skphealth_com76(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com07e97fc2013-07-08 17:17:02 +00003812 SkPath path;
3813 path.setFillType(SkPath::kWinding_FillType);
3814 path.moveTo(708.099182f, 7.09919119f);
3815 path.lineTo(708.099182f, 7.09920025f);
3816 path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f);
3817 path.lineTo(704.000000f, 33.0000000f);
3818 path.lineTo(705.000000f, 33.0000000f);
3819 path.lineTo(705.000000f, 17.0000000f);
3820 path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f, 7.80761385f);
3821 path.lineTo(708.099182f, 7.09919119f);
3822 path.close();
3823 path.moveTo(704.000000f, 3.00000000f);
3824 path.lineTo(704.000000f, 33.0000000f);
3825 path.lineTo(705.000000f, 33.0000000f);
3826 path.lineTo(719.500000f, 3.00000000f);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003827 testSimplify(reporter, path, filename);
caryclark@google.com07e97fc2013-07-08 17:17:02 +00003828}
3829
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003830static void tooCloseTest(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com570863f2013-09-16 15:55:01 +00003831 SkPath path;
3832 path.moveTo(0, 0);
3833 path.lineTo(1, 1);
3834 path.lineTo(1,-1);
3835 path.close();
3836 path.moveTo(0, 0);
3837 path.lineTo(1,-2);
3838 path.lineTo(1, 2);
3839 path.lineTo(2, 0);
3840 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003841 testSimplify(reporter, path, filename);
caryclark@google.com570863f2013-09-16 15:55:01 +00003842}
3843
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003844static void testRect1(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com570863f2013-09-16 15:55:01 +00003845 SkPath path;
3846 path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction);
3847 path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction);
3848 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
3849 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003850 testSimplify(reporter, path, filename);
caryclark@google.com570863f2013-09-16 15:55:01 +00003851}
3852
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003853static void testRect2(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com570863f2013-09-16 15:55:01 +00003854 SkPath path;
3855 path.setFillType(SkPath::kWinding_FillType);
3856 path.moveTo(0, 0);
3857 path.lineTo(60, 0);
3858 path.lineTo(60, 60);
3859 path.lineTo(0, 60);
3860 path.close();
3861 path.moveTo(30, 20);
3862 path.lineTo(30, 50);
3863 path.lineTo(50, 50);
3864 path.lineTo(50, 20);
3865 path.close();
3866 path.moveTo(24, 20);
3867 path.lineTo(24, 30);
3868 path.lineTo(36, 30);
3869 path.lineTo(36, 20);
3870 path.close();
3871 path.moveTo(32, 24);
3872 path.lineTo(32, 41);
3873 path.lineTo(36, 41);
3874 path.lineTo(36, 24);
3875 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003876 testSimplify(reporter, path, filename);
caryclark@google.com570863f2013-09-16 15:55:01 +00003877}
3878
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003879static void testTriangles3x(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com570863f2013-09-16 15:55:01 +00003880 SkPath path;
3881 path.setFillType(SkPath::kEvenOdd_FillType);
3882 path.moveTo(1, 0);
3883 path.quadTo(0, 1, 3, 2);
3884 path.lineTo(1, 3);
3885 path.close();
3886 path.moveTo(0, 0);
3887 path.lineTo(1, 1);
3888 path.quadTo(2, 1, 0, 2);
3889 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003890 testSimplify(reporter, path, filename);
caryclark@google.com570863f2013-09-16 15:55:01 +00003891}
3892
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003893static void testQuad8(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com570863f2013-09-16 15:55:01 +00003894 SkPath path;
3895 path.moveTo(3, 0);
3896 path.quadTo(0, 1, 3, 2);
3897 path.lineTo(0, 3);
3898 path.close();
3899 path.moveTo(1, 0);
3900 path.lineTo(3, 0);
3901 path.quadTo(1, 1, 2, 2);
3902 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003903 testSimplify(reporter, path, filename);
caryclark@google.com570863f2013-09-16 15:55:01 +00003904}
3905
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003906static void testTriangles4x(skiatest::Reporter* reporter, const char* filename) {
skia.committer@gmail.comb0a05892013-10-03 07:01:37 +00003907 SkPath path;
3908 path.setFillType(SkPath::kEvenOdd_FillType);
3909 path.moveTo(0, 0);
3910 path.quadTo(2, 0, 0, 3);
3911 path.lineTo(2, 3);
3912 path.close();
3913 path.moveTo(0, 0);
3914 path.lineTo(0, 1);
3915 path.quadTo(3, 2, 2, 3);
3916 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003917 testSimplify(reporter, path, filename);
caryclark@google.com7eaa53d2013-10-02 14:49:34 +00003918}
3919
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003920static void testQuad9(skiatest::Reporter* reporter, const char* filename) {
commit-bot@chromium.org866f4e32013-11-21 17:04:29 +00003921 SkPath path;
3922 path.setFillType(SkPath::kEvenOdd_FillType);
3923 path.moveTo(1, 0);
3924 path.quadTo(0, 1, 3, 2);
3925 path.lineTo(1, 3);
3926 path.close();
3927 path.moveTo(1, 0);
3928 path.lineTo(1, 1);
3929 path.quadTo(2, 1, 1, 3);
3930 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003931 testSimplify(reporter, path, filename);
commit-bot@chromium.org866f4e32013-11-21 17:04:29 +00003932}
3933
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003934static void testQuad10(skiatest::Reporter* reporter, const char* filename) {
commit-bot@chromium.org866f4e32013-11-21 17:04:29 +00003935 SkPath path;
3936 path.moveTo(1, 0);
3937 path.quadTo(0, 1, 3, 2);
3938 path.lineTo(3, 3);
3939 path.close();
3940 path.moveTo(1, 0);
3941 path.lineTo(2, 0);
3942 path.quadTo(2, 3, 3, 3);
3943 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003944 testSimplify(reporter, path, filename);
commit-bot@chromium.org866f4e32013-11-21 17:04:29 +00003945}
3946
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003947static void testQuad11(skiatest::Reporter* reporter, const char* filename) {
caryclark@google.com28d219c2013-11-25 13:39:12 +00003948 SkPath path;
skia.committer@gmail.comec18ce72013-11-26 07:02:21 +00003949 path.moveTo(2, 0);
3950 path.quadTo(0, 1, 1, 2);
3951 path.lineTo(1, 2);
3952 path.close();
3953 path.moveTo(0, 0);
3954 path.lineTo(1, 1);
3955 path.quadTo(1, 3, 3, 3);
3956 path.close();
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003957 testSimplify(reporter, path, filename);
skia.committer@gmail.comec18ce72013-11-26 07:02:21 +00003958}
caryclark@google.com28d219c2013-11-25 13:39:12 +00003959
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00003960static void testQuad12(skiatest::Reporter* reporter, const char* filename) {
3961 SkPath path;
3962 path.moveTo(0, 0);
3963 path.quadTo(0, 0, 0, 0);
3964 path.lineTo(0, 1);
3965 path.close();
3966 path.moveTo(0, 0);
3967 path.lineTo(0, 0);
3968 path.quadTo(1, 0, 0, 1);
3969 path.close();
3970 testSimplify(reporter, path, filename);
3971}
3972
3973static void testQuadralateral3(skiatest::Reporter* reporter, const char* filename) {
3974 SkPath path;
3975 path.setFillType(SkPath::kEvenOdd_FillType);
3976 path.moveTo(0, 0);
3977 path.lineTo(0, 0);
3978 path.lineTo(0, 0);
3979 path.lineTo(1, 0);
3980 path.close();
3981 path.moveTo(0, 0);
3982 path.lineTo(0, 0);
3983 path.lineTo(1, 0);
3984 path.lineTo(0, 1);
3985 path.close();
3986 testSimplify(reporter, path, filename);
3987}
3988
3989
3990static void testDegenerate5(skiatest::Reporter* reporter, const char* filename) {
3991 SkPath path;
3992 path.moveTo(0, 0);
3993 path.lineTo(0, 0);
3994 path.lineTo(1, 0);
3995 path.close();
3996 path.moveTo(0, 0);
3997 path.lineTo(1, 0);
3998 path.lineTo(0, 1);
3999 path.close();
4000 testSimplify(reporter, path, filename);
4001}
4002
4003static void testQuadralateral4(skiatest::Reporter* reporter, const char* filename) {
4004 SkPath path;
4005 path.moveTo(0, 0);
4006 path.lineTo(0, 0);
4007 path.lineTo(0, 0);
4008 path.lineTo(3, 1);
4009 path.close();
4010 path.moveTo(0, 0);
4011 path.lineTo(0, 0);
4012 path.lineTo(0, 1);
4013 path.lineTo(3, 1);
4014 path.close();
4015 testSimplify(reporter, path, filename);
4016}
4017
4018static void testDegenerates1(skiatest::Reporter* reporter, const char* filename) {
4019 SkPath path;
4020 path.moveTo(0, 0);
4021 path.quadTo(0, 0, 1, 1);
4022 path.lineTo(2, 3);
4023 path.close();
4024 path.moveTo(0, 0);
4025 path.lineTo(0, 0);
4026 path.quadTo(3, 2, 2, 3);
4027 path.close();
4028 testSimplify(reporter, path, filename);
4029}
4030
4031static void testQuad13(skiatest::Reporter* reporter, const char* filename) {
4032 SkPath path;
4033 path.moveTo(0, 0);
4034 path.quadTo(0, 0, 1, 1);
4035 path.lineTo(2, 3);
4036 path.close();
4037 path.moveTo(0, 0);
4038 path.lineTo(0, 0);
4039 path.quadTo(3, 2, 2, 3);
4040 path.close();
4041 testSimplify(reporter, path, filename);
4042}
4043
4044static void testQuad14(skiatest::Reporter* reporter, const char* filename) {
4045 SkPath path;
4046 path.setFillType(SkPath::kWinding_FillType);
4047 path.moveTo(0, 0);
4048 path.quadTo(0, 0, 1, 1);
4049 path.lineTo(1, 2);
4050 path.close();
4051 path.moveTo(0, 0);
4052 path.lineTo(0, 0);
4053 path.quadTo(3, 1, 1, 3);
4054 path.close();
4055 testSimplify(reporter, path, filename);
4056}
4057
4058static void testQuad15(skiatest::Reporter* reporter, const char* filename) {
4059 SkPath path;
4060 path.moveTo(0, 0);
4061 path.quadTo(0, 0, 1, 1);
4062 path.lineTo(1, 3);
4063 path.close();
4064 path.moveTo(0, 0);
4065 path.lineTo(0, 0);
4066 path.quadTo(2, 0, 1, 3);
4067 path.close();
4068 testSimplify(reporter, path, filename);
4069}
4070
4071static void testQuads16(skiatest::Reporter* reporter, const char* filename) {
4072 SkPath path;
4073 path.moveTo(0, 0);
4074 path.quadTo(0, 0, 1, 1);
4075 path.lineTo(3, 2);
4076 path.close();
4077 path.moveTo(0, 0);
4078 path.lineTo(0, 0);
4079 path.quadTo(0, 1, 3, 2);
4080 path.close();
4081 testSimplify(reporter, path, filename);
4082}
4083
4084static void testQuads17(skiatest::Reporter* reporter, const char* filename) {
4085 SkPath path;
4086 path.moveTo(0, 0);
4087 path.quadTo(0, 0, 1, 1);
4088 path.lineTo(3, 2);
4089 path.close();
4090 path.moveTo(0, 0);
4091 path.lineTo(0, 0);
4092 path.quadTo(0, 2, 3, 2);
4093 path.close();
4094 testSimplify(reporter, path, filename);
4095}
4096
4097static void testQuads18(skiatest::Reporter* reporter, const char* filename) {
4098 SkPath path;
4099 path.moveTo(0, 0);
4100 path.quadTo(0, 0, 1, 1);
4101 path.lineTo(3, 2);
4102 path.close();
4103 path.moveTo(0, 0);
4104 path.lineTo(0, 0);
4105 path.quadTo(1, 2, 3, 2);
4106 path.close();
4107 testSimplify(reporter, path, filename);
4108}
4109
4110static void testQuads19(skiatest::Reporter* reporter, const char* filename) {
4111 SkPath path;
4112 path.moveTo(0, 0);
4113 path.quadTo(0, 0, 2, 1);
4114 path.lineTo(1, 2);
4115 path.close();
4116 path.moveTo(0, 0);
4117 path.lineTo(0, 0);
4118 path.quadTo(2, 1, 1, 2);
4119 path.close();
4120 testSimplify(reporter, path, filename);
4121}
4122
4123static void testQuads20(skiatest::Reporter* reporter, const char* filename) {
4124 SkPath path;
4125 path.moveTo(0, 0);
4126 path.quadTo(0, 0, 2, 1);
4127 path.lineTo(1, 3);
4128 path.close();
4129 path.moveTo(0, 0);
4130 path.lineTo(0, 0);
4131 path.quadTo(2, 1, 1, 3);
4132 path.close();
4133 testSimplify(reporter, path, filename);
4134}
4135
4136static void testQuads21(skiatest::Reporter* reporter, const char* filename) {
4137 SkPath path;
4138 path.moveTo(0, 0);
4139 path.quadTo(0, 0, 1, 1);
4140 path.lineTo(2, 1);
4141 path.close();
4142 path.moveTo(0, 0);
4143 path.lineTo(0, 0);
4144 path.quadTo(3, 0, 2, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004145 path.close();
4146 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004147}
4148
4149static void testQuads22(skiatest::Reporter* reporter, const char* filename) {
4150 SkPath path;
4151 path.moveTo(0, 0);
4152 path.quadTo(0, 0, 2, 0);
4153 path.lineTo(1, 1);
4154 path.close();
4155 path.moveTo(0, 0);
4156 path.lineTo(0, 0);
4157 path.quadTo(0, 1, 3, 2);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004158 path.close();
4159 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004160}
4161
4162static void testQuads23(skiatest::Reporter* reporter, const char* filename) {
4163 SkPath path;
4164 path.moveTo(0, 0);
4165 path.quadTo(0, 0, 1, 0);
4166 path.lineTo(1, 1);
4167 path.close();
4168 path.moveTo(0, 0);
4169 path.lineTo(0, 0);
4170 path.quadTo(0, 1, 3, 2);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004171 path.close();
4172 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004173}
4174
4175static void testQuads24(skiatest::Reporter* reporter, const char* filename) {
4176 SkPath path;
4177 path.moveTo(0, 0);
4178 path.quadTo(0, 0, 0, 1);
4179 path.lineTo(1, 2);
4180 path.close();
4181 path.moveTo(0, 1);
4182 path.lineTo(0, 1);
4183 path.quadTo(0, 2, 3, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004184 path.close();
4185 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004186}
4187
4188static void testQuads25(skiatest::Reporter* reporter, const char* filename) {
4189 SkPath path;
4190 path.moveTo(0, 0);
4191 path.quadTo(0, 0, 0, 1);
4192 path.lineTo(2, 1);
4193 path.close();
4194 path.moveTo(0, 0);
4195 path.lineTo(0, 0);
4196 path.quadTo(3, 0, 2, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004197 path.close();
4198 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004199}
4200
4201static void testQuads26(skiatest::Reporter* reporter, const char* filename) {
4202 SkPath path;
4203 path.moveTo(0, 0);
4204 path.quadTo(0, 0, 3, 0);
4205 path.lineTo(1, 1);
4206 path.close();
4207 path.moveTo(0, 0);
4208 path.lineTo(0, 0);
4209 path.quadTo(0, 1, 3, 2);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004210 path.close();
4211 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004212}
4213
4214static void testQuads27(skiatest::Reporter* reporter, const char* filename) {
4215 SkPath path;
4216 path.moveTo(0, 0);
4217 path.quadTo(0, 0, 2, 0);
4218 path.lineTo(2, 1);
4219 path.close();
4220 path.moveTo(2, 0);
4221 path.lineTo(2, 0);
4222 path.quadTo(3, 0, 1, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004223 path.close();
4224 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004225}
4226
4227static void testQuads28(skiatest::Reporter* reporter, const char* filename) {
4228 SkPath path;
4229 path.moveTo(0, 0);
4230 path.quadTo(0, 0, 0, 1);
4231 path.lineTo(2, 2);
4232 path.close();
4233 path.moveTo(0, 0);
4234 path.lineTo(0, 0);
4235 path.quadTo(3, 0, 2, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004236 path.close();
4237 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004238}
4239
4240static void testQuads29(skiatest::Reporter* reporter, const char* filename) {
4241 SkPath path;
4242 path.moveTo(0, 0);
4243 path.quadTo(0, 0, 3, 0);
4244 path.lineTo(2, 1);
4245 path.close();
4246 path.moveTo(3, 0);
4247 path.lineTo(3, 0);
4248 path.quadTo(3, 1, 0, 2);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004249 path.close();
4250 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004251}
4252
4253static void testQuads30(skiatest::Reporter* reporter, const char* filename) {
4254 SkPath path;
4255 path.moveTo(0, 0);
4256
4257 path.quadTo(0, 0, 2, 0);
4258 path.lineTo(2, 2);
4259 path.close();
4260 path.moveTo(2, 0);
4261 path.lineTo(2, 0);
4262 path.quadTo(3, 2, 1, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004263 path.close();
4264 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004265}
4266
4267static void testQuads31(skiatest::Reporter* reporter, const char* filename) {
4268 SkPath path;
4269 path.moveTo(0, 0);
4270 path.quadTo(0, 0, 2, 1);
4271 path.lineTo(1, 3);
4272 path.close();
4273 path.moveTo(3, 0);
4274 path.lineTo(0, 1);
4275
4276 path.quadTo(2, 1, 1, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004277 path.close();
4278 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004279}
4280
4281static void testQuads32(skiatest::Reporter* reporter, const char* filename) {
4282 SkPath path;
4283 path.moveTo(0, 0);
4284 path.quadTo(0, 0, 1, 1);
4285 path.lineTo(1, 2);
4286 path.close();
4287 path.moveTo(1, 1);
4288 path.lineTo(1, 1);
4289 path.quadTo(3, 1, 0, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004290 path.close();
4291 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004292}
4293
4294static void testQuads33(skiatest::Reporter* reporter, const char* filename) {
4295 SkPath path;
4296 path.moveTo(0, 0);
4297 path.quadTo(0, 0, 1, 1);
4298 path.lineTo(2, 1);
4299 path.close();
4300 path.moveTo(0, 0);
4301 path.lineTo(0, 0);
4302 path.quadTo(3, 0, 2, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004303 path.close();
4304 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004305}
4306
4307static void testQuads34(skiatest::Reporter* reporter, const char* filename) {
4308 SkPath path;
4309 path.moveTo(0, 0);
4310 path.quadTo(0, 0, 1, 0);
4311 path.lineTo(2, 1);
4312 path.close();
4313 path.moveTo(1, 0);
4314 path.lineTo(1, 0);
4315 path.quadTo(2, 0, 3, 3);
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004316 path.close();
4317 testSimplify(reporter, path, filename);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004318}
4319
4320static void testQuads35(skiatest::Reporter* reporter, const char* filename) {
4321 SkPath path;
4322 path.moveTo(0, 0);
4323 path.quadTo(0, 0, 1, 0);
4324 path.lineTo(1, 2);
4325 path.close();
4326 path.moveTo(1, 0);
4327 path.lineTo(1, 0);
4328 path.quadTo(3, 1, 0, 3);
4329 path.close();
4330 testSimplify(reporter, path, filename);
4331}
4332
4333static void testQuads36(skiatest::Reporter* reporter, const char* filename) {
4334 SkPath path;
4335 path.moveTo(1, 0);
4336 path.quadTo(2, 0, 1, 2);
4337 path.lineTo(2, 2);
4338 path.close();
4339 path.moveTo(1, 0);
4340 path.lineTo(1, 0);
4341 path.quadTo(3, 0, 2, 3);
4342 path.close();
4343 testSimplify(reporter, path, filename);
4344}
4345
4346static void testQuads37(skiatest::Reporter* reporter, const char* filename) {
4347 SkPath path;
4348 path.setFillType(SkPath::kEvenOdd_FillType);
4349 path.moveTo(1, 0);
4350 path.quadTo(2, 0, 1, 2);
4351 path.lineTo(2, 2);
4352 path.close();
4353 path.moveTo(1, 0);
4354 path.lineTo(1, 0);
4355 path.quadTo(3, 0, 2, 3);
4356 path.close();
4357 testSimplify(reporter, path, filename);
4358}
4359
4360static void testQuads38(skiatest::Reporter* reporter, const char* filename) {
4361 SkPath path;
4362 path.moveTo(1, 0);
4363 path.quadTo(3, 0, 0, 2);
4364 path.lineTo(3, 2);
4365 path.close();
4366 path.moveTo(1, 0);
4367 path.lineTo(1, 0);
4368 path.quadTo(2, 1, 3, 1);
4369 path.close();
4370 testSimplify(reporter, path, filename);
4371}
4372
4373static void testQuads39(skiatest::Reporter* reporter, const char* filename) {
4374 SkPath path;
4375 path.moveTo(1, 0);
4376 path.quadTo(3, 0, 0, 3);
4377 path.lineTo(0, 3);
4378 path.close();
4379 path.moveTo(1, 1);
4380 path.lineTo(0, 2);
4381 path.quadTo(1, 2, 0, 3);
4382 path.close();
4383 testSimplify(reporter, path, filename);
4384}
4385static void testQuads40(skiatest::Reporter* reporter, const char* filename) {
4386 SkPath path;
4387 path.moveTo(1, 0);
4388 path.quadTo(3, 0, 3, 3);
4389 path.lineTo(3, 3);
4390 path.close();
4391 path.moveTo(2, 1);
4392 path.lineTo(2, 2);
4393 path.quadTo(3, 2, 3, 3);
4394 path.close();
4395 testSimplify(reporter, path, filename);
4396}
4397
4398static void testQuads41(skiatest::Reporter* reporter, const char* filename) {
4399 SkPath path;
4400 path.moveTo(0, 0);
4401 path.quadTo(0, 0, 1, 0);
4402 path.lineTo(2, 1);
4403 path.close();
4404 path.moveTo(0, 0);
4405 path.lineTo(0, 0);
4406 path.quadTo(0, 1, 1, 2);
4407 path.close();
4408 testSimplify(reporter, path, filename);
4409}
4410
4411
4412static void testQuads54(skiatest::Reporter* reporter, const char* filename) {
4413 SkPath path;
4414 path.moveTo(1, 0);
4415 path.quadTo(2, 0, 1, 1);
4416 path.lineTo(3, 1);
4417 path.close();
4418 path.moveTo(2, 0);
4419 path.lineTo(1, 1);
4420 path.quadTo(1, 1, 2, 3);
4421 path.close();
4422 testSimplify(reporter, path, filename);
4423}
4424static void testQuads53(skiatest::Reporter* reporter, const char* filename) {
4425 SkPath path;
4426 path.moveTo(1, 0);
4427 path.quadTo(2, 0, 1, 1);
4428 path.lineTo(3, 1);
4429 path.close();
4430 path.moveTo(2, 0);
4431 path.lineTo(1, 1);
4432 path.quadTo(2, 3, 2, 3);
4433 path.close();
4434 testSimplify(reporter, path, filename);
4435}
4436static void testQuads52(skiatest::Reporter* reporter, const char* filename) {
4437 SkPath path;
4438 path.moveTo(1, 0);
4439 path.quadTo(2, 0, 1, 1);
4440 path.lineTo(3, 1);
4441 path.close();
4442 path.moveTo(2, 0);
4443 path.lineTo(1, 1);
4444 path.quadTo(2, 3, 3, 3);
4445 path.close();
4446 testSimplify(reporter, path, filename);
4447}
4448static void testQuads51(skiatest::Reporter* reporter, const char* filename) {
4449 SkPath path;
4450 path.moveTo(2, 0);
4451 path.quadTo(3, 0, 2, 1);
4452 path.lineTo(3, 2);
4453 path.close();
4454 path.moveTo(3, 0);
4455 path.lineTo(3, 1);
4456 path.quadTo(3, 1, 1, 2);
4457 path.close();
4458 testSimplify(reporter, path, filename);
4459}
4460static void testQuads50(skiatest::Reporter* reporter, const char* filename) {
4461 SkPath path;
4462 path.moveTo(2, 0);
4463 path.quadTo(3, 0, 2, 1);
4464 path.lineTo(3, 2);
4465 path.close();
4466 path.moveTo(3, 0);
4467 path.lineTo(3, 1);
4468 path.quadTo(1, 2, 1, 2);
4469 path.close();
4470 testSimplify(reporter, path, filename);
4471}
4472static void testQuads49(skiatest::Reporter* reporter, const char* filename) {
4473 SkPath path;
4474 path.moveTo(2, 0);
4475 path.quadTo(3, 0, 2, 1);
4476 path.lineTo(3, 2);
4477 path.close();
4478 path.moveTo(3, 0);
4479 path.lineTo(2, 2);
4480 path.quadTo(2, 2, 0, 3);
4481 path.close();
4482 testSimplify(reporter, path, filename);
4483}
4484static void testQuads48(skiatest::Reporter* reporter, const char* filename) {
4485 SkPath path;
4486 path.moveTo(2, 0);
4487 path.quadTo(3, 0, 2, 1);
4488 path.lineTo(3, 2);
4489 path.close();
4490 path.moveTo(3, 0);
4491 path.lineTo(2, 2);
4492 path.quadTo(3, 2, 0, 3);
4493 path.close();
4494 testSimplify(reporter, path, filename);
4495}
4496static void testQuads47(skiatest::Reporter* reporter, const char* filename) {
4497 SkPath path;
4498 path.moveTo(2, 0);
4499 path.quadTo(3, 0, 2, 1);
4500 path.lineTo(3, 2);
4501 path.close();
4502 path.moveTo(3, 0);
4503 path.lineTo(2, 2);
4504 path.quadTo(0, 3, 0, 3);
4505 path.close();
4506 testSimplify(reporter, path, filename);
4507}
4508
4509// this fails because there is a short unorderable segment and the unordered state isn't handled
skia.committer@gmail.coma1ed7ae2014-04-15 03:04:18 +00004510// correctly later on.
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004511static void testQuads46x(skiatest::Reporter* reporter, const char* filename) {
4512 SkPath path;
4513 path.setFillType(SkPath::kEvenOdd_FillType);
4514 path.moveTo(2, 0);
4515 path.quadTo(0, 1, 3, 2);
4516 path.lineTo(1, 3);
4517 path.close();
4518 path.moveTo(0, 0);
4519 path.lineTo(1, 1);
4520 path.quadTo(3, 2, 1, 3);
4521 path.close();
4522 testSimplify(reporter, path, filename);
4523}
4524
4525static void testQuads45(skiatest::Reporter* reporter, const char* filename) {
4526 SkPath path;
4527 path.moveTo(2, 0);
4528 path.quadTo(3, 2, 3, 3);
4529 path.lineTo(3, 3);
4530 path.close();
4531 path.moveTo(0, 0);
4532 path.lineTo(0, 2);
4533 path.quadTo(3, 2, 3, 3);
4534 path.close();
4535 testSimplify(reporter, path, filename);
4536}
4537
4538static void testQuads44(skiatest::Reporter* reporter, const char* filename) {
4539 SkPath path;
4540 path.moveTo(2, 0);
4541 path.quadTo(3, 2, 3, 3);
4542 path.lineTo(3, 3);
4543 path.close();
4544 path.moveTo(1, 0);
4545 path.lineTo(0, 2);
4546 path.quadTo(3, 2, 3, 3);
4547 path.close();
4548 testSimplify(reporter, path, filename);
4549}
4550
4551static void testQuads43(skiatest::Reporter* reporter, const char* filename) {
4552 SkPath path;
4553 path.moveTo(2, 0);
4554 path.quadTo(2, 3, 3, 3);
4555 path.lineTo(3, 3);
4556 path.close();
4557 path.moveTo(0, 2);
4558 path.lineTo(0, 2);
4559 path.quadTo(2, 3, 3, 3);
4560 path.close();
4561 testSimplify(reporter, path, filename);
4562}
4563
4564static void testQuads42(skiatest::Reporter* reporter, const char* filename) {
4565 SkPath path;
4566 path.moveTo(2, 0);
4567 path.quadTo(3, 2, 3, 3);
4568 path.lineTo(3, 3);
4569 path.close();
4570 path.moveTo(2, 0);
4571 path.lineTo(0, 2);
4572 path.quadTo(3, 2, 3, 3);
4573 path.close();
4574 testSimplify(reporter, path, filename);
4575}
4576
4577static void testQuads56(skiatest::Reporter* reporter, const char* filename) {
4578 SkPath path;
4579 path.moveTo(2, 0);
4580 path.quadTo(3, 1, 0, 2);
4581 path.lineTo(3, 2);
4582 path.close();
4583 path.moveTo(3, 0);
4584 path.lineTo(2, 1);
4585 path.quadTo(2, 1, 3, 3);
4586 path.close();
4587 testSimplify(reporter, path, filename);
4588}
4589
4590static void testQuads57(skiatest::Reporter* reporter, const char* filename) {
4591 SkPath path;
4592 path.moveTo(1, 0);
4593 path.quadTo(3, 0, 3, 1);
4594 path.lineTo(2, 2);
4595 path.close();
4596 path.moveTo(2, 0);
4597 path.lineTo(3, 1);
4598 path.quadTo(2, 2, 3, 2);
4599 path.close();
4600 testSimplify(reporter, path, filename);
4601}
4602
4603static void testQuads58(skiatest::Reporter* reporter, const char* filename) {
4604 SkPath path;
4605 path.moveTo(1, 0);
4606 path.quadTo(3, 0, 3, 1);
4607 path.lineTo(1, 3);
4608 path.close();
4609 path.moveTo(2, 0);
4610 path.lineTo(3, 1);
4611 path.quadTo(2, 2, 3, 2);
4612 path.close();
4613 testSimplify(reporter, path, filename);
4614}
4615
4616static void testQuads59(skiatest::Reporter* reporter, const char* filename) {
4617 SkPath path;
4618 path.moveTo(3, 0);
4619 path.quadTo(3, 1, 3, 1);
4620 path.lineTo(2, 2);
4621 path.close();
4622 path.moveTo(2, 0);
4623 path.lineTo(3, 1);
4624 path.quadTo(2, 2, 3, 2);
4625 path.close();
4626 testSimplify(reporter, path, filename);
4627}
4628
4629static void testQuads60(skiatest::Reporter* reporter, const char* filename) {
4630 SkPath path;
4631 path.moveTo(2, 1);
4632 path.quadTo(0, 2, 3, 2);
4633 path.lineTo(2, 3);
4634 path.close();
4635 path.moveTo(0, 0);
4636 path.lineTo(2, 0);
4637 path.quadTo(1, 1, 2, 2);
4638 path.close();
4639 testSimplify(reporter, path, filename);
4640}
4641
4642static void testQuads61(skiatest::Reporter* reporter, const char* filename) {
4643 SkPath path;
4644 path.setFillType(SkPath::kEvenOdd_FillType);
4645 path.moveTo(0, 0);
4646 path.quadTo(0, 0, 2, 0);
4647 path.lineTo(1, 1);
4648 path.close();
4649 path.moveTo(0, 0);
4650 path.lineTo(0, 0);
4651 path.quadTo(1, 0, 2, 2);
4652 path.close();
4653 testSimplify(reporter, path, filename);
4654}
4655
caryclarkdac1d172014-06-17 05:15:38 -07004656static void testQuadralateral10(skiatest::Reporter* reporter, const char* filename) {
4657 SkPath path;
4658 path.setFillType(SkPath::kWinding_FillType);
4659 path.moveTo(0, 0);
4660 path.lineTo(0, 0);
4661 path.lineTo(0, 0);
4662 path.lineTo(2, 2);
4663 path.close();
4664 path.moveTo(1, 0);
4665 path.lineTo(1, 1);
4666 path.lineTo(2, 2);
4667 path.lineTo(1, 3);
4668 path.close();
4669 testSimplify(reporter, path, filename);
4670}
4671
caryclark19eb3b22014-07-18 05:08:14 -07004672static void testRect3(skiatest::Reporter* reporter, const char* filename) {
4673 SkPath path;
4674 path.setFillType(SkPath::kEvenOdd_FillType);
4675 path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction);
4676 path.addRect(10, 30, 40, 30, SkPath::kCCW_Direction);
4677 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
4678 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
4679 testSimplify(reporter, path, filename);
4680}
4681
caryclarkdac1d172014-06-17 05:15:38 -07004682static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004683
4684static TestDesc tests[] = {
caryclark19eb3b22014-07-18 05:08:14 -07004685 TEST(testRect3),
caryclarkdac1d172014-06-17 05:15:38 -07004686 TEST(testQuadralateral10),
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004687 TEST(testQuads61),
4688 TEST(testQuads60),
4689 TEST(testQuads59),
4690 TEST(testQuads58),
4691 TEST(testQuads57),
4692 TEST(testQuads56),
4693 TEST(testQuads54),
4694 TEST(testQuads53),
4695 TEST(testQuads52),
4696 TEST(testQuads51),
4697 TEST(testQuads50),
4698 TEST(testQuads49),
4699 TEST(testQuads48),
4700 TEST(testQuads47),
4701 TEST(testQuads46x),
4702 TEST(testQuads45),
4703 TEST(testQuads44),
4704 TEST(testQuads43),
4705 TEST(testQuads42),
4706 TEST(testQuads41),
4707 TEST(testQuads36),
4708 TEST(testQuads37),
4709 TEST(testQuads38),
4710 TEST(testQuads39),
4711 TEST(testQuads40),
4712 TEST(testQuads16),
4713 TEST(testQuads17),
4714 TEST(testQuads18),
4715 TEST(testQuads19),
4716 TEST(testQuads20),
4717 TEST(testQuads21),
4718 TEST(testQuads22),
4719 TEST(testQuads23),
4720 TEST(testQuads24),
4721 TEST(testQuads25),
4722 TEST(testQuads26),
4723 TEST(testQuads27),
4724 TEST(testQuads28),
4725 TEST(testQuads29),
4726 TEST(testQuads30),
4727 TEST(testQuads31),
4728 TEST(testQuads32),
4729 TEST(testQuads33),
4730 TEST(testQuads34),
4731 TEST(testQuads35),
4732 TEST(testDegenerates1),
4733 TEST(testQuad13),
4734 TEST(testQuad14),
4735 TEST(testQuad15),
4736 TEST(testQuadratic56),
4737 TEST(testQuadralateral4),
4738 TEST(testQuadralateral3),
4739 TEST(testDegenerate5),
4740 TEST(testQuad12),
4741 TEST(testQuadratic51), // has unorderable angles
4742 TEST(testQuad8),
caryclark@google.com28d219c2013-11-25 13:39:12 +00004743 TEST(testQuad11),
commit-bot@chromium.org866f4e32013-11-21 17:04:29 +00004744 TEST(testQuad10),
4745 TEST(testQuad9),
caryclark@google.com7eaa53d2013-10-02 14:49:34 +00004746 TEST(testTriangles4x),
caryclark@google.com570863f2013-09-16 15:55:01 +00004747 TEST(testTriangles3x),
4748 TEST(testRect2),
4749 TEST(testRect1),
4750 TEST(tooCloseTest),
caryclark@google.com07e97fc2013-07-08 17:17:02 +00004751 TEST(skphealth_com76),
caryclark@google.comcffbcc32013-06-04 17:59:42 +00004752 TEST(testQuadLineIntersect1),
4753 TEST(testQuadLineIntersect2),
4754 TEST(testQuadLineIntersect3),
caryclark@google.coma5e55922013-05-07 18:51:31 +00004755 TEST(testQuad7),
4756 TEST(testQuad6),
4757 TEST(testQuad5),
4758 TEST(testQuad4),
4759 TEST(testQuad3),
4760 TEST(testQuad2),
caryclark@google.com66560ca2013-04-26 19:51:16 +00004761 TEST(testAddTCoincident2),
4762 TEST(testAddTCoincident1),
caryclark@google.com03610322013-04-18 15:58:21 +00004763 TEST(testTriangles2),
4764 TEST(testTriangles1),
caryclark@google.comad65a3e2013-04-15 19:13:59 +00004765 TEST(testQuadratic97),
4766 TEST(testQuadratic96),
4767 TEST(testQuadratic95),
4768 TEST(testQuadratic94),
caryclark@google.come942bc32013-04-10 18:53:01 +00004769 TEST(testQuadralateral2),
caryclark@google.coma5e55922013-05-07 18:51:31 +00004770 TEST(testQuad1),
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004771 TEST(testCubic2),
4772 TEST(testCubic1),
4773 TEST(testQuadralateral1),
4774 TEST(testLine85),
4775 TEST(testLine84),
4776 TEST(testLine84x),
4777 TEST(testLine83),
4778 TEST(testLine82h),
4779 TEST(testLine82g),
4780 TEST(testLine82f),
4781 TEST(testLine82e),
4782 TEST(testLine82d),
4783 TEST(testLine82c),
4784 TEST(testLine82b),
4785 TEST(testLine82a),
4786 TEST(testLine82),
4787 TEST(testQuadratic93),
4788 TEST(testQuadratic92x),
4789 TEST(testQuadratic91),
4790 TEST(testQuadratic90x),
4791 TEST(testQuadratic89x),
4792 TEST(testQuadratic88),
4793 TEST(testQuadratic87),
4794 TEST(testQuadratic86),
4795 TEST(testQuadratic85),
4796 TEST(testQuadratic84),
4797 TEST(testQuadratic83),
4798 TEST(testQuadratic82),
4799 TEST(testQuadratic81),
4800 TEST(testQuadratic80),
4801 TEST(testEight1),
4802 TEST(testEight2),
4803 TEST(testEight3),
4804 TEST(testEight4),
4805 TEST(testEight5),
4806 TEST(testEight6),
4807 TEST(testEight7),
4808 TEST(testEight8),
4809 TEST(testEight9),
4810 TEST(testEight10),
4811 TEST(testQuadratic79),
4812 TEST(testQuadratic78),
4813 TEST(testQuadratic77),
4814 TEST(testQuadratic76),
4815 TEST(testQuadratic75),
4816 TEST(testQuadratic74),
4817 TEST(testQuadratic73),
4818 TEST(testQuadratic72),
4819 TEST(testQuadratic71),
4820 TEST(testQuadratic70x),
4821 TEST(testQuadratic69),
4822 TEST(testQuadratic68),
4823 TEST(testQuadratic67x),
4824 TEST(testQuadratic65),
4825 TEST(testQuadratic64),
4826 TEST(testQuadratic63),
4827 TEST(testLine1a),
4828 TEST(testLine1ax),
4829 TEST(testQuadratic59),
4830 TEST(testQuadratic59x),
4831 TEST(testQuadratic58),
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004832 TEST(testQuadratic55),
4833 TEST(testQuadratic53),
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004834 TEST(testQuadratic38),
4835 TEST(testQuadratic37),
4836 TEST(testQuadratic36),
4837 TEST(testQuadratic35),
4838 TEST(testQuadratic34),
4839 TEST(testQuadratic33),
4840 TEST(testQuadratic32),
4841 TEST(testQuadratic31),
4842 TEST(testQuadratic30),
4843 TEST(testQuadratic29),
4844 TEST(testQuadratic28),
4845 TEST(testQuadratic27),
4846 TEST(testQuadratic26),
4847 TEST(testQuadratic25),
4848 TEST(testQuadratic24),
4849 TEST(testQuadratic23),
4850 TEST(testQuadratic22),
4851 TEST(testQuadratic21),
4852 TEST(testQuadratic20),
4853 TEST(testQuadratic19),
4854 TEST(testQuadratic18),
4855 TEST(testQuadratic17x),
4856 TEST(testQuadratic15),
4857 TEST(testQuadratic14),
4858 TEST(testQuadratic9),
4859 TEST(testQuadratic8),
4860 TEST(testQuadratic7),
4861 TEST(testQuadratic6),
4862 TEST(testQuadratic5),
4863 TEST(testQuadratic4x),
4864 TEST(testQuadratic3x),
4865 TEST(testQuadratic2x),
4866 TEST(testQuadratic1x),
4867 TEST(testQuadratic4),
4868 TEST(testQuadratic3),
4869 TEST(testQuadratic2),
4870 TEST(testQuadratic1),
4871 TEST(testLine4ax),
4872 TEST(testLine3aax),
4873 TEST(testLine2ax),
4874 TEST(testLine1ax),
4875 TEST(testQuadralateral9x),
4876 TEST(testQuadralateral8x),
4877 TEST(testQuadralateral7x),
4878 TEST(testQuadralateral6x),
4879 TEST(testQuadralateral6ax),
4880 TEST(testQuadralateral9),
4881 TEST(testQuadralateral8),
4882 TEST(testQuadralateral7),
4883 TEST(testQuadralateral6),
4884 TEST(testQuadralateral6a),
4885 TEST(testFauxQuadralateral6dx),
4886 TEST(testFauxQuadralateral6cx),
4887 TEST(testFauxQuadralateral6bx),
4888 TEST(testFauxQuadralateral6ax),
4889 TEST(testFauxQuadralateral6x),
4890 TEST(testFauxQuadralateral6d),
4891 TEST(testFauxQuadralateral6c),
4892 TEST(testFauxQuadralateral6b),
4893 TEST(testFauxQuadralateral6a),
4894 TEST(testFauxQuadralateral6),
4895 TEST(testQuadralateral5x),
4896 TEST(testQuadralateral5),
4897 TEST(testNondegenerate4x),
4898 TEST(testNondegenerate3x),
4899 TEST(testNondegenerate2x),
4900 TEST(testNondegenerate1x),
4901 TEST(testNondegenerate4),
4902 TEST(testNondegenerate3),
4903 TEST(testNondegenerate2),
4904 TEST(testNondegenerate1),
4905 TEST(testDegenerate4x),
4906 TEST(testDegenerate3x),
4907 TEST(testDegenerate2x),
4908 TEST(testDegenerate1x),
4909 TEST(testDegenerate4),
4910 TEST(testDegenerate3),
4911 TEST(testDegenerate2),
4912 TEST(testDegenerate1),
4913 TEST(testLine79x),
4914 TEST(testLine78x),
4915 TEST(testLine77x),
4916 TEST(testLine76x),
4917 TEST(testLine75x),
4918 TEST(testLine74x),
4919 TEST(testLine73x),
4920 TEST(testLine72x),
4921 TEST(testLine71x),
4922 TEST(testLine70x),
4923 TEST(testLine69x),
4924 TEST(testLine68hx),
4925 TEST(testLine68gx),
4926 TEST(testLine68fx),
4927 TEST(testLine68ex),
4928 TEST(testLine68dx),
4929 TEST(testLine68cx),
4930 TEST(testLine68bx),
4931 TEST(testLine68ax),
4932 TEST(testLine67x),
4933 TEST(testLine66x),
4934 TEST(testLine65x),
4935 TEST(testLine64x),
4936 TEST(testLine63x),
4937 TEST(testLine62x),
4938 TEST(testLine61x),
4939 TEST(testLine60x),
4940 TEST(testLine59x),
4941 TEST(testLine58x),
4942 TEST(testLine57x),
4943 TEST(testLine56x),
4944 TEST(testLine55x),
4945 TEST(testLine54x),
4946 TEST(testLine53x),
4947 TEST(testLine52x),
4948 TEST(testLine51x),
4949 TEST(testLine50x),
4950 TEST(testLine49x),
4951 TEST(testLine48x),
4952 TEST(testLine47x),
4953 TEST(testLine46x),
4954 TEST(testLine45x),
4955 TEST(testLine44x),
4956 TEST(testLine43x),
4957 TEST(testLine42x),
4958 TEST(testLine41x),
4959 TEST(testLine40x),
4960 TEST(testLine38x),
4961 TEST(testLine37x),
4962 TEST(testLine36x),
4963 TEST(testLine35x),
4964 TEST(testLine34x),
4965 TEST(testLine33x),
4966 TEST(testLine32x),
4967 TEST(testLine31x),
4968 TEST(testLine30x),
4969 TEST(testLine29x),
4970 TEST(testLine28x),
4971 TEST(testLine27x),
4972 TEST(testLine26x),
4973 TEST(testLine25x),
4974 TEST(testLine24ax),
4975 TEST(testLine24x),
4976 TEST(testLine23x),
4977 TEST(testLine22x),
4978 TEST(testLine21x),
4979 TEST(testLine20x),
4980 TEST(testLine19x),
4981 TEST(testLine18x),
4982 TEST(testLine17x),
4983 TEST(testLine16x),
4984 TEST(testLine15x),
4985 TEST(testLine14x),
4986 TEST(testLine13x),
4987 TEST(testLine12x),
4988 TEST(testLine11x),
4989 TEST(testLine10ax),
4990 TEST(testLine10x),
4991 TEST(testLine9x),
4992 TEST(testLine8x),
4993 TEST(testLine7bx),
4994 TEST(testLine7ax),
4995 TEST(testLine7x),
4996 TEST(testLine6x),
4997 TEST(testLine5x),
4998 TEST(testLine4x),
4999 TEST(testLine3bx),
5000 TEST(testLine3ax),
5001 TEST(testLine3x),
5002 TEST(testLine2x),
5003 TEST(testLine1x),
5004 TEST(testLine81),
5005 TEST(testLine80),
5006 TEST(testLine79),
5007 TEST(testLine78),
5008 TEST(testLine77),
5009 TEST(testLine76),
5010 TEST(testLine75),
5011 TEST(testLine74),
5012 TEST(testLine73),
5013 TEST(testLine72),
5014 TEST(testLine71),
5015 TEST(testLine70),
5016 TEST(testLine69),
5017 TEST(testLine68h),
5018 TEST(testLine68g),
5019 TEST(testLine68f),
5020 TEST(testLine68e),
5021 TEST(testLine68d),
5022 TEST(testLine68c),
5023 TEST(testLine68b),
5024 TEST(testLine68a),
5025 TEST(testLine67),
5026 TEST(testLine66),
5027 TEST(testLine65),
5028 TEST(testLine64),
5029 TEST(testLine63),
5030 TEST(testLine62),
5031 TEST(testLine61),
5032 TEST(testLine60),
5033 TEST(testLine59),
5034 TEST(testLine58),
5035 TEST(testLine57),
5036 TEST(testLine56),
5037 TEST(testLine55),
5038 TEST(testLine54),
5039 TEST(testLine53),
5040 TEST(testLine52),
5041 TEST(testLine51),
5042 TEST(testLine50),
5043 TEST(testLine49),
5044 TEST(testLine48),
5045 TEST(testLine47),
5046 TEST(testLine46),
5047 TEST(testLine45),
5048 TEST(testLine44),
5049 TEST(testLine43),
5050 TEST(testLine42),
5051 TEST(testLine41),
5052 TEST(testLine40),
5053 TEST(testLine38),
5054 TEST(testLine37),
5055 TEST(testLine36),
5056 TEST(testLine35),
5057 TEST(testLine34),
5058 TEST(testLine33),
5059 TEST(testLine32),
5060 TEST(testLine31),
5061 TEST(testLine30),
5062 TEST(testLine29),
5063 TEST(testLine28),
5064 TEST(testLine27),
5065 TEST(testLine26),
5066 TEST(testLine25),
5067 TEST(testLine24a),
5068 TEST(testLine24),
5069 TEST(testLine23),
5070 TEST(testLine22),
5071 TEST(testLine21),
5072 TEST(testLine20),
5073 TEST(testLine19),
5074 TEST(testLine18),
5075 TEST(testLine17),
5076 TEST(testLine16),
5077 TEST(testLine15),
5078 TEST(testLine14),
5079 TEST(testLine13),
5080 TEST(testLine12),
5081 TEST(testLine11),
5082 TEST(testLine10a),
5083 TEST(testLine10),
5084 TEST(testLine9),
5085 TEST(testLine8),
5086 TEST(testLine7b),
5087 TEST(testLine7a),
5088 TEST(testLine7),
5089 TEST(testLine6),
5090 TEST(testLine5),
5091 TEST(testLine4),
5092 TEST(testLine3b),
5093 TEST(testLine3a),
5094 TEST(testLine3),
5095 TEST(testLine2),
5096 TEST(testLine1),
5097};
5098
caryclark@google.comad65a3e2013-04-15 19:13:59 +00005099static const size_t testCount = SK_ARRAY_COUNT(tests);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005100
5101static TestDesc subTests[] = {
5102 TEST(testLine3),
5103 TEST(testLine2),
5104 TEST(testLine1),
5105};
5106
caryclark@google.comad65a3e2013-04-15 19:13:59 +00005107static const size_t subTestCount = SK_ARRAY_COUNT(subTests);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005108
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00005109static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005110
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00005111static bool runSubTests = false;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005112static bool runSubTestsFirst = false;
caryclark@google.com4fdbb222013-07-23 15:27:41 +00005113static bool runReverse = false;
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00005114static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005115
tfarina@chromium.org78e7b4e2014-01-02 21:45:03 +00005116DEF_TEST(PathOpsSimplify, reporter) {
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00005117 if (runSubTests && runSubTestsFirst) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005118 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, runReverse);
5119 }
5120 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00005121 if (runSubTests && !runSubTestsFirst) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005122 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, runReverse);
5123 }
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005124}