Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: tests/PathOpsOpTest.cpp

Issue 23542056: path ops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: verbose + mutex around file number access Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/PathOpsLineIntersectionTest.cpp ('k') | tests/PathOpsQuadIntersectionTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "PathOpsExtendedTest.h" 7 #include "PathOpsExtendedTest.h"
8 8
9 #define TEST(name) { name, #name } 9 #define TEST(name) { name, #name }
10 10
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 path.moveTo(0,1); 705 path.moveTo(0,1);
706 path.cubicTo(2,6, 6,1, 4,3); 706 path.cubicTo(2,6, 6,1, 4,3);
707 path.close(); 707 path.close();
708 pathB.setFillType(SkPath::kWinding_FillType); 708 pathB.setFillType(SkPath::kWinding_FillType);
709 pathB.moveTo(1,6); 709 pathB.moveTo(1,6);
710 pathB.cubicTo(3,4, 1,0, 6,2); 710 pathB.cubicTo(3,4, 1,0, 6,2);
711 pathB.close(); 711 pathB.close();
712 testPathOp(reporter, path, pathB, kDifference_PathOp); 712 testPathOp(reporter, path, pathB, kDifference_PathOp);
713 } 713 }
714 714
715 #if 1
716 // this fails to detect a cubic/cubic intersection 715 // this fails to detect a cubic/cubic intersection
717 // the slight overlap is missed when the cubics are approximated by quadratics 716 // the slight overlap is missed when the cubics are approximated by quadratics
718 // and the subsequent line/cubic intersection also (correctly) misses the inters ection 717 // and the subsequent line/cubic intersection also (correctly) misses the inters ection
719 // if the line/cubic was a matching line/approx.quadratic then the missing inter section 718 // if the line/cubic was a matching line/approx.quadratic then the missing inter section
720 // could have been detected 719 // could have been detected
721 static void cubicOp38d(skiatest::Reporter* reporter) { 720 static void cubicOp38d(skiatest::Reporter* reporter) {
722 SkPath path, pathB; 721 SkPath path, pathB;
723 path.setFillType(SkPath::kWinding_FillType); 722 path.setFillType(SkPath::kWinding_FillType);
724 path.moveTo(0,1); 723 path.moveTo(0,1);
725 path.cubicTo(0,6, 3,2, 4,1); 724 path.cubicTo(0,6, 3,2, 4,1);
726 path.close(); 725 path.close();
727 pathB.setFillType(SkPath::kWinding_FillType); 726 pathB.setFillType(SkPath::kWinding_FillType);
728 pathB.moveTo(2,3); 727 pathB.moveTo(2,3);
729 pathB.cubicTo(1,4, 1,0, 6,0); 728 pathB.cubicTo(1,4, 1,0, 6,0);
730 pathB.close(); 729 pathB.close();
731 testPathOp(reporter, path, pathB, kDifference_PathOp); 730 testPathOp(reporter, path, pathB, kDifference_PathOp);
732 } 731 }
733 #endif
734 732
735 static void cubicOp39d(skiatest::Reporter* reporter) { 733 static void cubicOp39d(skiatest::Reporter* reporter) {
736 SkPath path, pathB; 734 SkPath path, pathB;
737 path.setFillType(SkPath::kWinding_FillType); 735 path.setFillType(SkPath::kWinding_FillType);
738 path.moveTo(0,1); 736 path.moveTo(0,1);
739 path.cubicTo(2,3, 5,1, 4,3); 737 path.cubicTo(2,3, 5,1, 4,3);
740 path.close(); 738 path.close();
741 pathB.setFillType(SkPath::kWinding_FillType); 739 pathB.setFillType(SkPath::kWinding_FillType);
742 pathB.moveTo(1,5); 740 pathB.moveTo(1,5);
743 pathB.cubicTo(3,4, 1,0, 3,2); 741 pathB.cubicTo(3,4, 1,0, 3,2);
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 pathB.cubicTo(263, 286.761414f, 260.761414f, 289, 258, 289); 1825 pathB.cubicTo(263, 286.761414f, 260.761414f, 289, 258, 289);
1828 pathB.lineTo(96, 289); 1826 pathB.lineTo(96, 289);
1829 pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284); 1827 pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284);
1830 pathB.lineTo(91, 127); 1828 pathB.lineTo(91, 127);
1831 pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122); 1829 pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122);
1832 pathB.lineTo(258, 122); 1830 pathB.lineTo(258, 122);
1833 pathB.close(); 1831 pathB.close();
1834 testPathOp(reporter, path, pathB, kIntersect_PathOp); 1832 testPathOp(reporter, path, pathB, kIntersect_PathOp);
1835 } 1833 }
1836 1834
1837 #if 01 1835 #define ISSUE_1417_WORKING_ON_LINUX_32 0
1836 #if ISSUE_1417_WORKING_ON_LINUX_32
1838 static void issue1417(skiatest::Reporter* reporter) { 1837 static void issue1417(skiatest::Reporter* reporter) {
1839 SkPath path1; 1838 SkPath path1;
1840 path1.moveTo(122.58908843994140625f, 82.2836456298828125f); 1839 path1.moveTo(122.58908843994140625f, 82.2836456298828125f);
1841 path1.quadTo(129.8215789794921875f, 80, 138, 80); 1840 path1.quadTo(129.8215789794921875f, 80, 138, 80);
1842 path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f ); 1841 path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f );
1843 path1.lineTo(161.1764678955078125f, 100); 1842 path1.lineTo(161.1764678955078125f, 100);
1844 path1.lineTo(161.1764678955078125f, 100); 1843 path1.lineTo(161.1764678955078125f, 100);
1845 path1.lineTo(115.29412078857421875f, 100); 1844 path1.lineTo(115.29412078857421875f, 100);
1846 path1.lineTo(115.29412078857421875f, 100); 1845 path1.lineTo(115.29412078857421875f, 100);
1847 path1.lineTo(122.58908843994140625f, 82.2836456298828125f); 1846 path1.lineTo(122.58908843994140625f, 82.2836456298828125f);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 pathB.lineTo(1, 3); 2058 pathB.lineTo(1, 3);
2060 pathB.close(); 2059 pathB.close();
2061 pathB.moveTo(2, 2); 2060 pathB.moveTo(2, 2);
2062 pathB.lineTo(3, 2); 2061 pathB.lineTo(3, 2);
2063 pathB.lineTo(3, 3); 2062 pathB.lineTo(3, 3);
2064 pathB.lineTo(2, 3); 2063 pathB.lineTo(2, 3);
2065 pathB.close(); 2064 pathB.close();
2066 testPathOp(reporter, path, pathB, kXOR_PathOp); 2065 testPathOp(reporter, path, pathB, kXOR_PathOp);
2067 } 2066 }
2068 2067
2069 #if 0 2068 #define ISSUE_1435_WORKING 0
2069 #if ISSUE_1435_WORKING
2070 static void issue1435(skiatest::Reporter* reporter) { 2070 static void issue1435(skiatest::Reporter* reporter) {
2071 SkPath path1; 2071 SkPath path1;
2072 path1.moveTo(160, 60); 2072 path1.moveTo(160, 60);
2073 path1.lineTo(220, 230); 2073 path1.lineTo(220, 230);
2074 path1.lineTo(60, 120); 2074 path1.lineTo(60, 120);
2075 path1.lineTo(260, 120); 2075 path1.lineTo(260, 120);
2076 path1.lineTo(90, 230); 2076 path1.lineTo(90, 230);
2077 path1.lineTo(160, 60); 2077 path1.lineTo(160, 60);
2078 path1.close(); 2078 path1.close();
2079 path1.setFillType(SkPath::kEvenOdd_FillType); 2079 path1.setFillType(SkPath::kEvenOdd_FillType);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 path2.quadTo(208, 151.888062f, 208, 150); 2113 path2.quadTo(208, 151.888062f, 208, 150);
2114 path2.quadTo(208, 132.942657f, 198.066238f, 120); 2114 path2.quadTo(208, 132.942657f, 198.066238f, 120);
2115 path2.lineTo(181.176468f, 120); 2115 path2.lineTo(181.176468f, 120);
2116 path2.lineTo(195.830978f, 161.521133f); 2116 path2.lineTo(195.830978f, 161.521133f);
2117 path2.close(); 2117 path2.close();
2118 path2.setFillType(SkPath::kEvenOdd_FillType); 2118 path2.setFillType(SkPath::kEvenOdd_FillType);
2119 testPathOp(reporter, path1, path2, kIntersect_PathOp); 2119 testPathOp(reporter, path1, path2, kIntersect_PathOp);
2120 } 2120 }
2121 #endif 2121 #endif
2122 2122
2123 #if 0
2124 static void bufferOverflow(skiatest::Reporter* reporter) { 2123 static void bufferOverflow(skiatest::Reporter* reporter) {
2125 SkPath path; 2124 SkPath path;
2126 path.addRect(0,0, 300,170141183460469231731687303715884105728.); 2125 path.addRect(0,0, 300,170141183460469231731687303715884105728.);
2127 SkPath pathB; 2126 SkPath pathB;
2128 pathB.addRect(0,0, 300,16); 2127 pathB.addRect(0,0, 300,16);
2129 testPathOp(reporter, path, pathB, kUnion_PathOp); 2128 testPathOp(reporter, path, pathB, kUnion_PathOp);
2130 } 2129 }
2131 #endif
2132 2130
2133 #if 0
2134 static void skpkkiste_to716(skiatest::Reporter* reporter) { 2131 static void skpkkiste_to716(skiatest::Reporter* reporter) {
2135 SkPath path; 2132 SkPath path;
2136 path.setFillType(SkPath::kEvenOdd_FillType); 2133 path.setFillType(SkPath::kEvenOdd_FillType);
2137 path.moveTo(1173, 284); 2134 path.moveTo(1173, 284);
2138 path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f) ; 2135 path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f) ;
2139 path.lineTo(1174, 123.999496f); 2136 path.lineTo(1174, 123.999496f);
2140 path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127); 2137 path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127);
2141 path.lineTo(1173, 284); 2138 path.lineTo(1173, 284);
2142 path.close(); 2139 path.close();
2143 SkPath pathB; 2140 SkPath pathB;
2144 pathB.setFillType(SkPath::kWinding_FillType); 2141 pathB.setFillType(SkPath::kWinding_FillType);
2145 pathB.moveTo(1340, 122); 2142 pathB.moveTo(1340, 122);
2146 pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127); 2143 pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127);
2147 pathB.lineTo(1345, 284); 2144 pathB.lineTo(1345, 284);
2148 pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289); 2145 pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289);
2149 pathB.lineTo(1178, 289); 2146 pathB.lineTo(1178, 289);
2150 pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284); 2147 pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284);
2151 pathB.lineTo(1173, 127); 2148 pathB.lineTo(1173, 127);
2152 pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122); 2149 pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122);
2153 pathB.lineTo(1340, 122); 2150 pathB.lineTo(1340, 122);
2154 pathB.close(); 2151 pathB.close();
2155 testPathOp(reporter, path, pathB, kIntersect_PathOp); 2152 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2156 } 2153 }
2157 #endif
2158 2154
2159 static void loopEdge1(skiatest::Reporter* reporter) { 2155 static void loopEdge1(skiatest::Reporter* reporter) {
2160 SkPath path; 2156 SkPath path;
2161 path.setFillType(SkPath::kEvenOdd_FillType); 2157 path.setFillType(SkPath::kEvenOdd_FillType);
2162 path.moveTo(0,0); 2158 path.moveTo(0,0);
2163 path.lineTo(3,0); 2159 path.lineTo(3,0);
2164 path.lineTo(3,2); 2160 path.lineTo(3,2);
2165 path.lineTo(1,2); 2161 path.lineTo(1,2);
2166 path.lineTo(1,1); 2162 path.lineTo(1,1);
2167 path.lineTo(2,1); 2163 path.lineTo(2,1);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 path.setFillType(SkPath::kWinding_FillType); 2266 path.setFillType(SkPath::kWinding_FillType);
2271 path.moveTo(1, 6); 2267 path.moveTo(1, 6);
2272 path.cubicTo(0, 3, 6, 3, 5, 0); 2268 path.cubicTo(0, 3, 6, 3, 5, 0);
2273 path.close(); 2269 path.close();
2274 pathB.setFillType(SkPath::kWinding_FillType); 2270 pathB.setFillType(SkPath::kWinding_FillType);
2275 pathB.moveTo(3, 6); 2271 pathB.moveTo(3, 6);
2276 pathB.cubicTo(0, 5, 6, 1, 3, 0); 2272 pathB.cubicTo(0, 5, 6, 1, 3, 0);
2277 pathB.close(); 2273 pathB.close();
2278 testPathOp(reporter, path, pathB, kUnion_PathOp); 2274 testPathOp(reporter, path, pathB, kUnion_PathOp);
2279 } 2275 }
2276
2277 static void skpaaalgarve_org53(skiatest::Reporter* reporter) { // add t cancel
2278 SkPath path;
2279 path.setFillType(SkPath::kEvenOdd_FillType);
2280 path.moveTo(-1.24344979e-014f, 348);
2281 path.lineTo(258, 348);
2282 path.lineTo(258, 322);
2283 path.quadTo(258, 317.857849f, 255.072006f, 314.928009f);
2284 path.quadTo(252.142136f, 312, 248, 312);
2285 path.lineTo(1.77635684e-015f, 312);
2286 path.lineTo(-1.24344979e-014f, 348);
2287 path.close();
2288 SkPath pathB;
2289 pathB.setFillType(SkPath::kWinding_FillType);
2290 pathB.moveTo(0, 312);
2291 pathB.lineTo(258, 312);
2292 pathB.lineTo(258, 348);
2293 pathB.lineTo(0, 348);
2294 pathB.close();
2295 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2296 }
2297
2298 static void skpabcspark_ca103(skiatest::Reporter* reporter) { // add t cancel
2299 SkPath path;
2300 path.setFillType(SkPath::kEvenOdd_FillType);
2301 path.moveTo(1.99840144e-015f, 494);
2302 path.lineTo(97, 494);
2303 path.quadTo(100.313705f, 494, 102.6576f, 491.657593f);
2304 path.quadTo(105, 489.313721f, 105, 486);
2305 path.lineTo(105, 425);
2306 path.quadTo(105, 421.686279f, 102.6576f, 419.342407f);
2307 path.quadTo(100.313705f, 417, 97, 417);
2308 path.lineTo(2.22044605e-016f, 417);
2309 path.lineTo(1.99840144e-015f, 494);
2310 path.close();
2311 SkPath pathB;
2312 pathB.setFillType(SkPath::kWinding_FillType);
2313 pathB.moveTo(0, 417);
2314 pathB.lineTo(105, 417);
2315 pathB.lineTo(105, 494);
2316 pathB.lineTo(0, 494);
2317 pathB.close();
2318 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2319 }
2320
2321 static void skpacesoftech_com47(skiatest::Reporter* reporter) { // partial coin cidence
2322 SkPath path;
2323 path.setFillType(SkPath::kEvenOdd_FillType);
2324 path.moveTo(670.537415f, 285);
2325 path.lineTo(670.387451f, 285);
2326 path.lineTo(596.315186f, 314.850708f);
2327 path.lineTo(626.19696f, 389);
2328 path.lineTo(626.346863f, 389);
2329 path.lineTo(700.419189f, 359.149261f);
2330 path.lineTo(670.537415f, 285);
2331 path.close();
2332 SkPath pathB;
2333 pathB.setFillType(SkPath::kWinding_FillType);
2334 pathB.moveTo(663.318542f, 374.100616f);
2335 pathB.quadTo(647.950989f, 380.293671f, 632.705322f, 373.806305f);
2336 pathB.quadTo(617.459595f, 367.318909f, 611.266541f, 351.951355f);
2337 pathB.quadTo(605.073486f, 336.58374f, 611.560913f, 321.338074f);
2338 pathB.quadTo(618.048279f, 306.092407f, 633.415833f, 299.899353f);
2339 pathB.quadTo(648.783447f, 293.706299f, 664.029114f, 300.193665f);
2340 pathB.quadTo(679.27478f, 306.68103f, 685.467834f, 322.048645f);
2341 pathB.quadTo(691.660889f, 337.416199f, 685.173523f, 352.661896f);
2342 pathB.quadTo(678.686157f, 367.907562f, 663.318542f, 374.100616f);
2343 pathB.close();
2344 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2345 }
2346
2347 static void skpact_com43(skiatest::Reporter* reporter) { // bridge op
2348 SkPath path;
2349 path.setFillType(SkPath::kEvenOdd_FillType);
2350 path.moveTo(1.45716772e-016f, 924.336121f);
2351 path.lineTo(-1.11022302e-016f, 920);
2352 path.lineTo(6, 920);
2353 path.lineTo(6, 926);
2354 path.lineTo(1.66389287f, 926);
2355 path.quadTo(1.18842196f, 925.674561f, 0.756800175f, 925.243225f);
2356 path.quadTo(0.325406998f, 924.811523f, 1.45716772e-016f, 924.336121f);
2357 path.close();
2358 path.moveTo(1, 921);
2359 path.lineTo(5, 921);
2360 path.lineTo(5, 925);
2361 path.cubicTo(2.79086018f, 925, 1, 923.209167f, 1, 921);
2362 path.close();
2363 SkPath pathB;
2364 pathB.setFillType(SkPath::kWinding_FillType);
2365 pathB.moveTo(-1, 920);
2366 pathB.lineTo(0, 920);
2367 pathB.lineTo(3, 927);
2368 pathB.lineTo(-1, 927);
2369 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2370 }
2371
2372 static void skpadbox_lt8(skiatest::Reporter* reporter) { // zero span
2373 SkPath path;
2374 path.setFillType(SkPath::kEvenOdd_FillType);
2375 path.moveTo(320.097229f, 628.573669f);
2376 path.lineTo(610.227173f, 85.7786865f);
2377 path.lineTo(946.652588f, 265.601807f);
2378 path.lineTo(656.522644f, 808.39679f);
2379 path.lineTo(320.097229f, 628.573669f);
2380 path.close();
2381 SkPath pathB;
2382 pathB.setFillType(SkPath::kInverseWinding_FillType);
2383 pathB.moveTo(333.866608f, 623.496155f);
2384 pathB.lineTo(613.368042f, 100.585754f);
2385 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395 f, 100.085449f);
2386 pathB.lineTo(932.633057f, 269.854553f);
2387 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301 f, 271.503906f);
2388 pathB.lineTo(653.631897f, 794.414307f);
2389 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544 f, 794.914612f);
2390 pathB.lineTo(334.366943f, 625.145508f);
2391 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608 f, 623.496155f);
2392 pathB.close();
2393 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2394 }
2395
2396 static void skpadindex_de4(skiatest::Reporter* reporter) { // find chase op
2397 SkPath path;
2398 path.setFillType(SkPath::kEvenOdd_FillType);
2399 path.moveTo(0, 926);
2400 path.lineTo(0, 0);
2401 path.lineTo(1280, 0);
2402 path.lineTo(1280, 926);
2403 path.lineTo(0, 926);
2404 path.close();
2405 SkPath pathB;
2406 pathB.setFillType(SkPath::kWinding_FillType);
2407 pathB.moveTo(0, 312);
2408 pathB.lineTo(8.20486257e-015f, 178);
2409 pathB.lineTo(49, 178);
2410 pathB.lineTo(49, 312);
2411 pathB.close();
2412 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2413 }
2414
2415 static void skpadithya_putr4_blogspot_com551(skiatest::Reporter* reporter) { // calc common
2416 SkPath path;
2417 path.setFillType(SkPath::kEvenOdd_FillType);
2418 path.moveTo(205.605804f, 142.334625f);
2419 path.lineTo(254.665359f, 85.6058044f);
2420 path.lineTo(311.394196f, 134.665359f);
2421 path.lineTo(262.334625f, 191.39418f);
2422 path.lineTo(205.605804f, 142.334625f);
2423 path.close();
2424 SkPath pathB;
2425 pathB.setFillType(SkPath::kWinding_FillType);
2426 pathB.moveTo(283.407959f, 110.462646f);
2427 pathB.cubicTo(298.864319f, 123.829437f, 300.558258f, 147.195221f, 287.191467 f, 162.651581f);
2428 pathB.lineTo(286.537354f, 163.407959f);
2429 pathB.cubicTo(273.170563f, 178.864334f, 249.804779f, 180.558258f, 234.348419 f, 167.191467f);
2430 pathB.lineTo(233.592026f, 166.537338f);
2431 pathB.cubicTo(218.135666f, 153.170547f, 216.441727f, 129.804779f, 229.808517 f, 114.348412f);
2432 pathB.lineTo(230.462646f, 113.592026f);
2433 pathB.cubicTo(243.829437f, 98.1356659f, 267.195221f, 96.4417267f, 282.651581 f, 109.808517f);
2434 pathB.lineTo(283.407959f, 110.462646f);
2435 pathB.close();
2436 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2437 }
2438
2439 static void skpadspert_de11(skiatest::Reporter* reporter) { // mark and chase w inding
2440 SkPath path;
2441 path.setFillType(SkPath::kEvenOdd_FillType);
2442 path.moveTo(-4.4408921e-016f, 682.5f);
2443 path.lineTo(30.5f, 682.5f);
2444 path.cubicTo(32.709137f, 682.5f, 34.5f, 680.709167f, 34.5f, 678.5f);
2445 path.lineTo(34.5f, 486.5f);
2446 path.cubicTo(34.5f, 484.290863f, 32.709137f, 482.5f, 30.5f, 482.5f);
2447 path.lineTo(0, 482.5f);
2448 path.lineTo(-4.4408921e-016f, 682.5f);
2449 path.close();
2450 SkPath pathB;
2451 pathB.setFillType(SkPath::kWinding_FillType);
2452 pathB.moveTo(0, 482);
2453 pathB.lineTo(35, 482);
2454 pathB.lineTo(35, 683);
2455 pathB.lineTo(0, 683);
2456 pathB.close();
2457 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2458 }
2459
2460 static void skpaiaigames_com870(skiatest::Reporter* reporter) { // cubic/cubic intersect
2461 SkPath path;
2462 path.setFillType(SkPath::kEvenOdd_FillType);
2463 path.moveTo(324.071075f, 845.071045f);
2464 path.cubicTo(324.405151f, 844.737f, 324.715668f, 844.379395f, 325, 844.00097 7f);
2465 path.lineTo(325, 842.127197f);
2466 path.cubicTo(324.571411f, 842.956238f, 324.017761f, 843.710144f, 323.363953f , 844.363953f);
2467 path.lineTo(324.071075f, 845.071045f);
2468 path.close();
2469 path.moveTo(323.363953f, 714.636047f);
2470 path.lineTo(324.071075f, 713.928955f);
2471 path.cubicTo(324.405151f, 714.263f, 324.715668f, 714.620605f, 325, 714.99902 3f);
2472 path.lineTo(325, 716.872803f);
2473 path.cubicTo(324.571411f, 716.043762f, 324.017761f, 715.289856f, 323.363953f , 714.636047f);
2474 path.close();
2475 SkPath pathB;
2476 pathB.setFillType(SkPath::kWinding_FillType);
2477 pathB.moveTo(317, 711);
2478 pathB.cubicTo(322.522858f, 711, 327, 715.477173f, 327, 721);
2479 pathB.lineTo(327, 838);
2480 pathB.cubicTo(327, 843.522827f, 322.522858f, 848, 317, 848);
2481 pathB.lineTo(155, 848);
2482 pathB.cubicTo(149.477158f, 848, 145, 843.522827f, 145, 838);
2483 pathB.lineTo(145, 721);
2484 pathB.cubicTo(145, 715.477173f, 149.477158f, 711, 155, 711);
2485 pathB.lineTo(317, 711);
2486 pathB.close();
2487 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2488 }
2489
2490 static void cubicOp92i(skiatest::Reporter* reporter) {
2491 SkPath path, pathB;
2492 path.setFillType(SkPath::kWinding_FillType);
2493 path.moveTo(0, 1);
2494 path.cubicTo(2, 6, 4, 1, 5, 4);
2495 path.close();
2496 pathB.setFillType(SkPath::kWinding_FillType);
2497 pathB.moveTo(1, 4);
2498 pathB.cubicTo(4, 5, 1, 0, 6, 2);
2499 pathB.close();
2500 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2501 }
2502
2503 static void cubicOp93d(skiatest::Reporter* reporter) {
2504 SkPath path, pathB;
2505 path.setFillType(SkPath::kWinding_FillType);
2506 path.moveTo(0, 1);
2507 path.cubicTo(1, 6, 4, 1, 4, 3);
2508 path.close();
2509 pathB.setFillType(SkPath::kWinding_FillType);
2510 pathB.moveTo(1, 4);
2511 pathB.cubicTo(3, 4, 1, 0, 6, 1);
2512 pathB.close();
2513 testPathOp(reporter, path, pathB, kDifference_PathOp);
2514 }
2515
2516 static void cubicOp94u(skiatest::Reporter* reporter) {
2517 SkPath path, pathB;
2518 path.setFillType(SkPath::kEvenOdd_FillType);
2519 path.moveTo(0, 3);
2520 path.cubicTo(2, 3, 5, 0, 5, 3);
2521 path.close();
2522 pathB.setFillType(SkPath::kEvenOdd_FillType);
2523 pathB.moveTo(0, 5);
2524 pathB.cubicTo(3, 5, 3, 0, 3, 2);
2525 pathB.close();
2526 testPathOp(reporter, path, pathB, kUnion_PathOp);
2527 }
2528
2529 static void skpadbox_lt15(skiatest::Reporter* reporter) {
2530 SkPath path;
2531 path.setFillType(SkPath::kEvenOdd_FillType);
2532 path.moveTo(333.292084f, 624.570984f);
2533 path.lineTo(614.229797f, 98.9735107f);
2534 path.lineTo(933.457764f, 269.604431f);
2535 path.lineTo(652.52002f, 795.201904f);
2536 path.lineTo(333.292084f, 624.570984f);
2537 path.close();
2538 SkPath pathB;
2539 pathB.setFillType(SkPath::kWinding_FillType);
2540 pathB.moveTo(613.368042f, 100.585754f);
2541 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395 f, 100.085449f);
2542 pathB.lineTo(932.633057f, 269.854553f);
2543 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301 f, 271.503906f);
2544 pathB.lineTo(653.631897f, 794.414307f);
2545 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544 f, 794.914612f);
2546 pathB.lineTo(334.366943f, 625.145508f);
2547 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608 f, 623.496155f);
2548 pathB.lineTo(613.368042f, 100.585754f);
2549 pathB.close();
2550 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2551 }
2552
2553 static void skpadoption_org196(skiatest::Reporter* reporter) {
2554 SkPath path;
2555 path.setFillType(SkPath::kEvenOdd_FillType);
2556 path.moveTo(802, 367);
2557 path.lineTo(802, 324);
2558 path.lineTo(956, 324);
2559 path.lineTo(956, 371);
2560 path.quadTo(956, 373.071075f, 954.536011f, 374.536011f);
2561 path.quadTo(953.071045f, 376, 951, 376);
2562 path.lineTo(811, 376);
2563 path.cubicTo(806.029419f, 376, 802, 371.970551f, 802, 367);
2564 path.close();
2565 SkPath pathB;
2566 pathB.setFillType(SkPath::kInverseWinding_FillType);
2567 pathB.moveTo(803, 326);
2568 pathB.lineTo(955, 326);
2569 pathB.lineTo(955, 370);
2570 pathB.cubicTo(955, 372.761414f, 952.761414f, 375, 950, 375);
2571 pathB.lineTo(808, 375);
2572 pathB.cubicTo(805.238586f, 375, 803, 372.761414f, 803, 370);
2573 pathB.lineTo(803, 326);
2574 pathB.close();
2575 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2576 }
2577
2578 static void skpadspert_net23(skiatest::Reporter* reporter) {
2579 SkPath path;
2580 path.setFillType(SkPath::kEvenOdd_FillType);
2581 path.moveTo(-2.220446e-018f, 483.5f);
2582 path.lineTo(0, 482.5f);
2583 path.lineTo(30.5f, 482.5f);
2584 path.cubicTo(32.709137f, 482.5f, 34.5f, 484.290863f, 34.5f, 486.5f);
2585 path.lineTo(34.5f, 678.5f);
2586 path.cubicTo(34.5f, 680.709167f, 32.709137f, 682.5f, 30.5f, 682.5f);
2587 path.lineTo(-4.4408921e-016f, 682.5f);
2588 path.lineTo(-4.41868766e-016f, 681.5f);
2589 path.lineTo(30.5f, 681.5f);
2590 path.cubicTo(32.1568565f, 681.5f, 33.5f, 680.15686f, 33.5f, 678.5f);
2591 path.lineTo(33.5f, 486.5f);
2592 path.cubicTo(33.5f, 484.84314f, 32.1568565f, 483.5f, 30.5f, 483.5f);
2593 path.lineTo(-2.220446e-018f, 483.5f);
2594 path.close();
2595 SkPath pathB;
2596 pathB.setFillType(SkPath::kWinding_FillType);
2597 pathB.moveTo(0, 482);
2598 pathB.lineTo(35, 482);
2599 pathB.lineTo(35, 683);
2600 pathB.lineTo(0, 683);
2601 pathB.close();
2602 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2603 }
2604
2605 static void skpadventistmission_org572(skiatest::Reporter* reporter) {
2606 SkPath path;
2607 path.setFillType(SkPath::kEvenOdd_FillType);
2608 path.moveTo(1182.00037f, 926);
2609 path.cubicTo(1181.08813f, 924.785583f, 1179.63586f, 924, 1178, 924);
2610 path.lineTo(938, 924);
2611 path.cubicTo(936.364197f, 924, 934.911865f, 924.785583f, 933.999634f, 926);
2612 path.lineTo(1182.00037f, 926);
2613 path.close();
2614 SkPath pathB;
2615 pathB.setFillType(SkPath::kWinding_FillType);
2616 pathB.moveTo(934, 924);
2617 pathB.lineTo(1182, 924);
2618 pathB.lineTo(1182, 926);
2619 pathB.lineTo(934, 926);
2620 pathB.close();
2621 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2622 }
2623
2624 static void skpagentxsites_com55(skiatest::Reporter* reporter) {
2625 SkPath path;
2626 path.setFillType(SkPath::kEvenOdd_FillType);
2627 path.moveTo(925, 27);
2628 path.cubicTo(924.447693f, 27, 924, 27.4477158f, 924, 28);
2629 path.lineTo(924, 55);
2630 path.cubicTo(924, 55.5522842f, 924.447693f, 56, 925, 56);
2631 path.lineTo(1103, 56);
2632 path.cubicTo(1103.55225f, 56, 1104, 55.5522842f, 1104, 55);
2633 path.lineTo(1104, 28);
2634 path.cubicTo(1104, 27.4477158f, 1103.55225f, 27, 1103, 27);
2635 path.lineTo(925, 27);
2636 path.close();
2637 SkPath pathB;
2638 pathB.setFillType(SkPath::kWinding_FillType);
2639 pathB.moveTo(1103, 27);
2640 pathB.cubicTo(1104.10461f, 27, 1105, 27.8954315f, 1105, 29);
2641 pathB.lineTo(1105, 54);
2642 pathB.cubicTo(1105, 55.1045685f, 1104.10461f, 56, 1103, 56);
2643 pathB.lineTo(926, 56);
2644 pathB.cubicTo(924.895447f, 56, 924, 55.1045685f, 924, 54);
2645 pathB.lineTo(924, 29);
2646 pathB.cubicTo(924, 27.8954315f, 924.895447f, 27, 926, 27);
2647 pathB.lineTo(1103, 27);
2648 pathB.close();
2649 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2650 }
2651
2652 static void skpbakosoft_com10(skiatest::Reporter* reporter) {
2653 SkPath path;
2654 path.setFillType(SkPath::kEvenOdd_FillType);
2655 path.moveTo(190, 170);
2656 path.cubicTo(178.9543f, 170, 170, 178.9543f, 170, 190);
2657 path.cubicTo(170, 201.0457f, 178.9543f, 210, 190, 210);
2658 path.lineTo(370, 210);
2659 path.cubicTo(381.045685f, 210, 390, 201.0457f, 390, 190);
2660 path.cubicTo(390, 178.9543f, 381.045685f, 170, 370, 170);
2661 path.lineTo(190, 170);
2662 path.close();
2663 SkPath pathB;
2664 pathB.setFillType(SkPath::kWinding_FillType);
2665 pathB.moveTo(210, 190);
2666 pathB.quadTo(210, 198.284271f, 204.142136f, 204.142136f);
2667 pathB.quadTo(198.284271f, 210, 190, 210);
2668 pathB.quadTo(181.715729f, 210, 175.857864f, 204.142136f);
2669 pathB.quadTo(170, 198.284271f, 170, 190);
2670 pathB.quadTo(170, 181.715729f, 175.857864f, 175.857864f);
2671 pathB.quadTo(181.715729f, 170, 190, 170);
2672 pathB.quadTo(198.284271f, 170, 204.142136f, 175.857864f);
2673 pathB.quadTo(210, 181.715729f, 210, 190);
2674 pathB.close();
2675 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2676 }
2677
2678 static void skpbambootheme_com12(skiatest::Reporter* reporter) {
2679 SkPath path;
2680 path.setFillType(SkPath::kEvenOdd_FillType);
2681 path.moveTo(47.8780937f, 58);
2682 path.lineTo(0, 58);
2683 path.lineTo(-8.65973959e-015f, 96.9914017f);
2684 path.quadTo(20.0654926f, 96.6451874f, 34.3553391f, 82.3553391f);
2685 path.quadTo(44.9466133f, 71.764061f, 47.8780937f, 58);
2686 path.close();
2687 SkPath pathB;
2688 pathB.setFillType(SkPath::kEvenOdd_FillType);
2689 pathB.moveTo(-1, -3);
2690 pathB.lineTo(-1, -3);
2691 pathB.cubicTo(26.6142502f, -3, 49, 19.3857498f, 49, 47);
2692 pathB.lineTo(49, 47);
2693 pathB.cubicTo(49, 74.6142502f, 26.6142502f, 97, -1, 97);
2694 pathB.lineTo(-1, 97);
2695 pathB.cubicTo(-28.6142502f, 97, -51, 74.6142502f, -51, 47);
2696 pathB.lineTo(-51, 47);
2697 pathB.cubicTo(-51, 19.3857498f, -28.6142502f, -3, -1, -3);
2698 pathB.close();
2699 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2700 }
2701
2702 static void skpakmmos_ru100(skiatest::Reporter* reporter) {
2703 SkPath path;
2704 path.setFillType(SkPath::kEvenOdd_FillType);
2705 path.moveTo(693.000488f, 926);
2706 path.cubicTo(692.164734f, 925.37207f, 691.125793f, 925, 690, 925);
2707 path.lineTo(578, 925);
2708 path.cubicTo(576.874207f, 925, 575.835266f, 925.37207f, 574.999512f, 926);
2709 path.lineTo(693.000488f, 926);
2710 path.close();
2711 SkPath pathB;
2712 pathB.setFillType(SkPath::kWinding_FillType);
2713 pathB.moveTo(575, 925);
2714 pathB.lineTo(693, 925);
2715 pathB.lineTo(693, 926);
2716 pathB.lineTo(575, 926);
2717 pathB.close();
2718 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2719 }
2720
2721 #define SKPS_WORKING 0
2722 #if SKPS_WORKING
2723 static void skpcarpetplanet_ru22(skiatest::Reporter* reporter) {
2724 SkPath path;
2725 path.setFillType(SkPath::kEvenOdd_FillType);
2726 path.moveTo(195, 785);
2727 path.cubicTo(124.307556f, 785, 67, 841.859863f, 67, 912);
2728 path.lineTo(67, 913);
2729 path.cubicTo(67, 917.388916f, 67.2243805f, 921.725769f, 67.662384f, 926);
2730 path.lineTo(322, 926);
2731 path.lineTo(322, 896.048035f);
2732 path.cubicTo(314.09201f, 833.437622f, 260.247131f, 785, 195, 785);
2733 path.close();
2734 SkPath pathB;
2735 pathB.setFillType(SkPath::kWinding_FillType);
2736 pathB.moveTo(195, 785);
2737 pathB.cubicTo(265.140167f, 785, 322, 842.307556f, 322, 913);
2738 pathB.cubicTo(322, 983.692444f, 265.140167f, 1041, 195, 1041);
2739 pathB.lineTo(194, 1041);
2740 pathB.cubicTo(123.85984f, 1041, 67, 983.692444f, 67, 913);
2741 pathB.cubicTo(67, 842.307556f, 123.85984f, 785, 194, 785);
2742 pathB.lineTo(195, 785);
2743 pathB.close();
2744 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2745 }
2746
2747 static void skpcarrot_is24(skiatest::Reporter* reporter) {
2748 SkPath path;
2749 path.setFillType(SkPath::kEvenOdd_FillType);
2750 path.moveTo(945, 597);
2751 path.quadTo(913.93396f, 597, 891.96698f, 618.96698f);
2752 path.quadTo(870, 640.93396f, 870, 672);
2753 path.quadTo(870, 703.06604f, 891.96698f, 725.03302f);
2754 path.quadTo(913.93396f, 747, 945, 747);
2755 path.quadTo(976.06604f, 747, 998.03302f, 725.03302f);
2756 path.quadTo(1020, 703.06604f, 1020, 672);
2757 path.quadTo(1020, 640.93396f, 998.03302f, 618.96698f);
2758 path.quadTo(976.06604f, 597, 945, 597);
2759 path.close();
2760 SkPath pathB;
2761 pathB.setFillType(SkPath::kWinding_FillType);
2762 pathB.moveTo(945.080994f, 597.161987f);
2763 pathB.cubicTo(903.659973f, 597.161987f, 870.080994f, 630.73999f, 870.080994f , 672.161987f);
2764 pathB.cubicTo(870.080994f, 676.096008f, 870.387024f, 679.957031f, 870.971008 f, 683.726013f);
2765 pathB.cubicTo(876.53302f, 719.656006f, 907.593994f, 747.161987f, 945.080994f , 747.161987f);
2766 pathB.cubicTo(982.567993f, 747.161987f, 1013.62903f, 719.656006f, 1019.19104 f, 683.726013f);
2767 pathB.cubicTo(1019.77502f, 679.955017f, 1020.08099f, 676.094971f, 1020.08099 f, 672.161987f);
2768 pathB.cubicTo(1020.08002f, 630.73999f, 986.502014f, 597.161987f, 945.080994f , 597.161987f);
2769 pathB.close();
2770 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2771 }
2772
2773 #endif
2774
2775 static void skpbangalorenest_com4(skiatest::Reporter* reporter) {
2776 SkPath path;
2777 path.setFillType(SkPath::kEvenOdd_FillType);
2778 path.moveTo(0, 926);
2779 path.lineTo(0, 0);
2780 path.lineTo(1265, 0);
2781 path.lineTo(1265, 926);
2782 path.lineTo(0, 926);
2783 path.close();
2784 SkPath pathB;
2785 pathB.setFillType(SkPath::kWinding_FillType);
2786 pathB.moveTo(0, 290);
2787 pathB.lineTo(-2.64514972e-014f, 146);
2788 pathB.lineTo(30, 146);
2789 pathB.lineTo(30, 290);
2790 pathB.close();
2791 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2792 }
2793
2794 static void skpbenzoteh_ru152(skiatest::Reporter* reporter) {
2795 SkPath path;
2796 path.setFillType(SkPath::kEvenOdd_FillType);
2797 path.moveTo(883, 23);
2798 path.lineTo(883, 0);
2799 path.lineTo(1122.5f, 0);
2800 path.lineTo(1122.5f, 25.2136822f);
2801 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f);
2802 path.quadTo(1120.07104f, 28, 1118, 28);
2803 path.lineTo(888, 28);
2804 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
2805 path.quadTo(883, 25.0710678f, 883, 23);
2806 path.close();
2807 SkPath pathB;
2808 pathB.setFillType(SkPath::kWinding_FillType);
2809 pathB.moveTo(883, 0);
2810 pathB.lineTo(1123, 0);
2811 pathB.lineTo(1123, 23);
2812 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f);
2813 pathB.quadTo(1120.07104f, 28, 1118, 28);
2814 pathB.lineTo(888, 28);
2815 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
2816 pathB.quadTo(883, 25.0710678f, 883, 23);
2817 pathB.close();
2818 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2819 }
2820
2821 static void skpbestred_ru37(skiatest::Reporter* reporter) {
2822 SkPath path;
2823 path.setFillType(SkPath::kEvenOdd_FillType);
2824 path.moveTo(883, 23);
2825 path.lineTo(883, 0);
2826 path.lineTo(1122.5f, 0);
2827 path.lineTo(1122.5f, 25.2136822f);
2828 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f);
2829 path.quadTo(1120.07104f, 28, 1118, 28);
2830 path.lineTo(888, 28);
2831 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
2832 path.quadTo(883, 25.0710678f, 883, 23);
2833 path.close();
2834 SkPath pathB;
2835 pathB.setFillType(SkPath::kWinding_FillType);
2836 pathB.moveTo(883, 0);
2837 pathB.lineTo(1123, 0);
2838 pathB.lineTo(1123, 23);
2839 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f);
2840 pathB.quadTo(1120.07104f, 28, 1118, 28);
2841 pathB.lineTo(888, 28);
2842 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
2843 pathB.quadTo(883, 25.0710678f, 883, 23);
2844 pathB.close();
2845 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2846 }
2847
2848 static void skpbingoentertainment_net189(skiatest::Reporter* reporter) {
2849 SkPath path;
2850 path.setFillType(SkPath::kEvenOdd_FillType);
2851 path.moveTo(896, 745.38678f);
2852 path.lineTo(896, 873.38678f);
2853 path.lineTo(922.567993f, 876.683716f);
2854 path.lineTo(922.567993f, 748.683716f);
2855 path.lineTo(896, 745.38678f);
2856 path.close();
2857 SkPath pathB;
2858 pathB.setFillType(SkPath::kWinding_FillType);
2859 pathB.moveTo(899.200928f, 745.783997f);
2860 pathB.cubicTo(897.119385f, 745.525696f, 895.432007f, 752.031982f, 895.432007 f, 760.316284f);
2861 pathB.lineTo(895.432007f, 858.316284f);
2862 pathB.cubicTo(895.432007f, 866.600586f, 897.119385f, 873.525696f, 899.200928 f, 873.783997f);
2863 pathB.lineTo(918.799133f, 876.216003f);
2864 pathB.cubicTo(920.880615f, 876.474304f, 922.567993f, 869.968018f, 922.567993 f, 861.683716f);
2865 pathB.lineTo(922.567993f, 763.683716f);
2866 pathB.cubicTo(922.567993f, 755.399414f, 920.880615f, 748.474304f, 918.799133 f, 748.216003f);
2867 pathB.lineTo(899.200928f, 745.783997f);
2868 pathB.close();
2869 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2870 }
2871
2872 static void skpcarrefour_ro62(skiatest::Reporter* reporter) {
2873 SkPath path;
2874 path.setFillType(SkPath::kEvenOdd_FillType);
2875 path.moveTo(1104, 453);
2876 path.lineTo(399, 453);
2877 path.lineTo(399, 657);
2878 path.cubicTo(399, 661.970581f, 403.029449f, 666, 408, 666);
2879 path.lineTo(1095, 666);
2880 path.cubicTo(1099.97058f, 666, 1104, 661.970581f, 1104, 657);
2881 path.lineTo(1104, 453);
2882 path.close();
2883 SkPath pathB;
2884 pathB.setFillType(SkPath::kInverseWinding_FillType);
2885 pathB.moveTo(400, 453);
2886 pathB.lineTo(1103, 453);
2887 pathB.lineTo(1103, 666);
2888 pathB.lineTo(406, 666);
2889 pathB.cubicTo(402.686279f, 666, 400, 663.313721f, 400, 660);
2890 pathB.lineTo(400, 453);
2891 pathB.close();
2892 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2893 }
2894
2895 static void skpcaffelavazzait_com_ua21(skiatest::Reporter* reporter) {
2896 SkPath path;
2897 path.setFillType(SkPath::kEvenOdd_FillType);
2898 path.moveTo(883, 23);
2899 path.lineTo(883, 0);
2900 path.lineTo(1122.5f, 0);
2901 path.lineTo(1122.5f, 25.2136822f);
2902 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f);
2903 path.quadTo(1120.07104f, 28, 1118, 28);
2904 path.lineTo(888, 28);
2905 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
2906 path.quadTo(883, 25.0710678f, 883, 23);
2907 path.close();
2908 SkPath pathB;
2909 pathB.setFillType(SkPath::kWinding_FillType);
2910 pathB.moveTo(883, 0);
2911 pathB.lineTo(1123, 0);
2912 pathB.lineTo(1123, 23);
2913 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f);
2914 pathB.quadTo(1120.07104f, 28, 1118, 28);
2915 pathB.lineTo(888, 28);
2916 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
2917 pathB.quadTo(883, 25.0710678f, 883, 23);
2918 pathB.close();
2919 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2920 }
2921
2922 static void skpcamcorder_kz21(skiatest::Reporter* reporter) {
2923 SkPath path;
2924 path.setFillType(SkPath::kEvenOdd_FillType);
2925 path.moveTo(883, 23);
2926 path.lineTo(883, 0);
2927 path.lineTo(1122.5f, 0);
2928 path.lineTo(1122.5f, 25.2136822f);
2929 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f);
2930 path.quadTo(1120.07104f, 28, 1118, 28);
2931 path.lineTo(888, 28);
2932 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
2933 path.quadTo(883, 25.0710678f, 883, 23);
2934 path.close();
2935 SkPath pathB;
2936 pathB.setFillType(SkPath::kWinding_FillType);
2937 pathB.moveTo(883, 0);
2938 pathB.lineTo(1123, 0);
2939 pathB.lineTo(1123, 23);
2940 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f);
2941 pathB.quadTo(1120.07104f, 28, 1118, 28);
2942 pathB.lineTo(888, 28);
2943 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
2944 pathB.quadTo(883, 25.0710678f, 883, 23);
2945 pathB.close();
2946 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2947 }
2948
2949 static void skpcavablar_net563(skiatest::Reporter* reporter) {
2950 SkPath path;
2951 path.setFillType(SkPath::kEvenOdd_FillType);
2952 path.moveTo(160.000488f, 918);
2953 path.cubicTo(159.164749f, 917.37207f, 158.125824f, 917, 157, 917);
2954 path.lineTo(94, 917);
2955 path.cubicTo(92.874176f, 917, 91.8352661f, 917.37207f, 90.9995193f, 918);
2956 path.lineTo(160.000488f, 918);
2957 path.close();
2958 SkPath pathB;
2959 pathB.setFillType(SkPath::kWinding_FillType);
2960 pathB.moveTo(91, 917);
2961 pathB.lineTo(160, 917);
2962 pathB.lineTo(160, 918);
2963 pathB.lineTo(91, 918);
2964 pathB.close();
2965 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2966 }
2967
2968 static void skpinsomnia_gr72(skiatest::Reporter* reporter) {
2969 SkPath path;
2970 path.setFillType(SkPath::kEvenOdd_FillType);
2971 path.moveTo(1138, 231);
2972 path.lineTo(1137, 243.625748f);
2973 path.lineTo(1137, 926);
2974 path.lineTo(1139, 926);
2975 path.lineTo(1139, 231);
2976 path.lineTo(1138, 231);
2977 path.close();
2978 SkPath pathB;
2979 pathB.setFillType(SkPath::kWinding_FillType);
2980 pathB.moveTo(1139, 231);
2981 pathB.lineTo(1138, 231);
2982 pathB.lineTo(633, 6101);
2983 pathB.lineTo(1139, 6607);
2984 testPathOp(reporter, path, pathB, kIntersect_PathOp);
2985 }
2986
2987 static void cubicOp95u(skiatest::Reporter* reporter) {
2988 SkPath path, pathB;
2989 path.setFillType(SkPath::kEvenOdd_FillType);
2990 path.moveTo(0, 2);
2991 path.cubicTo(2, 3, 5, 1, 3, 2);
2992 path.close();
2993 pathB.setFillType(SkPath::kEvenOdd_FillType);
2994 pathB.moveTo(1, 5);
2995 pathB.cubicTo(2, 3, 2, 0, 3, 2);
2996 pathB.close();
2997 testPathOp(reporter, path, pathB, kUnion_PathOp);
2998 }
2999
3000 static void cubicOp96d(skiatest::Reporter* reporter) {
3001 SkPath path, pathB;
3002 path.setFillType(SkPath::kEvenOdd_FillType);
3003 path.moveTo(1, 6);
3004 path.cubicTo(0, 3, 6, 3, 5, 0);
3005 path.close();
3006 pathB.setFillType(SkPath::kEvenOdd_FillType);
3007 pathB.moveTo(3, 6);
3008 pathB.cubicTo(0, 5, 6, 1, 3, 0);
3009 pathB.close();
3010 testPathOp(reporter, path, pathB, kDifference_PathOp);
3011 }
3012
2280 static void (*firstTest)(skiatest::Reporter* ) = 0; 3013 static void (*firstTest)(skiatest::Reporter* ) = 0;
2281 3014
2282 static struct TestDesc tests[] = { 3015 static struct TestDesc tests[] = {
2283 // TEST(skpkkiste_to716), 3016 #if ISSUE_1435_WORKING
2284 // TEST(bufferOverflow), 3017 TEST(issue1435),
2285 // TEST(issue1435), 3018 #endif
3019 #if SKPS_WORKING
3020 TEST(skpcarrot_is24),
3021 TEST(skpcarpetplanet_ru22), // cubic/cubic intersect detects unwanted coinc idence
3022 #endif
3023 #if ISSUE_1417_WORKING_ON_LINUX_32
3024 TEST(issue1417),
3025 #endif
3026 TEST(cubicOp96d),
3027 TEST(cubicOp95u),
3028 TEST(skpadbox_lt15),
3029 TEST(skpagentxsites_com55),
3030 TEST(skpadventistmission_org572),
3031 TEST(skpadspert_net23),
3032 TEST(skpadoption_org196),
3033 TEST(skpbambootheme_com12),
3034 TEST(skpbakosoft_com10),
3035 TEST(skpakmmos_ru100),
3036 TEST(skpbangalorenest_com4),
3037 TEST(skpbingoentertainment_net189),
3038 TEST(skpbestred_ru37),
3039 TEST(skpbenzoteh_ru152),
3040 TEST(skpcamcorder_kz21),
3041 TEST(skpcaffelavazzait_com_ua21),
3042 TEST(skpcarrefour_ro62),
3043 TEST(skpcavablar_net563),
3044 TEST(skpinsomnia_gr72),
3045 TEST(skpadbox_lt8),
3046 TEST(skpact_com43),
3047 TEST(skpacesoftech_com47),
3048 TEST(skpabcspark_ca103),
3049 TEST(cubicOp94u),
3050 TEST(cubicOp93d),
3051 TEST(cubicOp92i),
3052 TEST(skpadithya_putr4_blogspot_com551),
3053 TEST(skpadindex_de4),
3054 TEST(skpadspert_de11),
3055 TEST(skpaiaigames_com870),
3056 TEST(skpaaalgarve_org53),
3057 TEST(skpkkiste_to716),
3058 TEST(bufferOverflow),
2286 TEST(cubicOp91u), 3059 TEST(cubicOp91u),
2287 TEST(cubicOp90u), 3060 TEST(cubicOp90u),
2288 TEST(cubicOp89u), 3061 TEST(cubicOp89u),
2289 TEST(cubicOp88u), 3062 TEST(cubicOp88u),
2290 TEST(cubicOp87u), 3063 TEST(cubicOp87u),
2291 TEST(cubicOp86i), 3064 TEST(cubicOp86i),
2292 TEST(loopEdge2), 3065 TEST(loopEdge2),
2293 TEST(loopEdge1), 3066 TEST(loopEdge1),
2294 TEST(rectOp3x), 3067 TEST(rectOp3x),
2295 TEST(rectOp2i), 3068 TEST(rectOp2i),
2296 TEST(rectOp1i), 3069 TEST(rectOp1i),
2297 TEST(issue1418b), 3070 TEST(issue1418b),
2298 TEST(cubicOp85i), 3071 TEST(cubicOp85i),
2299 TEST(issue1417),
2300 TEST(issue1418), 3072 TEST(issue1418),
2301 TEST(skpkkiste_to98), 3073 TEST(skpkkiste_to98),
2302 TEST(skpahrefs_com29), 3074 TEST(skpahrefs_com29),
2303 TEST(cubicOp85d), 3075 TEST(cubicOp85d),
2304 TEST(skpahrefs_com88), 3076 TEST(skpahrefs_com88),
2305 TEST(skphealth_com76), 3077 TEST(skphealth_com76),
2306 TEST(skpancestry_com1), 3078 TEST(skpancestry_com1),
2307 TEST(skpbyte_com1), 3079 TEST(skpbyte_com1),
2308 TEST(skpeldorado_com_ua1), 3080 TEST(skpeldorado_com_ua1),
2309 TEST(skp96prezzi1), 3081 TEST(skp96prezzi1),
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse); 3231 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse);
2460 } 3232 }
2461 #ifdef SK_DEBUG 3233 #ifdef SK_DEBUG
2462 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; 3234 SkPathOpsDebug::gMaxWindSum = SK_MaxS32;
2463 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; 3235 SkPathOpsDebug::gMaxWindValue = SK_MaxS32;
2464 #endif 3236 #endif
2465 } 3237 }
2466 3238
2467 #include "TestClassDef.h" 3239 #include "TestClassDef.h"
2468 DEFINE_TESTCLASS_SHORT(PathOpsOpTest) 3240 DEFINE_TESTCLASS_SHORT(PathOpsOpTest)
OLDNEW
« no previous file with comments | « tests/PathOpsLineIntersectionTest.cpp ('k') | tests/PathOpsQuadIntersectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698