blob: ab6c81b2153ec09118b4c1ff8e3ffb6c97b3ce4f [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
caryclark54359292015-03-26 07:52:43 -07003652// A test for this case:
caryclark@google.com66560ca2013-04-26 19:51:16 +00003653// 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
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00004509static void testQuads46x(skiatest::Reporter* reporter, const char* filename) {
4510 SkPath path;
4511 path.setFillType(SkPath::kEvenOdd_FillType);
4512 path.moveTo(2, 0);
4513 path.quadTo(0, 1, 3, 2);
4514 path.lineTo(1, 3);
4515 path.close();
4516 path.moveTo(0, 0);
4517 path.lineTo(1, 1);
4518 path.quadTo(3, 2, 1, 3);
4519 path.close();
4520 testSimplify(reporter, path, filename);
4521}
4522
4523static void testQuads45(skiatest::Reporter* reporter, const char* filename) {
4524 SkPath path;
4525 path.moveTo(2, 0);
4526 path.quadTo(3, 2, 3, 3);
4527 path.lineTo(3, 3);
4528 path.close();
4529 path.moveTo(0, 0);
4530 path.lineTo(0, 2);
4531 path.quadTo(3, 2, 3, 3);
4532 path.close();
4533 testSimplify(reporter, path, filename);
4534}
4535
4536static void testQuads44(skiatest::Reporter* reporter, const char* filename) {
4537 SkPath path;
4538 path.moveTo(2, 0);
4539 path.quadTo(3, 2, 3, 3);
4540 path.lineTo(3, 3);
4541 path.close();
4542 path.moveTo(1, 0);
4543 path.lineTo(0, 2);
4544 path.quadTo(3, 2, 3, 3);
4545 path.close();
4546 testSimplify(reporter, path, filename);
4547}
4548
4549static void testQuads43(skiatest::Reporter* reporter, const char* filename) {
4550 SkPath path;
4551 path.moveTo(2, 0);
4552 path.quadTo(2, 3, 3, 3);
4553 path.lineTo(3, 3);
4554 path.close();
4555 path.moveTo(0, 2);
4556 path.lineTo(0, 2);
4557 path.quadTo(2, 3, 3, 3);
4558 path.close();
4559 testSimplify(reporter, path, filename);
4560}
4561
4562static void testQuads42(skiatest::Reporter* reporter, const char* filename) {
4563 SkPath path;
4564 path.moveTo(2, 0);
4565 path.quadTo(3, 2, 3, 3);
4566 path.lineTo(3, 3);
4567 path.close();
4568 path.moveTo(2, 0);
4569 path.lineTo(0, 2);
4570 path.quadTo(3, 2, 3, 3);
4571 path.close();
4572 testSimplify(reporter, path, filename);
4573}
4574
4575static void testQuads56(skiatest::Reporter* reporter, const char* filename) {
4576 SkPath path;
4577 path.moveTo(2, 0);
4578 path.quadTo(3, 1, 0, 2);
4579 path.lineTo(3, 2);
4580 path.close();
4581 path.moveTo(3, 0);
4582 path.lineTo(2, 1);
4583 path.quadTo(2, 1, 3, 3);
4584 path.close();
4585 testSimplify(reporter, path, filename);
4586}
4587
4588static void testQuads57(skiatest::Reporter* reporter, const char* filename) {
4589 SkPath path;
4590 path.moveTo(1, 0);
4591 path.quadTo(3, 0, 3, 1);
4592 path.lineTo(2, 2);
4593 path.close();
4594 path.moveTo(2, 0);
4595 path.lineTo(3, 1);
4596 path.quadTo(2, 2, 3, 2);
4597 path.close();
4598 testSimplify(reporter, path, filename);
4599}
4600
4601static void testQuads58(skiatest::Reporter* reporter, const char* filename) {
4602 SkPath path;
4603 path.moveTo(1, 0);
4604 path.quadTo(3, 0, 3, 1);
4605 path.lineTo(1, 3);
4606 path.close();
4607 path.moveTo(2, 0);
4608 path.lineTo(3, 1);
4609 path.quadTo(2, 2, 3, 2);
4610 path.close();
4611 testSimplify(reporter, path, filename);
4612}
4613
4614static void testQuads59(skiatest::Reporter* reporter, const char* filename) {
4615 SkPath path;
4616 path.moveTo(3, 0);
4617 path.quadTo(3, 1, 3, 1);
4618 path.lineTo(2, 2);
4619 path.close();
4620 path.moveTo(2, 0);
4621 path.lineTo(3, 1);
4622 path.quadTo(2, 2, 3, 2);
4623 path.close();
4624 testSimplify(reporter, path, filename);
4625}
4626
4627static void testQuads60(skiatest::Reporter* reporter, const char* filename) {
4628 SkPath path;
4629 path.moveTo(2, 1);
4630 path.quadTo(0, 2, 3, 2);
4631 path.lineTo(2, 3);
4632 path.close();
4633 path.moveTo(0, 0);
4634 path.lineTo(2, 0);
4635 path.quadTo(1, 1, 2, 2);
4636 path.close();
4637 testSimplify(reporter, path, filename);
4638}
4639
4640static void testQuads61(skiatest::Reporter* reporter, const char* filename) {
4641 SkPath path;
4642 path.setFillType(SkPath::kEvenOdd_FillType);
4643 path.moveTo(0, 0);
4644 path.quadTo(0, 0, 2, 0);
4645 path.lineTo(1, 1);
4646 path.close();
4647 path.moveTo(0, 0);
4648 path.lineTo(0, 0);
4649 path.quadTo(1, 0, 2, 2);
4650 path.close();
4651 testSimplify(reporter, path, filename);
4652}
4653
caryclarkdac1d172014-06-17 05:15:38 -07004654static void testQuadralateral10(skiatest::Reporter* reporter, const char* filename) {
4655 SkPath path;
4656 path.setFillType(SkPath::kWinding_FillType);
4657 path.moveTo(0, 0);
4658 path.lineTo(0, 0);
4659 path.lineTo(0, 0);
4660 path.lineTo(2, 2);
4661 path.close();
4662 path.moveTo(1, 0);
4663 path.lineTo(1, 1);
4664 path.lineTo(2, 2);
4665 path.lineTo(1, 3);
4666 path.close();
4667 testSimplify(reporter, path, filename);
4668}
4669
caryclark19eb3b22014-07-18 05:08:14 -07004670static void testRect3(skiatest::Reporter* reporter, const char* filename) {
4671 SkPath path;
4672 path.setFillType(SkPath::kEvenOdd_FillType);
4673 path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction);
4674 path.addRect(10, 30, 40, 30, SkPath::kCCW_Direction);
4675 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
4676 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
4677 testSimplify(reporter, path, filename);
4678}
4679
caryclark1049f122015-04-20 08:31:59 -07004680static void testRect4(skiatest::Reporter* reporter, const char* filename) {
4681 SkPath path;
4682 path.setFillType(SkPath::kEvenOdd_FillType);
4683 path.addRect(0, 0, 30, 60, SkPath::kCCW_Direction);
4684 path.addRect(10, 0, 40, 30, SkPath::kCCW_Direction);
4685 path.addRect(20, 0, 30, 40, SkPath::kCCW_Direction);
4686 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
4687 testSimplify(reporter, path, filename);
4688}
4689
4690static void testQuads62(skiatest::Reporter* reporter, const char* filename) {
4691 SkPath path;
4692 path.moveTo(3, 2);
4693 path.quadTo(1, 3, 3, 3);
4694 path.lineTo(3, 3);
4695 path.close();
4696 path.moveTo(0, 0);
4697 path.lineTo(2, 0);
4698 path.quadTo(1, 3, 3, 3);
4699 path.close();
4700 testSimplify(reporter, path, filename);
4701}
4702
4703static void testQuads63(skiatest::Reporter* reporter,const char* filename) {
4704 SkPath path;
4705 path.moveTo(3, 0);
4706 path.quadTo(0, 1, 1, 2);
4707 path.lineTo(3, 3);
4708 path.close();
4709 path.moveTo(0, 0);
4710 path.lineTo(1, 1);
4711 path.quadTo(0, 2, 3, 3);
4712 path.close();
4713 testSimplify(reporter, path, filename);
4714}
4715
4716static void testQuads64(skiatest::Reporter* reporter,const char* filename) {
4717 SkPath path;
4718 path.moveTo(3, 0);
4719 path.quadTo(0, 1, 1, 2);
4720 path.lineTo(2, 2);
4721 path.close();
4722 path.moveTo(1, 0);
4723 path.lineTo(1, 1);
4724 path.quadTo(0, 2, 3, 3);
4725 path.close();
4726 testSimplify(reporter, path, filename);
4727}
4728
caryclark624637c2015-05-11 07:21:27 -07004729static void testTriangle1(skiatest::Reporter* reporter,const char* filename) {
4730 SkPath path;
4731 path.moveTo(0, 0);
4732 path.lineTo(1, 0);
4733 path.lineTo(2, 3);
4734 path.close();
4735 path.moveTo(0, 0);
4736 path.lineTo(1, 2);
4737 path.lineTo(1, 0);
4738 path.close();
4739 testSimplify(reporter, path, filename);
4740}
4741
4742static void testTriangle2(skiatest::Reporter* reporter,const char* filename) {
4743 SkPath path;
4744 path.moveTo(0, 0);
4745 path.lineTo(1, 0);
4746 path.lineTo(0, 1);
4747 path.close();
4748 path.moveTo(2, 0);
4749 path.lineTo(0, 2);
4750 path.lineTo(2, 2);
4751 path.close();
4752 testSimplify(reporter, path, filename);
4753}
4754
caryclarkbca19f72015-05-13 08:23:48 -07004755static void testArc(skiatest::Reporter* reporter,const char* filename) {
4756 SkRect r = SkRect::MakeWH(150, 100);
4757 SkPath path;
4758 path.arcTo(r, 0, 0.0025f, false);
4759 testSimplify(reporter, path, filename);
4760}
4761
caryclarkfba9da72015-05-14 14:18:13 -07004762static void testIssue3838(skiatest::Reporter* reporter,const char* filename) {
4763 SkPath path;
4764 path.moveTo(220, 170);
4765 path.lineTo(200, 170);
4766 path.lineTo(200, 190);
4767 path.lineTo(180, 190);
4768 path.lineTo(180, 210);
4769 path.lineTo(200, 210);
4770 path.lineTo(200, 250);
4771 path.lineTo(260, 250);
4772 path.lineTo(260, 190);
4773 path.lineTo(220, 190);
4774 path.lineTo(220, 170);
4775 path.close();
4776 path.moveTo(220, 210);
4777 path.lineTo(220, 230);
4778 path.lineTo(240, 230);
4779 path.lineTo(240, 210);
4780 path.lineTo(220, 210);
4781 path.close();
4782 testSimplify(reporter, path, filename);
4783}
4784
caryclark4e1a4c92015-05-18 12:56:57 -07004785static void testIssue3838_3(skiatest::Reporter* reporter,const char* filename) {
4786 SkPath path;
4787 path.moveTo(40, 10);
4788 path.lineTo(60, 10);
4789 path.lineTo(60, 30);
4790 path.lineTo(40, 30);
4791 path.lineTo(40, 10);
4792 path.moveTo(41, 11);
4793 path.lineTo(41, 29);
4794 path.lineTo(59, 29);
4795 path.lineTo(59, 11);
4796 path.lineTo(41, 11);
4797 testSimplify(reporter, path, filename);
4798}
4799
caryclark27c8eb82015-07-06 11:38:33 -07004800static void testQuads65(skiatest::Reporter* reporter,const char* filename) {
4801 SkPath path;
4802 path.moveTo(1, 2);
4803 path.quadTo(3, 2, 0, 3);
4804 path.lineTo(1, 3);
4805 path.close();
4806 path.moveTo(1, 0);
4807 path.lineTo(1, 2);
4808 path.quadTo(3, 2, 1, 3);
4809 path.close();
4810 testSimplify(reporter, path, filename);
4811}
4812
caryclarkd4349722015-07-23 12:40:22 -07004813static void fuzz864a(skiatest::Reporter* reporter,const char* filename) {
4814 SkPath path;
4815 path.moveTo(10, 90);
4816 path.lineTo(10, 90);
4817 path.lineTo(10, 30);
4818 path.lineTo(10, 30);
4819 path.lineTo(10, 90);
4820 path.close();
4821 path.moveTo(10, 90);
4822 path.lineTo(10, 90);
4823 path.lineTo(10, 30);
4824 path.lineTo(10, 30);
4825 path.lineTo(10, 90);
4826 path.close();
4827 path.moveTo(10, 90);
4828 path.lineTo(110, 90);
4829 path.lineTo(110, 30);
4830 path.lineTo(10, 30);
4831 path.lineTo(10, 90);
4832 path.close();
4833 path.moveTo(10, 30);
4834 path.lineTo(32678, 30);
4835 path.lineTo(32678, 30);
4836 path.lineTo(10, 30);
4837 path.close();
4838 path.moveTo(10, 3.35545e+07f);
4839 path.lineTo(110, 3.35545e+07f);
4840 path.lineTo(110, 30);
4841 path.lineTo(10, 30);
4842 path.lineTo(10, 3.35545e+07f);
4843 path.close();
4844 path.moveTo(10, 315);
4845 path.lineTo(110, 315);
4846 path.lineTo(110, 255);
4847 path.lineTo(10, 255);
4848 path.lineTo(10, 315);
4849 path.close();
4850 path.moveTo(0, 60);
4851 path.lineTo(100, 60);
4852 path.lineTo(100, 0);
4853 path.lineTo(0, 0);
4854 path.lineTo(0, 60);
4855 path.close();
4856 path.moveTo(10, 90);
4857 path.lineTo(110, 90);
4858 path.lineTo(110, 30);
4859 path.lineTo(10, 30);
4860 path.lineTo(10, 90);
4861 path.close();
4862 path.moveTo(10, 3.35545e+07f);
4863 path.lineTo(110, 3.35545e+07f);
4864 path.lineTo(110, 30);
4865 path.lineTo(10, 30);
4866 path.lineTo(10, 3.35545e+07f);
4867 path.close();
4868 path.moveTo(10, 90);
4869 path.lineTo(110, 90);
4870 path.lineTo(110, 30);
4871 path.lineTo(10, 30);
4872 path.lineTo(10, 90);
4873 path.close();
4874 testSimplify(reporter, path, filename);
4875}
4876
caryclarkbb134332015-07-28 05:12:19 -07004877static void cr514118(skiatest::Reporter* reporter,const char* filename) {
4878 SkPath path;
4879path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50
4880path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f
4881path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f
4882path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f
4883path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f
4884path.close();
4885path.moveTo(SkBits2Float(0x42c80133), SkBits2Float(0x42480000)); // 100.002f, 50
4886path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x00000000), SkBits2Float(0x42480267), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100.002f, 0, 50.0023f, 0, 0.707107f
4887path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x00000000), SkBits2Float(0x3b19b530), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0.00234539f, 0, 0.00234539f, 50, 0.707107f
4888path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x42c80000), SkBits2Float(0x42480267), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0.00234539f, 100, 50.0023f, 100, 0.707107f
4889path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x42c80000), SkBits2Float(0x42c80133), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100.002f, 100, 100.002f, 50, 0.707107f
4890path.close();
4891 testSimplify(reporter, path, filename);
4892}
4893
caryclarkef2e4ac2015-09-23 18:07:51 -07004894static void fuzz994s_11(skiatest::Reporter* reporter, const char* filename) {
4895 SkPath path;
4896 path.setFillType((SkPath::FillType) 0);
4897path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4898path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4899path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4900path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4901path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4902path.close();
4903path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4904path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4905path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4906path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4907path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4908path.close();
4909path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4910path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90
4911path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
4912path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4913path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4914path.close();
4915path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4916path.lineTo(SkBits2Float(0x46ff4c00), SkBits2Float(0x41f00000)); // 32678, 30
4917path.lineTo(SkBits2Float(0x46ff4c00), SkBits2Float(0x41f00000)); // 32678, 30
4918path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4919path.close();
4920path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f
4921path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x4c000006)); // 110, 3.35545e+07f
4922path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
4923path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4924path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f
4925path.close();
4926path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x439d8000)); // 10, 315
4927path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x439d8000)); // 110, 315
4928path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x437f0000)); // 110, 255
4929path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x437f0000)); // 10, 255
4930path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x439d8000)); // 10, 315
4931path.close();
4932path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x42700000)); // 0, 60
4933path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x42700000)); // 100, 60
4934path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000)); // 100, 0
4935path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
4936path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x42700000)); // 0, 60
4937path.close();
4938path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4939path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90
4940path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
4941path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4942path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4943path.close();
4944path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f
4945path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x4c000006)); // 110, 3.35545e+07f
4946path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
4947path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4948path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f
4949path.close();
4950path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4951path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90
4952path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
4953path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
4954path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
4955path.close();
4956
4957 testSimplify(reporter, path, filename);
4958}
4959
4960static void fuzz994s_3414(skiatest::Reporter* reporter, const char* filename) {
4961 SkPath path;
4962 path.setFillType((SkPath::FillType) 0);
4963path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50
4964path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f
4965path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f
4966path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f
4967path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f
4968path.close();
4969path.moveTo(SkBits2Float(0x42c84964), SkBits2Float(0x42480000)); // 100.143f, 50
4970path.conicTo(SkBits2Float(0x42c84964), SkBits2Float(0x00000000), SkBits2Float(0x424892c8), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100.143f, 0, 50.1433f, 0, 0.707107f
4971path.conicTo(SkBits2Float(0x3e12c788), SkBits2Float(0x00000000), SkBits2Float(0x3e12c788), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0.143339f, 0, 0.143339f, 50, 0.707107f
4972path.conicTo(SkBits2Float(0x3e12c788), SkBits2Float(0x42c80000), SkBits2Float(0x424892c8), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0.143339f, 100, 50.1433f, 100, 0.707107f
4973path.conicTo(SkBits2Float(0x42c84964), SkBits2Float(0x42c80000), SkBits2Float(0x42c84964), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100.143f, 100, 100.143f, 50, 0.707107f
4974path.close();
4975path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50
4976path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f
4977path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f
4978path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f
4979path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f
4980path.close();
4981path.moveTo(SkBits2Float(0x4c00006b), SkBits2Float(0x424c0000)); // 3.35549e+07f, 51
4982path.conicTo(SkBits2Float(0x4c00006b), SkBits2Float(0xcbffffe5), SkBits2Float(0x43d6e720), SkBits2Float(0xcbffffe5), SkBits2Float(0x3f3504f3)); // 3.35549e+07f, -3.35544e+07f, 429.806f, -3.35544e+07f, 0.707107f
4983path.conicTo(SkBits2Float(0xcbffff28), SkBits2Float(0xcbffffe5), SkBits2Float(0xcbffff28), SkBits2Float(0x424c0000), SkBits2Float(0x3f3504f3)); // -3.3554e+07f, -3.35544e+07f, -3.3554e+07f, 51, 0.707107f
4984path.conicTo(SkBits2Float(0xcbffff28), SkBits2Float(0x4c00000c), SkBits2Float(0x43d6e720), SkBits2Float(0x4c00000c), SkBits2Float(0x3f3504f3)); // -3.3554e+07f, 3.35545e+07f, 429.806f, 3.35545e+07f, 0.707107f
4985path.conicTo(SkBits2Float(0x4c00006b), SkBits2Float(0x4c00000c), SkBits2Float(0x4c00006b), SkBits2Float(0x424c0000), SkBits2Float(0x3f3504f3)); // 3.35549e+07f, 3.35545e+07f, 3.35549e+07f, 51, 0.707107f
4986path.close();
4987path.moveTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42480000)); // 478.806f, 50
4988path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x00000000), SkBits2Float(0x43d66720), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 478.806f, 0, 428.806f, 0, 0.707107f
4989path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x00000000), SkBits2Float(0x43bd6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 378.806f, 0, 378.806f, 50, 0.707107f
4990path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x42c80000), SkBits2Float(0x43d66720), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 378.806f, 100, 428.806f, 100, 0.707107f
4991path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42c80000), SkBits2Float(0x43ef6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 478.806f, 100, 478.806f, 50, 0.707107f
4992path.close();
4993
4994 testSimplify(reporter, path, filename);
4995}
4996
caryclark26ad22a2015-10-16 09:03:38 -07004997static void fuzz_twister(skiatest::Reporter* reporter, const char* filename) {
4998 SkPath path;
4999 path.setFillType((SkPath::FillType) 0);
5000path.moveTo(0, 600);
5001path.lineTo(3.35544e+07f, 600);
5002path.lineTo(3.35544e+07f, 0);
5003path.lineTo(0, 0);
5004path.lineTo(0, 600);
5005path.close();
5006path.moveTo(63, 600);
5007path.lineTo(3.35545e+07f, 600);
5008path.lineTo(3.35545e+07f, 0);
5009path.lineTo(63, 0);
5010path.lineTo(63, 600);
5011path.close();
5012path.moveTo(93, 600);
5013path.lineTo(3.35545e+07f, 600);
5014path.lineTo(3.35545e+07f, 0);
5015path.lineTo(93, 0);
5016path.lineTo(93, 600);
5017path.close();
5018path.moveTo(123, 600);
5019path.lineTo(3.35546e+07f, 600);
5020path.lineTo(3.35546e+07f, 0);
5021path.lineTo(123, 0);
5022path.lineTo(123, 600);
5023path.close();
5024 testSimplify(reporter, path, filename);
5025}
5026
caryclark1c9ce612015-11-20 14:06:28 -08005027static void fuzz_twister2(skiatest::Reporter* reporter, const char* filename) {
5028 SkPath path;
5029
5030path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x44160000)); // 0, 600
5031path.lineTo(SkBits2Float(0x4bfffffe), SkBits2Float(0x44160000)); // 3.35544e+07f, 600
5032path.lineTo(SkBits2Float(0x4bfffffe), SkBits2Float(0x00000000)); // 3.35544e+07f, 0
5033path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
5034path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x44160000)); // 0, 600
5035path.close();
5036
5037path.moveTo(SkBits2Float(0x427c0000), SkBits2Float(0x00000000)); // 63, 0
5038path.lineTo(SkBits2Float(0x4c00000f), SkBits2Float(0x00000000)); // 3.35545e+07f, 0
5039path.lineTo(SkBits2Float(0x4c00000f), SkBits2Float(0x00000000)); // 3.35545e+07f, 0
5040path.lineTo(SkBits2Float(0x427c0000), SkBits2Float(0x00000000)); // 63, 0
5041path.close();
5042
5043path.moveTo(SkBits2Float(0x42ba0000), SkBits2Float(0x00000000)); // 93, 0
5044path.lineTo(SkBits2Float(0x4c000016), SkBits2Float(0x00000000)); // 3.35545e+07f, 0
5045path.lineTo(SkBits2Float(0x4c000016), SkBits2Float(0x00000000)); // 3.35545e+07f, 0
5046path.lineTo(SkBits2Float(0x42ba0000), SkBits2Float(0x00000000)); // 93, 0
5047path.close();
5048
5049path.moveTo(SkBits2Float(0x42f60000), SkBits2Float(0x00000000)); // 123, 0
5050path.lineTo(SkBits2Float(0x4c00001e), SkBits2Float(0x00000000)); // 3.35546e+07f, 0
5051path.lineTo(SkBits2Float(0x4c00001e), SkBits2Float(0x00000000)); // 3.35546e+07f, 0
5052path.lineTo(SkBits2Float(0x42f60000), SkBits2Float(0x00000000)); // 123, 0
5053path.close();
5054
caryclark55888e42016-07-18 10:01:36 -07005055 testSimplify(reporter, path, filename);
caryclark1c9ce612015-11-20 14:06:28 -08005056}
5057
caryclark2bec26a2016-05-26 09:01:47 -07005058static void fuzz763_4713_b(skiatest::Reporter* reporter, const char* filename) {
5059 SkPath path;
5060 path.setFillType((SkPath::FillType) 0);
5061path.moveTo(SkBits2Float(0x42240000), SkBits2Float(0x42040000));
5062path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x4211413d), SkBits2Float(0x421aa09e), SkBits2Float(0x421aa09e));
5063path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x42040000), SkBits2Float(0x42240000));
5064path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x41dabec3), SkBits2Float(0x421aa09e));
5065path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x41c80000), SkBits2Float(0x42040000));
5066path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x41dabec3), SkBits2Float(0x41dabec3));
5067path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x41c80000), SkBits2Float(0x42040000), SkBits2Float(0x41c80000));
5068path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x41c80000), SkBits2Float(0x421aa09e), SkBits2Float(0x41dabec3));
5069path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x42040000));
5070path.close();
5071
5072path.moveTo(SkBits2Float(0x4204f72e), SkBits2Float(0x41c56cd2));
5073path.quadTo(SkBits2Float(0x42123842), SkBits2Float(0x41c52adf), SkBits2Float(0x421baed7), SkBits2Float(0x41d7bac6));
5074path.quadTo(SkBits2Float(0x4225256d), SkBits2Float(0x41ea4aad), SkBits2Float(0x42254667), SkBits2Float(0x4202666b));
5075path.quadTo(SkBits2Float(0x42256760), SkBits2Float(0x420fa77f), SkBits2Float(0x421c1f6c), SkBits2Float(0x42191e14));
5076path.quadTo(SkBits2Float(0x421bff97), SkBits2Float(0x42193e89), SkBits2Float(0x421bdf6b), SkBits2Float(0x42195eb8));
5077path.quadTo(SkBits2Float(0x421bbff6), SkBits2Float(0x42197f32), SkBits2Float(0x421ba03b), SkBits2Float(0x42199f57));
5078path.quadTo(SkBits2Float(0x421b605e), SkBits2Float(0x4219e00a), SkBits2Float(0x421b1fa8), SkBits2Float(0x421a1f22));
5079path.quadTo(SkBits2Float(0x421ae0f1), SkBits2Float(0x421a604b), SkBits2Float(0x421aa09e), SkBits2Float(0x421aa09e));
5080path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x42040000), SkBits2Float(0x42240000));
5081path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x41dabec3), SkBits2Float(0x421aa09e));
5082path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x41c80000), SkBits2Float(0x42040000));
5083path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x41dabec3), SkBits2Float(0x41dabec3));
5084path.quadTo(SkBits2Float(0x41db19b1), SkBits2Float(0x41da63d5), SkBits2Float(0x41db755b), SkBits2Float(0x41da0a9b));
5085path.quadTo(SkBits2Float(0x41dbce01), SkBits2Float(0x41d9ae59), SkBits2Float(0x41dc285e), SkBits2Float(0x41d952ce));
5086path.quadTo(SkBits2Float(0x41dc55b6), SkBits2Float(0x41d924df), SkBits2Float(0x41dc82cd), SkBits2Float(0x41d8f7cd));
5087path.quadTo(SkBits2Float(0x41dcaf1e), SkBits2Float(0x41d8ca01), SkBits2Float(0x41dcdc4c), SkBits2Float(0x41d89bf0));
5088path.quadTo(SkBits2Float(0x41ef6c33), SkBits2Float(0x41c5aec5), SkBits2Float(0x4204f72e), SkBits2Float(0x41c56cd2));
5089path.close();
caryclarke839e782016-09-15 07:48:18 -07005090testSimplify(reporter, path, filename);
caryclark55888e42016-07-18 10:01:36 -07005091}
5092
5093static void dean4(skiatest::Reporter* reporter, const char* filename) {
5094 SkPath path;
5095
5096 // start region
5097 // start loop, contour: 1
5098 // Segment 1145.3381097316742 2017.6783947944641 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2017.0033947825432
5099 path.moveTo(1145.3381347656250, 2017.6783447265625);
5100 path.lineTo(1145.3381347656250, 2017.0034179687500);
5101 // Segment 1145.3381097316742 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6927231521568 2017.0033947825432
5102 path.lineTo(1143.6927490234375, 2017.0034179687500);
5103 // Segment 1143.6927231521568 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675112890 2018.1589246992417
5104 path.lineTo(1144.8640136718750, 2018.1589355468750);
5105 // Segment 1144.8640675112890 2018.1589246992417 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2017.6783947944641
5106 path.lineTo(1145.3381347656250, 2017.6783447265625);
5107 path.close();
5108 // start loop, contour: 2
5109 // Segment 1145.3381097316742 2016.3216052055359 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675258462 2015.8410752863977
5110 path.moveTo(1145.3381347656250, 2016.3216552734375);
5111 path.lineTo(1144.8640136718750, 2015.8410644531250);
5112 // Segment 1144.8640675258462 2015.8410752863977 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6927230811802 2016.9966052174568
5113 path.lineTo(1143.6927490234375, 2016.9965820312500);
5114 // Segment 1143.6927230811802 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2016.9966052174568
5115 path.lineTo(1145.3381347656250, 2016.9965820312500);
5116 // Segment 1145.3381097316742 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2016.3216052055359
5117 path.lineTo(1145.3381347656250, 2016.3216552734375);
5118 path.close();
5119 // start loop, contour: 3
5120 // Segment 1147.3323798179626 2014.3542600870132 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220239557 2014.8347900059885
5121 path.moveTo(1147.3323974609375, 2014.3542480468750);
5122 path.lineTo(1147.8063964843750, 2014.8348388671875);
5123 // Segment 1147.8064220239557 2014.8347900059885 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2014.8347899786306
5124 path.lineTo(1147.8063964843750, 2014.8348388671875);
5125 // Segment 1147.8064220516883 2014.8347899786306 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.3323798179626 2014.3542600870132
5126 path.lineTo(1147.3323974609375, 2014.3542480468750);
5127 path.close();
5128 // start loop, contour: 4
5129 // Segment 1146.3696286678314 2013.4045072346926 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708778083 2013.8850371497379
5130 path.moveTo(1146.3696289062500, 2013.4045410156250);
5131 path.lineTo(1146.8436279296875, 2013.8850097656250);
5132 // Segment 1146.8436708778083 2013.8850371497379 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436709015571 2013.8850371263100
5133 path.lineTo(1146.8436279296875, 2013.8850097656250);
5134 // Segment 1146.8436709015571 2013.8850371263100 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.3696286678314 2013.4045072346926
5135 path.lineTo(1146.3696289062500, 2013.4045410156250);
5136 path.close();
5137 // start loop, contour: 5
5138 // Segment 1143.2063037902117 2016.5251235961914 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615802348 2016.0445936811461
5139 path.moveTo(1143.2062988281250, 2016.5251464843750);
5140 path.lineTo(1142.7322998046875, 2016.0445556640625);
5141 // Segment 1142.7322615802348 2016.0445936811461 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615564860 2016.0445937045740
5142 path.lineTo(1142.7322998046875, 2016.0445556640625);
5143 // Segment 1142.7322615564860 2016.0445937045740 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.2063037902117 2016.5251235961914
5144 path.lineTo(1143.2062988281250, 2016.5251464843750);
5145 path.close();
5146 // start loop, contour: 6
5147 // Segment 1143.0687679275870 2016.7286419868469 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.5428101613127 2017.2091718784643
5148 path.moveTo(1143.0687255859375, 2016.7286376953125);
5149 path.lineTo(1143.5428466796875, 2017.2092285156250);
5150 // Segment 1143.5428101613127 2017.2091718784643 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.7437679395080 2017.0109272411960
5151 path.lineTo(1143.7437744140625, 2017.0109863281250);
5152 // Segment 1143.7437679395080 2017.0109272411960 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.7437679395080 2016.7286419868469
5153 path.lineTo(1143.7437744140625, 2016.7286376953125);
5154 // Segment 1143.7437679395080 2016.7286419868469 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.0687679275870 2016.7286419868469
5155 path.lineTo(1143.0687255859375, 2016.7286376953125);
5156 path.close();
5157 // start loop, contour: 7
5158 // Segment 1143.2063037902117 2017.4748764038086 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615603032 2017.9554062991915
5159 path.moveTo(1143.2062988281250, 2017.4748535156250);
5160 path.lineTo(1142.7322998046875, 2017.9554443359375);
5161 // Segment 1142.7322615603032 2017.9554062991915 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615746241 2017.9554063133189
5162 path.lineTo(1142.7322998046875, 2017.9554443359375);
5163 // Segment 1142.7322615746241 2017.9554063133189 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.2063037902117 2017.4748764038086
5164 path.lineTo(1143.2062988281250, 2017.4748535156250);
5165 path.close();
5166 // start loop, contour: 8
5167 // Segment 1146.3696286678314 2020.5954928398132 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708977399 2020.1149629444303
5168 path.moveTo(1146.3696289062500, 2020.5954589843750);
5169 path.lineTo(1146.8436279296875, 2020.1149902343750);
5170 // Segment 1146.8436708977399 2020.1149629444303 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708834190 2020.1149629303029
5171 path.lineTo(1146.8436279296875, 2020.1149902343750);
5172 // Segment 1146.8436708834190 2020.1149629303029 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.3696286678314 2020.5954928398132
5173 path.lineTo(1146.3696289062500, 2020.5954589843750);
5174 path.close();
5175 // start loop, contour: 9
5176 // Segment 1147.3323798179626 2019.6457400321960 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220484741 2019.1652101374082
5177 path.moveTo(1147.3323974609375, 2019.6457519531250);
5178 path.lineTo(1147.8063964843750, 2019.1651611328125);
5179 // Segment 1147.8064220484741 2019.1652101374082 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220383478 2019.1652101274185
5180 path.lineTo(1147.8063964843750, 2019.1651611328125);
5181 // Segment 1147.8064220383478 2019.1652101274185 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.3323798179626 2019.6457400321960
5182 path.lineTo(1147.3323974609375, 2019.6457519531250);
5183 path.close();
5184 // start loop, contour: 10
5185 // Segment 1145.3381097316742 2018.3533948063850 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2018.3533948063850
5186 path.moveTo(1145.3381347656250, 2018.3533935546875);
5187 path.lineTo(1156.6848144531250, 2018.3533935546875);
5188 // Segment 1156.6848182678223 2018.3533948063850 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2017.0033947825432
5189 path.lineTo(1156.6848144531250, 2017.0034179687500);
5190 // Segment 1156.6848182678223 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2017.0033947825432
5191 path.lineTo(1145.3381347656250, 2017.0034179687500);
5192 // Segment 1145.3381097316742 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2018.3533948063850
5193 path.lineTo(1145.3381347656250, 2018.3533935546875);
5194 path.close();
5195 // start loop, contour: 11
5196 // Segment 1156.6848182678223 2018.3533948063850 0.3569631313191 0.0000000000000 -0.2645167304388 0.2609454237780 1157.6574279406423 2017.9723661860094
5197 path.moveTo(1156.6848144531250, 2018.3533935546875);
5198 path.cubicTo(1157.0417480468750, 2018.3533935546875, 1157.3929443359375, 2018.2332763671875, 1157.6574707031250, 2017.9724121093750);
5199 // Segment 1157.6574279406423 2017.9723661860094 0.2653344079822 -0.2617520616521 0.0000000000000 0.3596905289350 1158.0474975705147 2017.0000000000000
5200 path.cubicTo(1157.9227294921875, 2017.7105712890625, 1158.0474853515625, 2017.3597412109375, 1158.0474853515625, 2017.0000000000000);
5201 // Segment 1158.0474975705147 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6974975466728 2017.0000000000000
5202 path.lineTo(1156.6975097656250, 2017.0000000000000);
5203 // Segment 1156.6974975466728 2017.0000000000000 0.0028009248351 0.0403311981485 0.0118595244351 -0.0220843520393 1156.6941780622435 2017.0325257649940
5204 path.cubicTo(1156.7003173828125, 2017.0402832031250, 1156.7060546875000, 2017.0104980468750, 1156.6942138671875, 2017.0324707031250);
5205 // Segment 1156.6941780622435 2017.0325257649940 -0.0032637855860 0.0184860248562 0.0120617528380 -0.0065934603083 1156.7093435710913 2017.0113063061967
5206 path.cubicTo(1156.6909179687500, 2017.0510253906250, 1156.7214355468750, 2017.0047607421875, 1156.7093505859375, 2017.0113525390625);
5207 // split at 0.4496445953846
5208 // path.cubicTo(1156.6927490234375, 2017.0407714843750, 1156.6981201171875, 2017.0360107421875, 1156.7033691406250, 2017.0289306640625);
5209 // path.cubicTo(1156.7097167968750, 2017.0201416015625, 1156.7159423828125, 2017.0076904296875, 1156.7093505859375, 2017.0113525390625);
5210 // Segment 1156.7093435710913 2017.0113063061967 -0.0070717276929 0.0122220954353 0.0203483811973 -0.0039136894418 1156.7268834554304 2016.9985353221975
5211 path.cubicTo(1156.7022705078125, 2017.0235595703125, 1156.7471923828125, 2016.9946289062500, 1156.7269287109375, 2016.9985351562500);
5212 // Segment 1156.7268834554304 2016.9985353221975 -0.0244396787691 0.0123649140586 0.0433322464027 0.0026558844666 1156.6848182678223 2017.0033947825432
5213 path.cubicTo(1156.7023925781250, 2017.0108642578125, 1156.7281494140625, 2017.0061035156250, 1156.6848144531250, 2017.0034179687500);
5214 // split at 0.4418420493603
5215 // path.cubicTo(1156.7160644531250, 2017.0040283203125, 1156.7150878906250, 2017.0061035156250, 1156.7136230468750, 2017.0065917968750);
5216 // path.cubicTo(1156.7116699218750, 2017.0070800781250, 1156.7089843750000, 2017.0048828125000, 1156.6848144531250, 2017.0034179687500);
5217 // Segment 1156.6848182678223 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2018.3533948063850
5218 path.lineTo(1156.6848144531250, 2018.3533935546875);
5219 path.close();
5220 // start loop, contour: 12
5221 // Segment 1158.0474975705147 2017.0000000000000 0.0000000000000 -0.3596905289350 0.2653344079822 0.2617520616521 1157.6574279406423 2016.0276338139906
5222 path.moveTo(1158.0474853515625, 2017.0000000000000);
5223 path.cubicTo(1158.0474853515625, 2016.6402587890625, 1157.9227294921875, 2016.2894287109375, 1157.6574707031250, 2016.0275878906250);
5224 // Segment 1157.6574279406423 2016.0276338139906 -0.2645167304388 -0.2609454237780 0.3569631313191 0.0000000000000 1156.6848182678223 2015.6466051936150
5225 path.cubicTo(1157.3929443359375, 2015.7667236328125, 1157.0417480468750, 2015.6466064453125, 1156.6848144531250, 2015.6466064453125);
5226 // split at 0.5481675863266
5227 // path.cubicTo(1157.5124511718750, 2015.8846435546875, 1157.3414306640625, 2015.7839355468750, 1157.1577148437500, 2015.7220458984375);
5228 // path.cubicTo(1157.0062255859375, 2015.6711425781250, 1156.8460693359375, 2015.6466064453125, 1156.6848144531250, 2015.6466064453125);
5229 // Segment 1156.6848182678223 2015.6466051936150 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2016.9966052174568
5230 path.lineTo(1156.6848144531250, 2016.9965820312500);
5231 // Segment 1156.6848182678223 2016.9966052174568 0.0433322464027 -0.0026558844666 -0.0244396787691 -0.0123649140586 1156.7268834554304 2017.0014646778025
5232 path.cubicTo(1156.7281494140625, 2016.9938964843750, 1156.7023925781250, 2016.9891357421875, 1156.7269287109375, 2017.0014648437500);
5233 // split at 0.5581579208374
5234 // path.cubicTo(1156.7089843750000, 2016.9951171875000, 1156.7116699218750, 2016.9929199218750, 1156.7136230468750, 2016.9934082031250);
5235 // path.cubicTo(1156.7150878906250, 2016.9938964843750, 1156.7160644531250, 2016.9959716796875, 1156.7269287109375, 2017.0014648437500);
5236 // Segment 1156.7268834554304 2017.0014646778025 0.0203483811973 0.0039136894418 -0.0070717276929 -0.0122220954353 1156.7093435710913 2016.9886936938033
5237 path.cubicTo(1156.7471923828125, 2017.0053710937500, 1156.7022705078125, 2016.9764404296875, 1156.7093505859375, 2016.9886474609375);
5238 // Segment 1156.7093435710913 2016.9886936938033 0.0120617528380 0.0065934603083 -0.0032637855860 -0.0184860248562 1156.6941780622435 2016.9674742350060
5239 path.cubicTo(1156.7214355468750, 2016.9952392578125, 1156.6909179687500, 2016.9489746093750, 1156.6942138671875, 2016.9675292968750);
5240 // Segment 1156.6941780622435 2016.9674742350060 0.0118595244351 0.0220843520393 0.0028009248351 -0.0403311981485 1156.6974975466728 2017.0000000000000
5241 path.cubicTo(1156.7060546875000, 2016.9895019531250, 1156.7003173828125, 2016.9597167968750, 1156.6975097656250, 2017.0000000000000);
5242 // split at 0.4572408795357
5243 // path.cubicTo(1156.6995849609375, 2016.9775390625000, 1156.7014160156250, 2016.9768066406250, 1156.7014160156250, 2016.9768066406250);
5244 // path.cubicTo(1156.7014160156250, 2016.9769287109375, 1156.6989746093750, 2016.9781494140625, 1156.6975097656250, 2017.0000000000000);
5245 // Segment 1156.6974975466728 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1158.0474975705147 2017.0000000000000
5246 path.lineTo(1158.0474853515625, 2017.0000000000000);
5247 path.close();
5248 // start loop, contour: 13
5249 // Segment 1156.6848182678223 2015.6466051936150 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2015.6466051936150
5250 path.moveTo(1156.6848144531250, 2015.6466064453125);
5251 path.lineTo(1145.3381347656250, 2015.6466064453125);
5252 // Segment 1145.3381097316742 2015.6466051936150 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2016.9966052174568
5253 path.lineTo(1145.3381347656250, 2016.9965820312500);
5254 // Segment 1145.3381097316742 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2016.9966052174568
5255 path.lineTo(1156.6848144531250, 2016.9965820312500);
5256 // Segment 1156.6848182678223 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2015.6466051936150
5257 path.lineTo(1156.6848144531250, 2015.6466064453125);
5258 path.close();
5259 // start loop, contour: 14
5260 // Segment 1145.8121519375022 2016.8021351246741 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220237907 2014.8347900061515
5261 path.moveTo(1145.8121337890625, 2016.8021240234375);
5262 path.lineTo(1147.8063964843750, 2014.8348388671875);
5263 // Segment 1147.8064220237907 2014.8347900061515 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583376121346 2013.8737301678750
5264 path.lineTo(1146.8583984375000, 2013.8737792968750);
5265 // Segment 1146.8583376121346 2013.8737301678750 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675258462 2015.8410752863977
5266 path.lineTo(1144.8640136718750, 2015.8410644531250);
5267 // Segment 1144.8640675258462 2015.8410752863977 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8121519375022 2016.8021351246741
5268 path.lineTo(1145.8121337890625, 2016.8021240234375);
5269 path.close();
5270 // start loop, contour: 15
5271 // Segment 1147.8064220516883 2014.8347899786306 0.5430154146087 -0.5356841365729 0.5430154146087 0.5356841365729 1147.8064220516883 2012.9239773430752
5272 path.moveTo(1147.8063964843750, 2014.8348388671875);
5273 path.cubicTo(1148.3494873046875, 2014.2990722656250, 1148.3494873046875, 2013.4597167968750, 1147.8063964843750, 2012.9239501953125);
5274 // Segment 1147.8064220516883 2012.9239773430752 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375842370 2013.8850371263100
5275 path.lineTo(1146.8583984375000, 2013.8850097656250);
5276 // Segment 1146.8583375842370 2013.8850371263100 0.0071280060876 0.0070317705240 0.0071280060876 -0.0070317705240 1146.8583375842370 2013.8737301953959
5277 path.cubicTo(1146.8654785156250, 2013.8920898437500, 1146.8654785156250, 2013.8666992187500, 1146.8583984375000, 2013.8737792968750);
5278 // Segment 1146.8583375842370 2013.8737301953959 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2014.8347899786306
5279 path.lineTo(1147.8063964843750, 2014.8348388671875);
5280 path.close();
5281 // start loop, contour: 16
5282 // Segment 1147.8064220516883 2012.9239773430752 -0.5379138488298 -0.5306514472866 0.5379138488298 -0.5306514472866 1145.8955864341058 2012.9239773430752
5283 path.moveTo(1147.8063964843750, 2012.9239501953125);
5284 path.cubicTo(1147.2685546875000, 2012.3933105468750, 1146.4334716796875, 2012.3933105468750, 1145.8956298828125, 2012.9239501953125);
5285 // Segment 1145.8955864341058 2012.9239773430752 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436709015571 2013.8850371263100
5286 path.lineTo(1146.8436279296875, 2013.8850097656250);
5287 // Segment 1146.8436709015571 2013.8850371263100 0.0122295718664 -0.0120644598103 -0.0122295718664 -0.0120644598103 1146.8583375842370 2013.8850371263100
5288 path.cubicTo(1146.8559570312500, 2013.8729248046875, 1146.8460693359375, 2013.8729248046875, 1146.8583984375000, 2013.8850097656250);
5289 // Segment 1146.8583375842370 2013.8850371263100 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2012.9239773430752
5290 path.lineTo(1147.8063964843750, 2012.9239501953125);
5291 path.close();
5292 // start loop, contour: 17
5293 // Segment 1145.8955864579798 2012.9239773195236 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615803600 2016.0445936810224
5294 path.moveTo(1145.8956298828125, 2012.9239501953125);
5295 path.lineTo(1142.7322998046875, 2016.0445556640625);
5296 // Segment 1142.7322615803600 2016.0445936810224 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6803460000633 2017.0056535113604
5297 path.lineTo(1143.6802978515625, 2017.0056152343750);
5298 // Segment 1143.6803460000633 2017.0056535113604 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708776831 2013.8850371498615
5299 path.lineTo(1146.8436279296875, 2013.8850097656250);
5300 // Segment 1146.8436708776831 2013.8850371498615 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8955864579798 2012.9239773195236
5301 path.lineTo(1145.8956298828125, 2012.9239501953125);
5302 path.close();
5303 // start loop, contour: 18
5304 // Segment 1142.7322615564860 2016.0445937045740 -0.0343838913237 0.0339196727021 0.0561572931720 -0.0710493024751 1142.5744069596683 2016.2183613784646
5305 path.moveTo(1142.7322998046875, 2016.0445556640625);
5306 path.cubicTo(1142.6978759765625, 2016.0784912109375, 1142.6306152343750, 2016.1473388671875, 1142.5744628906250, 2016.2183837890625);
5307 // Segment 1142.5744069596683 2016.2183613784646 -0.0547779032556 0.0720510806539 0.0000000000000 -0.2570904015602 1142.3937679156661 2016.7286419868469
5308 path.cubicTo(1142.5196533203125, 2016.2904052734375, 1142.3937988281250, 2016.4715576171875, 1142.3937988281250, 2016.7286376953125);
5309 // Segment 1142.3937679156661 2016.7286419868469 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.7437679395080 2016.7286419868469
5310 path.lineTo(1143.7437744140625, 2016.7286376953125);
5311 // Segment 1143.7437679395080 2016.7286419868469 -0.0051909534315 0.0665915567290 0.0133980913650 -0.0361675066532 1143.6976291086639 2016.9514128270803
5312 path.cubicTo(1143.7385253906250, 2016.7952880859375, 1143.7110595703125, 2016.9152832031250, 1143.6976318359375, 2016.9514160156250);
5313 // Segment 1143.6976291086639 2016.9514128270803 -0.0142876819622 0.0277028472317 0.0040377216094 -0.0063254385208 1143.6490888124401 2017.0354042045738
5314 path.cubicTo(1143.6833496093750, 2016.9791259765625, 1143.6530761718750, 2017.0290527343750, 1143.6490478515625, 2017.0354003906250);
5315 // Segment 1143.6490888124401 2017.0354042045738 -0.0045813437564 0.0032098513409 -0.0343840362634 0.0339198156850 1143.6803460239373 2017.0056534878088
5316 path.cubicTo(1143.6445312500000, 2017.0385742187500, 1143.6459960937500, 2017.0395507812500, 1143.6802978515625, 2017.0056152343750);
5317 // Segment 1143.6803460239373 2017.0056534878088 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615564860 2016.0445937045740
5318 path.lineTo(1142.7322998046875, 2016.0445556640625);
5319 path.close();
5320 // start loop, contour: 19
5321 // Segment 1142.5947256938614 2016.2481120952295 -0.1857487117715 0.1832409092043 0.0167379373694 -0.0990717748979 1142.3430278987244 2016.7518748698508
5322 path.moveTo(1142.5947265625000, 2016.2481689453125);
5323 path.cubicTo(1142.4089355468750, 2016.4313964843750, 1142.3597412109375, 2016.6528320312500, 1142.3430175781250, 2016.7518310546875);
5324 // Segment 1142.3430278987244 2016.7518748698508 -0.0156657977007 0.1069052535795 0.0000000000000 -0.0339197441936 1142.3249999880791 2017.0000000000000
5325 path.cubicTo(1142.3273925781250, 2016.8587646484375, 1142.3249511718750, 2016.9660644531250, 1142.3249511718750, 2017.0000000000000);
5326 // Segment 1142.3249999880791 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6750000119209 2017.0000000000000
5327 path.lineTo(1143.6750488281250, 2017.0000000000000);
5328 // Segment 1143.6750000119209 2017.0000000000000 0.0000000000000 -0.0339197441936 -0.0015261841961 -0.0051459911965 1143.6741640831724 2016.9767671169961
5329 path.cubicTo(1143.6750488281250, 2016.9660644531250, 1143.6726074218750, 2016.9716796875000, 1143.6741943359375, 2016.9768066406250);
5330 // Segment 1143.6741640831724 2016.9767671169961 -0.0007886982052 0.0013596649622 0.0074114058388 -0.0224954551713 1143.6525251830094 2017.0486861571169
5331 path.cubicTo(1143.6733398437500, 2016.9781494140625, 1143.6599121093750, 2017.0262451171875, 1143.6524658203125, 2017.0487060546875);
5332 // split at 0.4203657805920
5333 // path.cubicTo(1143.6738281250000, 2016.9774169921875, 1143.6712646484375, 2016.9862060546875, 1143.6678466796875, 2016.9979248046875);
5334 // path.cubicTo(1143.6630859375000, 2017.0140380859375, 1143.6567382812500, 2017.0356445312500, 1143.6524658203125, 2017.0487060546875);
5335 // Segment 1143.6525251830094 2017.0486861571169 -0.0119644334077 0.0236755853369 0.0381324473830 -0.0447670202574 1143.5428101613127 2017.2091718784643
5336 path.cubicTo(1143.6405029296875, 2017.0723876953125, 1143.5809326171875, 2017.1644287109375, 1143.5428466796875, 2017.2092285156250);
5337 // Segment 1143.5428101613127 2017.2091718784643 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.5947256938614 2016.2481120952295
5338 path.lineTo(1142.5947265625000, 2016.2481689453125);
5339 path.close();
5340 // start loop, contour: 20
5341 // Segment 1142.3249999880791 2017.0000000000000 0.0000000000000 0.0339197441936 -0.0156657977007 -0.1069052535795 1142.3430278987244 2017.2481251301492
5342 path.moveTo(1142.3249511718750, 2017.0000000000000);
5343 path.cubicTo(1142.3249511718750, 2017.0339355468750, 1142.3273925781250, 2017.1412353515625, 1142.3430175781250, 2017.2481689453125);
5344 // Segment 1142.3430278987244 2017.2481251301492 0.0167379373694 0.0990717748979 -0.1857487117715 -0.1832409092043 1142.5947256938614 2017.7518879047705
5345 path.cubicTo(1142.3597412109375, 2017.3471679687500, 1142.4089355468750, 2017.5686035156250, 1142.5947265625000, 2017.7518310546875);
5346 // split at 0.4008532166481
5347 // path.cubicTo(1142.3497314453125, 2017.2878417968750, 1142.3616943359375, 2017.3471679687500, 1142.3854980468750, 2017.4158935546875);
5348 // path.cubicTo(1142.4211425781250, 2017.5185546875000, 1142.4833984375000, 2017.6420898437500, 1142.5947265625000, 2017.7518310546875);
5349 // Segment 1142.5947256938614 2017.7518879047705 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.5428101613127 2016.7908281215357
5350 path.lineTo(1143.5428466796875, 2016.7907714843750);
5351 // Segment 1143.5428101613127 2016.7908281215357 0.0381324473830 0.0447670202574 -0.0119644334077 -0.0236755853369 1143.6525251830094 2016.9513138428831
5352 path.cubicTo(1143.5809326171875, 2016.8355712890625, 1143.6405029296875, 2016.9276123046875, 1143.6524658203125, 2016.9512939453125);
5353 // Segment 1143.6525251830094 2016.9513138428831 0.0074114058388 0.0224954551713 -0.0007886982052 -0.0013596649622 1143.6741640831724 2017.0232328830039
5354 path.cubicTo(1143.6599121093750, 2016.9737548828125, 1143.6733398437500, 2017.0218505859375, 1143.6741943359375, 2017.0231933593750);
5355 // Segment 1143.6741640831724 2017.0232328830039 -0.0015261841961 0.0051459911965 0.0000000000000 0.0339197441936 1143.6750000119209 2017.0000000000000
5356 path.cubicTo(1143.6726074218750, 2017.0283203125000, 1143.6750488281250, 2017.0339355468750, 1143.6750488281250, 2017.0000000000000);
5357 // Segment 1143.6750000119209 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.3249999880791 2017.0000000000000
5358 path.lineTo(1142.3249511718750, 2017.0000000000000);
5359 path.close();
5360 // start loop, contour: 21
5361 // Segment 1142.5947256938614 2017.7518879047705 -0.0799271403989 -0.1522613934208 -0.2174629955730 -0.2879403701950 1142.7322615564860 2017.9554062954260
5362 path.moveTo(1142.5947265625000, 2017.7518310546875);
5363 path.cubicTo(1142.5147705078125, 2017.5996093750000, 1142.5147705078125, 2017.6674804687500, 1142.7322998046875, 2017.9554443359375);
5364 // Segment 1142.7322615564860 2017.9554062954260 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6803460239373 2016.9943465121912
5365 path.lineTo(1143.6802978515625, 2016.9943847656250);
5366 // Segment 1143.6803460239373 2016.9943465121912 0.0799271403989 0.1522613934208 0.2174629955730 0.2879403701950 1143.5428101613127 2016.7908281215357
5367 path.cubicTo(1143.7602539062500, 2017.1466064453125, 1143.7602539062500, 2017.0787353515625, 1143.5428466796875, 2016.7907714843750);
5368 // Segment 1143.5428101613127 2016.7908281215357 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.5947256938614 2017.7518879047705
5369 path.lineTo(1142.5947265625000, 2017.7518310546875);
5370 path.close();
5371 // start loop, contour: 22
5372 // Segment 1142.7322615746241 2017.9554063133189 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8955864522438 2021.0760227493236
5373 path.moveTo(1142.7322998046875, 2017.9554443359375);
5374 path.lineTo(1145.8956298828125, 2021.0760498046875);
5375 // Segment 1145.8955864522438 2021.0760227493236 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708834190 2020.1149629303029
5376 path.lineTo(1146.8436279296875, 2020.1149902343750);
5377 // Segment 1146.8436708834190 2020.1149629303029 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6803460057993 2016.9943464942983
5378 path.lineTo(1143.6802978515625, 2016.9943847656250);
5379 // Segment 1143.6803460057993 2016.9943464942983 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615746241 2017.9554063133189
5380 path.lineTo(1142.7322998046875, 2017.9554443359375);
5381 path.close();
5382 // start loop, contour: 23
5383 // Segment 1145.8955864341058 2021.0760227314306 0.2730164534637 0.2693304447891 -0.3016608168437 0.0000000000000 1146.8510041236877 2021.4740112423897
5384 path.moveTo(1145.8956298828125, 2021.0760498046875);
5385 path.cubicTo(1146.1685791015625, 2021.3453369140625, 1146.5493164062500, 2021.4739990234375, 1146.8509521484375, 2021.4739990234375);
5386 // Segment 1146.8510041236877 2021.4740112423897 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8510041236877 2020.1240112185478
5387 path.lineTo(1146.8509521484375, 2020.1240234375000);
5388 // Segment 1146.8510041236877 2020.1240112185478 -0.0031276099109 0.0031991747760 0.0281856144058 0.0140930868099 1146.8580791488898 2020.1202473991566
5389 path.cubicTo(1146.8479003906250, 2020.1271972656250, 1146.8862304687500, 2020.1343994140625, 1146.8580322265625, 2020.1202392578125);
5390 // split at 0.3845077157021
5391 // path.cubicTo(1146.8497314453125, 2020.1252441406250, 1146.8547363281250, 2020.1270751953125, 1146.8596191406250, 2020.1280517578125);
5392 // path.cubicTo(1146.8675537109375, 2020.1296386718750, 1146.8753662109375, 2020.1289062500000, 1146.8580322265625, 2020.1202392578125);
5393 // Segment 1146.8580791488898 2020.1202473991566 -0.0369995545027 -0.0123195805663 0.0067223483810 0.0136883790721 1146.8436709015571 2020.1149629481959
5394 path.cubicTo(1146.8210449218750, 2020.1079101562500, 1146.8503417968750, 2020.1286621093750, 1146.8436279296875, 2020.1149902343750);
5395 // Segment 1146.8436709015571 2020.1149629481959 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8955864341058 2021.0760227314306
5396 path.lineTo(1145.8956298828125, 2021.0760498046875);
5397 path.close();
5398 // start loop, contour: 24
5399 // Segment 1146.8510041236877 2021.4740112423897 0.3016605789999 0.0000000000000 -0.2730166120260 0.2693306012106 1147.8064220516883 2021.0760227314306
5400 path.moveTo(1146.8509521484375, 2021.4739990234375);
5401 path.cubicTo(1147.1527099609375, 2021.4739990234375, 1147.5334472656250, 2021.3453369140625, 1147.8063964843750, 2021.0760498046875);
5402 // Segment 1147.8064220516883 2021.0760227314306 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375842370 2020.1149629481959
5403 path.lineTo(1146.8583984375000, 2020.1149902343750);
5404 // Segment 1146.8583375842370 2020.1149629481959 -0.0067222671256 0.0136883164611 0.0369996293611 -0.0123196021258 1146.8439293663473 2020.1202473404985
5405 path.cubicTo(1146.8515625000000, 2020.1286621093750, 1146.8809814453125, 2020.1079101562500, 1146.8438720703125, 2020.1202392578125);
5406 // Segment 1146.8439293663473 2020.1202473404985 -0.0281857033438 0.0140931104690 0.0031276541428 0.0031991704542 1146.8510041236877 2020.1240112185478
5407 path.cubicTo(1146.8157958984375, 2020.1343994140625, 1146.8541259765625, 2020.1271972656250, 1146.8509521484375, 2020.1240234375000);
5408 // Segment 1146.8510041236877 2020.1240112185478 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8510041236877 2021.4740112423897
5409 path.lineTo(1146.8509521484375, 2021.4739990234375);
5410 path.close();
5411 // start loop, contour: 25
5412 // Segment 1147.8064220516883 2021.0760227314306 0.5430154146087 -0.5356841365729 0.5430154146087 0.5356841365729 1147.8064220516883 2019.1652101405787
5413 path.moveTo(1147.8063964843750, 2021.0760498046875);
5414 path.cubicTo(1148.3494873046875, 2020.5402832031250, 1148.3494873046875, 2019.7009277343750, 1147.8063964843750, 2019.1651611328125);
5415 // Segment 1147.8064220516883 2019.1652101405787 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375842370 2020.1262699238134
5416 path.lineTo(1146.8583984375000, 2020.1262207031250);
5417 // Segment 1146.8583375842370 2020.1262699238134 0.0071280060876 0.0070317705240 0.0071280060876 -0.0070317705240 1146.8583375842370 2020.1149629481959
5418 path.cubicTo(1146.8654785156250, 2020.1333007812500, 1146.8654785156250, 2020.1079101562500, 1146.8583984375000, 2020.1149902343750);
5419 // Segment 1146.8583375842370 2020.1149629481959 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2021.0760227314306
5420 path.lineTo(1147.8063964843750, 2021.0760498046875);
5421 path.close();
5422 // start loop, contour: 26
5423 // Segment 1147.8064220383478 2019.1652101274185 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8121519520594 2017.1978648896866
5424 path.moveTo(1147.8063964843750, 2019.1651611328125);
5425 path.lineTo(1145.8121337890625, 2017.1978759765625);
5426 // Segment 1145.8121519520594 2017.1978648896866 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675112890 2018.1589246992417
5427 path.lineTo(1144.8640136718750, 2018.1589355468750);
5428 // Segment 1144.8640675112890 2018.1589246992417 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375975775 2020.1262699369736
5429 path.lineTo(1146.8583984375000, 2020.1262207031250);
5430 // Segment 1146.8583375975775 2020.1262699369736 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220383478 2019.1652101274185
5431 path.lineTo(1147.8063964843750, 2019.1651611328125);
5432 path.close();
5433
5434testSimplify(reporter, path, filename);
5435}
5436
5437static void testQuads66(skiatest::Reporter* reporter,const char* filename) {
5438 SkPath path;
5439 path.moveTo(2, 0);
5440 path.quadTo(3, 1, 2, 2);
5441 path.lineTo(2, 3);
5442 path.close();
5443 path.moveTo(2, 1);
5444 path.lineTo(2, 1);
5445 path.quadTo(1, 2, 2, 2);
5446 path.close();
5447 testSimplify(reporter, path, filename);
5448}
5449
5450static void testQuads67(skiatest::Reporter* reporter,const char* filename) {
5451 SkPath path;
5452 path.moveTo(3, 2);
5453 path.quadTo(1, 3, 3, 3);
5454 path.lineTo(3, 3);
5455 path.close();
5456 path.moveTo(0, 0);
5457 path.lineTo(1, 0);
5458 path.quadTo(2, 3, 3, 3);
5459 path.close();
5460 testSimplify(reporter, path, filename);
5461}
5462
5463static void testQuads68(skiatest::Reporter* reporter,const char* filename) {
5464 SkPath path;
5465 path.moveTo(1, 2);
5466 path.quadTo(0, 3, 2, 3);
5467 path.lineTo(2, 3);
5468 path.close();
5469 path.moveTo(1, 0);
5470 path.lineTo(0, 1);
5471 path.quadTo(1, 3, 2, 3);
5472 path.close();
5473 testSimplify(reporter, path, filename);
5474}
5475
5476static void testQuads69(skiatest::Reporter* reporter,const char* filename) {
5477 SkPath path;
5478 path.moveTo(1, 0);
5479 path.quadTo(2, 2, 2, 3);
5480 path.lineTo(2, 3);
5481 path.close();
5482 path.moveTo(1, 0);
5483 path.lineTo(1, 0);
5484 path.quadTo(3, 0, 1, 3);
5485 path.close();
5486 testSimplify(reporter, path, filename);
5487}
5488
5489static void testQuads70(skiatest::Reporter* reporter, const char* filename) {
5490 SkPath path;
5491 path.moveTo(1, 1);
5492 path.quadTo(2, 3, 3, 3);
5493 path.lineTo(3, 3);
5494 path.close();
5495 path.moveTo(2, 0);
5496 path.lineTo(2, 2);
5497 path.quadTo(1, 3, 3, 3);
5498 path.close();
5499 testSimplify(reporter, path, filename);
5500}
5501
5502static void testQuads71(skiatest::Reporter* reporter, const char* filename) {
5503 SkPath path;
5504 path.moveTo(1, 1);
5505 path.quadTo(2, 3, 3, 3);
5506 path.lineTo(3, 3);
5507 path.close();
5508 path.moveTo(3, 0);
5509 path.lineTo(2, 2);
5510 path.quadTo(1, 3, 3, 3);
5511 path.close();
5512 testSimplify(reporter, path, filename);
5513}
5514
5515static void testQuads72(skiatest::Reporter* reporter, const char* filename) {
5516 SkPath path;
5517 path.moveTo(1, 1);
5518 path.quadTo(2, 3, 3, 3);
5519 path.lineTo(3, 3);
5520 path.close();
5521 path.moveTo(0, 1);
5522 path.lineTo(2, 2);
5523 path.quadTo(1, 3, 3, 3);
5524 path.close();
5525 testSimplify(reporter, path, filename);
caryclark2bec26a2016-05-26 09:01:47 -07005526}
5527
caryclarke839e782016-09-15 07:48:18 -07005528static void testQuads73(skiatest::Reporter* reporter, const char* filename) {
5529 SkPath path;
5530 path.moveTo(0, 0);
5531 path.quadTo(0, 1, 1, 2);
5532 path.lineTo(0, 3);
5533 path.close();
5534 path.moveTo(0, 0);
5535 path.lineTo(0, 0);
5536 path.quadTo(0, 1, 1, 1);
5537 path.close();
5538 testSimplify(reporter, path, filename);
5539}
5540
caryclarke3a4e992016-09-28 09:22:17 -07005541static void bug5169(skiatest::Reporter* reporter, const char* filename) {
5542 SkPath path;
5543path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x4281c71c)); // 0, 64.8889f
5544path.cubicTo(SkBits2Float(0x434e0000), SkBits2Float(0x4281c71c), SkBits2Float(0x00000000), SkBits2Float(0xc2a238e4), SkBits2Float(0x00000000), SkBits2Float(0x4281c71c)); // 206, 64.8889f, 0, -81.1111f, 0, 64.8889f
5545path.moveTo(SkBits2Float(0x43300000), SkBits2Float(0x41971c72)); // 176, 18.8889f
5546path.cubicTo(SkBits2Float(0xc29e0000), SkBits2Float(0xc25c71c7), SkBits2Float(0x42b20000), SkBits2Float(0x42fbc71c), SkBits2Float(0x43300000), SkBits2Float(0x41971c72)); // -79, -55.1111f, 89, 125.889f, 176, 18.8889f
5547 testSimplify(reporter, path, filename);
5548}
5549
caryclarkb36a3cd2016-10-18 07:59:44 -07005550static void tiger8_393(skiatest::Reporter* reporter, const char* filename) {
5551 SkPath path;
5552 path.setFillType((SkPath::FillType) 0);
5553path.moveTo(SkBits2Float(0x42b93333), SkBits2Float(0x43d5a666)); // 92.6f, 427.3f
5554path.cubicTo(SkBits2Float(0x42b93333), SkBits2Float(0x43d5a666), SkBits2Float(0x42b5cccd), SkBits2Float(0x43da1999), SkBits2Float(0x42b80000), SkBits2Float(0x43ddf333)); // 92.6f, 427.3f, 90.9f, 436.2f, 92, 443.9f
5555path.cubicTo(SkBits2Float(0x42b80000), SkBits2Float(0x43ddf333), SkBits2Float(0x42b30000), SkBits2Float(0x43e17333), SkBits2Float(0x42cf999a), SkBits2Float(0x43e1b333)); // 92, 443.9f, 89.5f, 450.9f, 103.8f, 451.4f
5556path.cubicTo(SkBits2Float(0x42ec3334), SkBits2Float(0x43e14ccd), SkBits2Float(0x42e73334), SkBits2Float(0x43ddf333), SkBits2Float(0x42e73334), SkBits2Float(0x43ddf333)); // 118.1f, 450.6f, 115.6f, 443.9f, 115.6f, 443.9f
5557path.cubicTo(SkBits2Float(0x42e7999a), SkBits2Float(0x43de8000), SkBits2Float(0x42ea6667), SkBits2Float(0x43db4000), SkBits2Float(0x42e60001), SkBits2Float(0x43d5a666)); // 115.8f, 445, 117.2f, 438.5f, 115, 427.3f
5558 testSimplify(reporter, path, filename);
5559}
5560
caryclark78a37a52016-10-20 12:36:16 -07005561// triggers angle assert from distance field code
5562static void carsvg_1(skiatest::Reporter* reporter, const char* filename) {
5563 SkPath path;
5564 path.setFillType((SkPath::FillType) 0);
5565path.moveTo(SkBits2Float(0x4393d61e), SkBits2Float(0x43e768f9)); // 295.673f, 462.82f
5566path.cubicTo(SkBits2Float(0x4396b50e), SkBits2Float(0x43e63c20), SkBits2Float(0x43998931), SkBits2Float(0x43e6c43e), SkBits2Float(0x439cb6a8), SkBits2Float(0x43e70ef9)); // 301.414f, 460.47f, 307.072f, 461.533f, 313.427f, 462.117f
5567path.cubicTo(SkBits2Float(0x439dfc1e), SkBits2Float(0x43e72ce0), SkBits2Float(0x439a285c), SkBits2Float(0x43e717fb), SkBits2Float(0x4398e23c), SkBits2Float(0x43e7027c)); // 315.97f, 462.351f, 308.315f, 462.187f, 305.767f, 462.019f
5568path.cubicTo(SkBits2Float(0x4398136f), SkBits2Float(0x43e6f4db), SkBits2Float(0x439a7e14), SkBits2Float(0x43e6d390), SkBits2Float(0x439b4ba9), SkBits2Float(0x43e6b956)); // 304.152f, 461.913f, 308.985f, 461.653f, 310.591f, 461.448f
5569path.cubicTo(SkBits2Float(0x439c2b19), SkBits2Float(0x43e68603), SkBits2Float(0x43abf4df), SkBits2Float(0x43e9ca9e), SkBits2Float(0x43a1daea), SkBits2Float(0x43e912a5)); // 312.337f, 461.047f, 343.913f, 467.583f, 323.71f, 466.146f
5570path.cubicTo(SkBits2Float(0x43a4f45a), SkBits2Float(0x43e78baf), SkBits2Float(0x43a2a391), SkBits2Float(0x43e86a82), SkBits2Float(0x43a946bd), SkBits2Float(0x43e90c56)); // 329.909f, 463.091f, 325.278f, 464.832f, 338.553f, 466.096f
5571path.lineTo(SkBits2Float(0x43a4250b), SkBits2Float(0x43e998dc)); // 328.289f, 467.194f
5572path.cubicTo(SkBits2Float(0x43a8a9c8), SkBits2Float(0x43e8f06c), SkBits2Float(0x43a95cb5), SkBits2Float(0x43e84ea6), SkBits2Float(0x43a6f7c1), SkBits2Float(0x43e9bdb5)); // 337.326f, 465.878f, 338.724f, 464.614f, 333.936f, 467.482f
5573path.cubicTo(SkBits2Float(0x43a59ed0), SkBits2Float(0x43e9d2ca), SkBits2Float(0x4395ea4d), SkBits2Float(0x43e92afe), SkBits2Float(0x43a06569), SkBits2Float(0x43e7773d)); // 331.241f, 467.647f, 299.83f, 466.336f, 320.792f, 462.932f
5574path.cubicTo(SkBits2Float(0x438bf0ff), SkBits2Float(0x43ea0fef), SkBits2Float(0x43a0e17a), SkBits2Float(0x43e5f41b), SkBits2Float(0x4398f3fb), SkBits2Float(0x43e804c8)); // 279.883f, 468.124f, 321.762f, 459.907f, 305.906f, 464.037f
5575path.lineTo(SkBits2Float(0x4393d61e), SkBits2Float(0x43e768f9)); // 295.673f, 462.82f
5576path.close();
5577
5578 testSimplify(reporter, path, filename);
5579}
5580
caryclark34efb702016-10-24 08:19:06 -07005581static void simplifyTest_1(skiatest::Reporter* reporter, const char* filename) {
5582 SkPath path;
5583 path.setFillType((SkPath::FillType) 0);
5584path.moveTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80ef)); // 95.9684f, 119.752f
5585path.quadTo(SkBits2Float(0x42c26810), SkBits2Float(0x42e214b8), SkBits2Float(0x42cdcad5), SkBits2Float(0x42d82aa2)); // 97.2032f, 113.04f, 102.896f, 108.083f
5586path.lineTo(SkBits2Float(0x42cdcb21), SkBits2Float(0x42d82a61)); // 102.897f, 108.083f
5587path.quadTo(SkBits2Float(0x42d5e3c8), SkBits2Float(0x42d12140), SkBits2Float(0x42e20ee8), SkBits2Float(0x42cdc937)); // 106.945f, 104.565f, 113.029f, 102.893f
5588path.lineTo(SkBits2Float(0x42e256e3), SkBits2Float(0x42cdbc92)); // 113.17f, 102.868f
5589path.lineTo(SkBits2Float(0x42f5eadb), SkBits2Float(0x42cc2cb3)); // 122.959f, 102.087f
5590path.lineTo(SkBits2Float(0x42f746a6), SkBits2Float(0x42cccf85)); // 123.638f, 102.405f
5591path.quadTo(SkBits2Float(0x42fa586c), SkBits2Float(0x42d126c4), SkBits2Float(0x42f6c657), SkBits2Float(0x42d5d315)); // 125.173f, 104.576f, 123.387f, 106.912f
5592path.lineTo(SkBits2Float(0x42f591eb), SkBits2Float(0x42d4e76d)); // 122.785f, 106.452f
5593path.lineTo(SkBits2Float(0x42f6c6e0), SkBits2Float(0x42d5d261)); // 123.388f, 106.911f
5594path.quadTo(SkBits2Float(0x42f6bb33), SkBits2Float(0x42d5e1bb), SkBits2Float(0x42f6a3d8), SkBits2Float(0x42d6007c)); // 123.366f, 106.941f, 123.32f, 107.001f
5595path.quadTo(SkBits2Float(0x42ea3850), SkBits2Float(0x42e65af0), SkBits2Float(0x42d97a6e), SkBits2Float(0x42ed841c)); // 117.11f, 115.178f, 108.739f, 118.758f
5596path.lineTo(SkBits2Float(0x42d91d92), SkBits2Float(0x42ed9ec0)); // 108.558f, 118.81f
5597path.lineTo(SkBits2Float(0x42c1a959), SkBits2Float(0x42f146b0)); // 96.8308f, 120.638f
5598path.lineTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80f0)); // 95.9684f, 119.752f
5599path.lineTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80ef)); // 95.9684f, 119.752f
5600path.close();
5601path.moveTo(SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d68)); // 97.4596f, 120.026f
5602path.lineTo(SkBits2Float(0x42c16d91), SkBits2Float(0x42efc72c)); // 96.714f, 119.889f
5603path.lineTo(SkBits2Float(0x42c131c9), SkBits2Float(0x42ee47a8)); // 96.5972f, 119.14f
5604path.lineTo(SkBits2Float(0x42d8a602), SkBits2Float(0x42ea9fb8)); // 108.324f, 117.312f
5605path.lineTo(SkBits2Float(0x42d8e1ca), SkBits2Float(0x42ec1f3c)); // 108.441f, 118.061f
5606path.lineTo(SkBits2Float(0x42d84926), SkBits2Float(0x42eaba5c)); // 108.143f, 117.364f
5607path.quadTo(SkBits2Float(0x42e84a40), SkBits2Float(0x42e3e1f0), SkBits2Float(0x42f439a2), SkBits2Float(0x42d42af8)); // 116.145f, 113.941f, 122.113f, 106.084f
5608path.quadTo(SkBits2Float(0x42f45121), SkBits2Float(0x42d40c08), SkBits2Float(0x42f45cf6), SkBits2Float(0x42d3fc79)); // 122.158f, 106.023f, 122.182f, 105.993f
5609path.lineTo(SkBits2Float(0x42f45d7f), SkBits2Float(0x42d3fbc5)); // 122.183f, 105.992f
5610path.quadTo(SkBits2Float(0x42f69510), SkBits2Float(0x42d114f4), SkBits2Float(0x42f4ccce), SkBits2Float(0x42ce8fb7)); // 123.291f, 104.541f, 122.4f, 103.281f
5611path.lineTo(SkBits2Float(0x42f609ba), SkBits2Float(0x42cdaf9e)); // 123.019f, 102.843f
5612path.lineTo(SkBits2Float(0x42f62899), SkBits2Float(0x42cf3289)); // 123.079f, 103.599f
5613path.lineTo(SkBits2Float(0x42e294a1), SkBits2Float(0x42d0c268)); // 113.29f, 104.38f
5614path.lineTo(SkBits2Float(0x42e275c2), SkBits2Float(0x42cf3f7d)); // 113.23f, 103.624f
5615path.lineTo(SkBits2Float(0x42e2dc9c), SkBits2Float(0x42d0b5c3)); // 113.431f, 104.355f
5616path.quadTo(SkBits2Float(0x42d75bb8), SkBits2Float(0x42d3df08), SkBits2Float(0x42cfc853), SkBits2Float(0x42da7457)); // 107.679f, 105.936f, 103.891f, 109.227f
5617path.lineTo(SkBits2Float(0x42cec9ba), SkBits2Float(0x42d94f5c)); // 103.394f, 108.655f
5618path.lineTo(SkBits2Float(0x42cfc89f), SkBits2Float(0x42da7416)); // 103.892f, 109.227f
5619path.quadTo(SkBits2Float(0x42c53268), SkBits2Float(0x42e3ac00), SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d67)); // 98.5984f, 113.836f, 97.4596f, 120.026f
5620path.lineTo(SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d68)); // 97.4596f, 120.026f
5621path.close();
5622
5623 testSimplify(reporter, path, filename);
5624}
5625
caryclark54359292015-03-26 07:52:43 -07005626static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0;
caryclark34efb702016-10-24 08:19:06 -07005627static void (*firstTest)(skiatest::Reporter* , const char* filename) = testQuads69;
caryclark54359292015-03-26 07:52:43 -07005628static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005629
5630static TestDesc tests[] = {
caryclark34efb702016-10-24 08:19:06 -07005631 TEST(simplifyTest_1),
caryclark78a37a52016-10-20 12:36:16 -07005632 TEST(carsvg_1),
caryclarkb36a3cd2016-10-18 07:59:44 -07005633 TEST(tiger8_393),
caryclarke3a4e992016-09-28 09:22:17 -07005634 TEST(bug5169),
caryclark27c015d2016-09-23 05:47:20 -07005635 TEST(testQuads73),
caryclark55888e42016-07-18 10:01:36 -07005636 TEST(testQuads72),
5637 TEST(testQuads71),
5638 TEST(testQuads70),
5639 TEST(testQuads69),
5640 TEST(testQuads68),
5641 TEST(testQuads67),
5642 TEST(testQuads66),
5643 TEST(dean4),
caryclark2bec26a2016-05-26 09:01:47 -07005644 TEST(fuzz763_4713_b),
caryclark1c9ce612015-11-20 14:06:28 -08005645 TEST(fuzz_twister2),
caryclark26ad22a2015-10-16 09:03:38 -07005646 TEST(fuzz_twister),
caryclarkef2e4ac2015-09-23 18:07:51 -07005647 TEST(fuzz994s_3414),
5648 TEST(fuzz994s_11),
caryclarkbb134332015-07-28 05:12:19 -07005649 TEST(cr514118),
caryclarkd4349722015-07-23 12:40:22 -07005650 TEST(fuzz864a),
caryclark27c8eb82015-07-06 11:38:33 -07005651 TEST(testQuads65),
caryclark4e1a4c92015-05-18 12:56:57 -07005652 TEST(testIssue3838_3),
caryclarkfba9da72015-05-14 14:18:13 -07005653 TEST(testIssue3838),
caryclarkbca19f72015-05-13 08:23:48 -07005654 TEST(testArc),
caryclark624637c2015-05-11 07:21:27 -07005655 TEST(testTriangle2),
5656 TEST(testTriangle1),
caryclark1049f122015-04-20 08:31:59 -07005657 TEST(testQuads64),
5658 TEST(testQuads63),
5659 TEST(testQuads62),
5660 TEST(testRect4),
caryclark19eb3b22014-07-18 05:08:14 -07005661 TEST(testRect3),
caryclarkdac1d172014-06-17 05:15:38 -07005662 TEST(testQuadralateral10),
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00005663 TEST(testQuads61),
5664 TEST(testQuads60),
5665 TEST(testQuads59),
5666 TEST(testQuads58),
5667 TEST(testQuads57),
5668 TEST(testQuads56),
5669 TEST(testQuads54),
5670 TEST(testQuads53),
5671 TEST(testQuads52),
5672 TEST(testQuads51),
5673 TEST(testQuads50),
5674 TEST(testQuads49),
5675 TEST(testQuads48),
5676 TEST(testQuads47),
5677 TEST(testQuads46x),
5678 TEST(testQuads45),
5679 TEST(testQuads44),
5680 TEST(testQuads43),
5681 TEST(testQuads42),
5682 TEST(testQuads41),
5683 TEST(testQuads36),
5684 TEST(testQuads37),
5685 TEST(testQuads38),
5686 TEST(testQuads39),
5687 TEST(testQuads40),
5688 TEST(testQuads16),
5689 TEST(testQuads17),
5690 TEST(testQuads18),
5691 TEST(testQuads19),
5692 TEST(testQuads20),
5693 TEST(testQuads21),
5694 TEST(testQuads22),
5695 TEST(testQuads23),
5696 TEST(testQuads24),
5697 TEST(testQuads25),
5698 TEST(testQuads26),
5699 TEST(testQuads27),
5700 TEST(testQuads28),
5701 TEST(testQuads29),
5702 TEST(testQuads30),
5703 TEST(testQuads31),
5704 TEST(testQuads32),
5705 TEST(testQuads33),
5706 TEST(testQuads34),
5707 TEST(testQuads35),
5708 TEST(testDegenerates1),
5709 TEST(testQuad13),
5710 TEST(testQuad14),
5711 TEST(testQuad15),
5712 TEST(testQuadratic56),
5713 TEST(testQuadralateral4),
5714 TEST(testQuadralateral3),
5715 TEST(testDegenerate5),
5716 TEST(testQuad12),
caryclark54359292015-03-26 07:52:43 -07005717 TEST(testQuadratic51),
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00005718 TEST(testQuad8),
caryclark@google.com28d219c2013-11-25 13:39:12 +00005719 TEST(testQuad11),
commit-bot@chromium.org866f4e32013-11-21 17:04:29 +00005720 TEST(testQuad10),
5721 TEST(testQuad9),
caryclark@google.com7eaa53d2013-10-02 14:49:34 +00005722 TEST(testTriangles4x),
caryclark@google.com570863f2013-09-16 15:55:01 +00005723 TEST(testTriangles3x),
5724 TEST(testRect2),
5725 TEST(testRect1),
5726 TEST(tooCloseTest),
caryclark@google.com07e97fc2013-07-08 17:17:02 +00005727 TEST(skphealth_com76),
caryclark@google.comcffbcc32013-06-04 17:59:42 +00005728 TEST(testQuadLineIntersect1),
5729 TEST(testQuadLineIntersect2),
5730 TEST(testQuadLineIntersect3),
caryclark@google.coma5e55922013-05-07 18:51:31 +00005731 TEST(testQuad7),
5732 TEST(testQuad6),
5733 TEST(testQuad5),
5734 TEST(testQuad4),
5735 TEST(testQuad3),
5736 TEST(testQuad2),
caryclark@google.com66560ca2013-04-26 19:51:16 +00005737 TEST(testAddTCoincident2),
5738 TEST(testAddTCoincident1),
caryclark@google.com03610322013-04-18 15:58:21 +00005739 TEST(testTriangles2),
5740 TEST(testTriangles1),
caryclark@google.comad65a3e2013-04-15 19:13:59 +00005741 TEST(testQuadratic97),
5742 TEST(testQuadratic96),
5743 TEST(testQuadratic95),
5744 TEST(testQuadratic94),
caryclark@google.come942bc32013-04-10 18:53:01 +00005745 TEST(testQuadralateral2),
caryclark@google.coma5e55922013-05-07 18:51:31 +00005746 TEST(testQuad1),
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005747 TEST(testCubic2),
5748 TEST(testCubic1),
5749 TEST(testQuadralateral1),
5750 TEST(testLine85),
5751 TEST(testLine84),
5752 TEST(testLine84x),
5753 TEST(testLine83),
5754 TEST(testLine82h),
5755 TEST(testLine82g),
5756 TEST(testLine82f),
5757 TEST(testLine82e),
5758 TEST(testLine82d),
5759 TEST(testLine82c),
5760 TEST(testLine82b),
5761 TEST(testLine82a),
5762 TEST(testLine82),
5763 TEST(testQuadratic93),
5764 TEST(testQuadratic92x),
5765 TEST(testQuadratic91),
5766 TEST(testQuadratic90x),
5767 TEST(testQuadratic89x),
5768 TEST(testQuadratic88),
5769 TEST(testQuadratic87),
5770 TEST(testQuadratic86),
5771 TEST(testQuadratic85),
5772 TEST(testQuadratic84),
5773 TEST(testQuadratic83),
5774 TEST(testQuadratic82),
5775 TEST(testQuadratic81),
5776 TEST(testQuadratic80),
5777 TEST(testEight1),
5778 TEST(testEight2),
5779 TEST(testEight3),
5780 TEST(testEight4),
5781 TEST(testEight5),
5782 TEST(testEight6),
5783 TEST(testEight7),
5784 TEST(testEight8),
5785 TEST(testEight9),
5786 TEST(testEight10),
5787 TEST(testQuadratic79),
5788 TEST(testQuadratic78),
5789 TEST(testQuadratic77),
5790 TEST(testQuadratic76),
5791 TEST(testQuadratic75),
5792 TEST(testQuadratic74),
5793 TEST(testQuadratic73),
5794 TEST(testQuadratic72),
5795 TEST(testQuadratic71),
5796 TEST(testQuadratic70x),
5797 TEST(testQuadratic69),
5798 TEST(testQuadratic68),
5799 TEST(testQuadratic67x),
5800 TEST(testQuadratic65),
5801 TEST(testQuadratic64),
5802 TEST(testQuadratic63),
5803 TEST(testLine1a),
5804 TEST(testLine1ax),
5805 TEST(testQuadratic59),
5806 TEST(testQuadratic59x),
5807 TEST(testQuadratic58),
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005808 TEST(testQuadratic55),
5809 TEST(testQuadratic53),
caryclark@google.com818b0cc2013-04-08 11:50:46 +00005810 TEST(testQuadratic38),
5811 TEST(testQuadratic37),
5812 TEST(testQuadratic36),
5813 TEST(testQuadratic35),
5814 TEST(testQuadratic34),
5815 TEST(testQuadratic33),
5816 TEST(testQuadratic32),
5817 TEST(testQuadratic31),
5818 TEST(testQuadratic30),
5819 TEST(testQuadratic29),
5820 TEST(testQuadratic28),
5821 TEST(testQuadratic27),
5822 TEST(testQuadratic26),
5823 TEST(testQuadratic25),
5824 TEST(testQuadratic24),
5825 TEST(testQuadratic23),
5826 TEST(testQuadratic22),
5827 TEST(testQuadratic21),
5828 TEST(testQuadratic20),
5829 TEST(testQuadratic19),
5830 TEST(testQuadratic18),
5831 TEST(testQuadratic17x),
5832 TEST(testQuadratic15),
5833 TEST(testQuadratic14),
5834 TEST(testQuadratic9),
5835 TEST(testQuadratic8),
5836 TEST(testQuadratic7),
5837 TEST(testQuadratic6),
5838 TEST(testQuadratic5),
5839 TEST(testQuadratic4x),
5840 TEST(testQuadratic3x),
5841 TEST(testQuadratic2x),
5842 TEST(testQuadratic1x),
5843 TEST(testQuadratic4),
5844 TEST(testQuadratic3),
5845 TEST(testQuadratic2),
5846 TEST(testQuadratic1),
5847 TEST(testLine4ax),
5848 TEST(testLine3aax),
5849 TEST(testLine2ax),
5850 TEST(testLine1ax),
5851 TEST(testQuadralateral9x),
5852 TEST(testQuadralateral8x),
5853 TEST(testQuadralateral7x),
5854 TEST(testQuadralateral6x),
5855 TEST(testQuadralateral6ax),
5856 TEST(testQuadralateral9),
5857 TEST(testQuadralateral8),
5858 TEST(testQuadralateral7),
5859 TEST(testQuadralateral6),
5860 TEST(testQuadralateral6a),
5861 TEST(testFauxQuadralateral6dx),
5862 TEST(testFauxQuadralateral6cx),
5863 TEST(testFauxQuadralateral6bx),
5864 TEST(testFauxQuadralateral6ax),
5865 TEST(testFauxQuadralateral6x),
5866 TEST(testFauxQuadralateral6d),
5867 TEST(testFauxQuadralateral6c),
5868 TEST(testFauxQuadralateral6b),
5869 TEST(testFauxQuadralateral6a),
5870 TEST(testFauxQuadralateral6),
5871 TEST(testQuadralateral5x),
5872 TEST(testQuadralateral5),
5873 TEST(testNondegenerate4x),
5874 TEST(testNondegenerate3x),
5875 TEST(testNondegenerate2x),
5876 TEST(testNondegenerate1x),
5877 TEST(testNondegenerate4),
5878 TEST(testNondegenerate3),
5879 TEST(testNondegenerate2),
5880 TEST(testNondegenerate1),
5881 TEST(testDegenerate4x),
5882 TEST(testDegenerate3x),
5883 TEST(testDegenerate2x),
5884 TEST(testDegenerate1x),
5885 TEST(testDegenerate4),
5886 TEST(testDegenerate3),
5887 TEST(testDegenerate2),
5888 TEST(testDegenerate1),
5889 TEST(testLine79x),
5890 TEST(testLine78x),
5891 TEST(testLine77x),
5892 TEST(testLine76x),
5893 TEST(testLine75x),
5894 TEST(testLine74x),
5895 TEST(testLine73x),
5896 TEST(testLine72x),
5897 TEST(testLine71x),
5898 TEST(testLine70x),
5899 TEST(testLine69x),
5900 TEST(testLine68hx),
5901 TEST(testLine68gx),
5902 TEST(testLine68fx),
5903 TEST(testLine68ex),
5904 TEST(testLine68dx),
5905 TEST(testLine68cx),
5906 TEST(testLine68bx),
5907 TEST(testLine68ax),
5908 TEST(testLine67x),
5909 TEST(testLine66x),
5910 TEST(testLine65x),
5911 TEST(testLine64x),
5912 TEST(testLine63x),
5913 TEST(testLine62x),
5914 TEST(testLine61x),
5915 TEST(testLine60x),
5916 TEST(testLine59x),
5917 TEST(testLine58x),
5918 TEST(testLine57x),
5919 TEST(testLine56x),
5920 TEST(testLine55x),
5921 TEST(testLine54x),
5922 TEST(testLine53x),
5923 TEST(testLine52x),
5924 TEST(testLine51x),
5925 TEST(testLine50x),
5926 TEST(testLine49x),
5927 TEST(testLine48x),
5928 TEST(testLine47x),
5929 TEST(testLine46x),
5930 TEST(testLine45x),
5931 TEST(testLine44x),
5932 TEST(testLine43x),
5933 TEST(testLine42x),
5934 TEST(testLine41x),
5935 TEST(testLine40x),
5936 TEST(testLine38x),
5937 TEST(testLine37x),
5938 TEST(testLine36x),
5939 TEST(testLine35x),
5940 TEST(testLine34x),
5941 TEST(testLine33x),
5942 TEST(testLine32x),
5943 TEST(testLine31x),
5944 TEST(testLine30x),
5945 TEST(testLine29x),
5946 TEST(testLine28x),
5947 TEST(testLine27x),
5948 TEST(testLine26x),
5949 TEST(testLine25x),
5950 TEST(testLine24ax),
5951 TEST(testLine24x),
5952 TEST(testLine23x),
5953 TEST(testLine22x),
5954 TEST(testLine21x),
5955 TEST(testLine20x),
5956 TEST(testLine19x),
5957 TEST(testLine18x),
5958 TEST(testLine17x),
5959 TEST(testLine16x),
5960 TEST(testLine15x),
5961 TEST(testLine14x),
5962 TEST(testLine13x),
5963 TEST(testLine12x),
5964 TEST(testLine11x),
5965 TEST(testLine10ax),
5966 TEST(testLine10x),
5967 TEST(testLine9x),
5968 TEST(testLine8x),
5969 TEST(testLine7bx),
5970 TEST(testLine7ax),
5971 TEST(testLine7x),
5972 TEST(testLine6x),
5973 TEST(testLine5x),
5974 TEST(testLine4x),
5975 TEST(testLine3bx),
5976 TEST(testLine3ax),
5977 TEST(testLine3x),
5978 TEST(testLine2x),
5979 TEST(testLine1x),
5980 TEST(testLine81),
5981 TEST(testLine80),
5982 TEST(testLine79),
5983 TEST(testLine78),
5984 TEST(testLine77),
5985 TEST(testLine76),
5986 TEST(testLine75),
5987 TEST(testLine74),
5988 TEST(testLine73),
5989 TEST(testLine72),
5990 TEST(testLine71),
5991 TEST(testLine70),
5992 TEST(testLine69),
5993 TEST(testLine68h),
5994 TEST(testLine68g),
5995 TEST(testLine68f),
5996 TEST(testLine68e),
5997 TEST(testLine68d),
5998 TEST(testLine68c),
5999 TEST(testLine68b),
6000 TEST(testLine68a),
6001 TEST(testLine67),
6002 TEST(testLine66),
6003 TEST(testLine65),
6004 TEST(testLine64),
6005 TEST(testLine63),
6006 TEST(testLine62),
6007 TEST(testLine61),
6008 TEST(testLine60),
6009 TEST(testLine59),
6010 TEST(testLine58),
6011 TEST(testLine57),
6012 TEST(testLine56),
6013 TEST(testLine55),
6014 TEST(testLine54),
6015 TEST(testLine53),
6016 TEST(testLine52),
6017 TEST(testLine51),
6018 TEST(testLine50),
6019 TEST(testLine49),
6020 TEST(testLine48),
6021 TEST(testLine47),
6022 TEST(testLine46),
6023 TEST(testLine45),
6024 TEST(testLine44),
6025 TEST(testLine43),
6026 TEST(testLine42),
6027 TEST(testLine41),
6028 TEST(testLine40),
6029 TEST(testLine38),
6030 TEST(testLine37),
6031 TEST(testLine36),
6032 TEST(testLine35),
6033 TEST(testLine34),
6034 TEST(testLine33),
6035 TEST(testLine32),
6036 TEST(testLine31),
6037 TEST(testLine30),
6038 TEST(testLine29),
6039 TEST(testLine28),
6040 TEST(testLine27),
6041 TEST(testLine26),
6042 TEST(testLine25),
6043 TEST(testLine24a),
6044 TEST(testLine24),
6045 TEST(testLine23),
6046 TEST(testLine22),
6047 TEST(testLine21),
6048 TEST(testLine20),
6049 TEST(testLine19),
6050 TEST(testLine18),
6051 TEST(testLine17),
6052 TEST(testLine16),
6053 TEST(testLine15),
6054 TEST(testLine14),
6055 TEST(testLine13),
6056 TEST(testLine12),
6057 TEST(testLine11),
6058 TEST(testLine10a),
6059 TEST(testLine10),
6060 TEST(testLine9),
6061 TEST(testLine8),
6062 TEST(testLine7b),
6063 TEST(testLine7a),
6064 TEST(testLine7),
6065 TEST(testLine6),
6066 TEST(testLine5),
6067 TEST(testLine4),
6068 TEST(testLine3b),
6069 TEST(testLine3a),
6070 TEST(testLine3),
6071 TEST(testLine2),
6072 TEST(testLine1),
6073};
6074
caryclark@google.comad65a3e2013-04-15 19:13:59 +00006075static const size_t testCount = SK_ARRAY_COUNT(tests);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00006076
6077static TestDesc subTests[] = {
caryclarkef2e4ac2015-09-23 18:07:51 -07006078 TEST(fuzz994s_3414),
6079 TEST(fuzz994s_11),
caryclark@google.com818b0cc2013-04-08 11:50:46 +00006080};
6081
caryclark@google.comad65a3e2013-04-15 19:13:59 +00006082static const size_t subTestCount = SK_ARRAY_COUNT(subTests);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00006083
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00006084static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00006085
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00006086static bool runSubTests = false;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00006087static bool runSubTestsFirst = false;
caryclark@google.com4fdbb222013-07-23 15:27:41 +00006088static bool runReverse = false;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00006089
tfarina@chromium.org78e7b4e2014-01-02 21:45:03 +00006090DEF_TEST(PathOpsSimplify, reporter) {
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00006091 if (runSubTests && runSubTestsFirst) {
halcanary96fcdcc2015-08-27 07:41:13 -07006092 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00006093 }
caryclark54359292015-03-26 07:52:43 -07006094 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runReverse);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +00006095 if (runSubTests && !runSubTestsFirst) {
halcanary96fcdcc2015-08-27 07:41:13 -07006096 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00006097 }
caryclark@google.com818b0cc2013-04-08 11:50:46 +00006098}