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

Side by Side Diff: tools/pathops_sorter.htm

Issue 239563004: fix minor skp-found bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix mac-detected errors Created 6 years, 7 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
« no previous file with comments | « tests/PathOpsThreadedCommon.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> 3 <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 <head> 4 <head>
5 <meta charset="utf-8" /> 5 <meta charset="utf-8" />
6 <title></title> 6 <title></title>
7 <div style="height:0"> 7 <div style="height:0">
8 8
9 <div id="quad1"> 9 <div id="quad1">
10 {{3.13,2.74}, {1.08,4.62}, {3.71,0.94}} 10 {{3.13,2.74}, {1.08,4.62}, {3.71,0.94}}
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 {{183,8506.99023}, {552,8507}}, 819 {{183,8506.99023}, {552,8507}},
820 {{552,8507}, {552,8508}}, 820 {{552,8507}, {552,8508}},
821 </div> 821 </div>
822 822
823 <div id="skpwww_cityads_ru_249"> 823 <div id="skpwww_cityads_ru_249">
824 {{{1000, 10.4003992f}, {1000, 13.3527431f}}} 824 {{{1000, 10.4003992f}, {1000, 13.3527431f}}}
825 {{{1000, 13.3527431f}, {999.917603f, 13.2607508f}, {999.82843f, 13.1715727f}}} 825 {{{1000, 13.3527431f}, {999.917603f, 13.2607508f}, {999.82843f, 13.1715727f}}}
826 {{{1000, 13}, {999.969971f, 37.0299988f}}} 826 {{{1000, 13}, {999.969971f, 37.0299988f}}}
827 </div> 827 </div>
828 828
829 <div id="skpwww_maturesupertube_com_21">
830 {{{{3.87867975f, 11831.8789f}, {4.7573595f, 11831}, {6, 11831}}},
831 {{{2, 11830}, {4.5f, 11832.5f}}}},
832 </div>
833
834 <div id="loop1">
835 {{1, 4, 2, 6, 0, 5, 4.5f, 4.33333302f
836 {{2, 6, 0, 5, 4.5f, 4.33333302f, 1, 4
837 {{{3, 5}, {2.33333325f, 4.33333349f}, {3.83333325f, 3.83333349f}, {2, 4}}}
838 {{{2, 4}, {3, 5}, {2.33333325f, 4.33333349f}, {3.83333325f, 3.83333349f}}}
839 </div>
840
841 <div id="serp1">
842 {{{0.55431359440952721, 2.1086271888190544}, {0.1588954256872922, 2.307831598814 1811}, {0.57446808656344528, 2.1489361731268914}, {0, 1}}}
843 {{{0.55431359440952721, 2.1086271888190544}, {0.1588954256872922, 2.307831598814 1811}, {0.57446808656344528, 2.1489361731268914}, {0, 1}}}
844 </div>
845 <div id="serp2">
846 {{{4.0946656649135988, 3.283996994740797}, {4.1983471074380168, 2.10743801652892 59}, {4.5454545454545459, 1.3636363636363635}, {4, 3}}}
847 {{{4.0946656649135988, 3.283996994740797}, {4.1983471074380168, 2.10743801652892 59}, {4.5454545454545459, 1.3636363636363635}, {4, 3}}}
848 </div>
849 <div id="serp3">
850 {{{2.2015477442471254, 1.1371488033013577}, {2.3167674423028526, 0.6832325576971 4741}, {2.4076432497431028, 0.59235675025689716}, {2, 1}}}
851 {{{2.2015477442471254, 1.1371488033013577}, {2.3167674423028526, 0.6832325576971 4741}, {2.4076432497431028, 0.59235675025689716}, {2, 1}}}
852 </div>
853
854 <div id="skpwww_seopack_blogspot_com_2153">
855 {{{924, 245.472672f}, {1143, 247}}}
856 {{{1000, 246}, {927.340759f, 245.505722f}}}
857 {{{999.892212f, 246}, {927.340759f, 245.505722f}}}
858 </div>
859
860 <div id="self1">
861 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}}
862 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}}
863 </div>
864
865 <div id="skpwww_pindosiya_com_99">
866 {{{901.0869140625, 547}, {899, 556}}}
867 {{{900.0235595703125, 551.60284423828125}, {900.06072998046875, 551.297058105468 75}, {900.15655517578125, 551.0157470703125}}}
868 </div>
869
829 </div> 870 </div>
830 871
831 <script type="text/javascript"> 872 <script type="text/javascript">
832 873
833 var testDivs = [ 874 var testDivs = [
875 skpwww_pindosiya_com_99,
876 self1,
877 skpwww_seopack_blogspot_com_2153,
878 serp1,
879 serp2,
880 serp3,
881 loop1,
882 skpwww_maturesupertube_com_21,
834 skpwww_cityads_ru_249, 883 skpwww_cityads_ru_249,
835 skpelpais_com_18, 884 skpelpais_com_18,
836 testQuads60_b, 885 testQuads60_b,
837 testQuads60_a, 886 testQuads60_a,
838 testQuads60, 887 testQuads60,
839 skpwww_dealnews_com_315_a, 888 skpwww_dealnews_com_315_a,
840 skpwww_dealnews_com_315, 889 skpwww_dealnews_com_315,
841 skpnamecheap_405, 890 skpnamecheap_405,
842 slop1, 891 slop1,
843 slop2, 892 slop2,
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 dy = shortPt[1] - origin[1]; 1534 dy = shortPt[1] - origin[1];
1486 dist = Math.sqrt(dx * dx + dy * dy); 1535 dist = Math.sqrt(dx * dx + dy * dy);
1487 shortDist.push(dist); 1536 shortDist.push(dist);
1488 } 1537 }
1489 var intersect = []; 1538 var intersect = [];
1490 var useIntersect = false; 1539 var useIntersect = false;
1491 var maxWidth = Math.max(xmax - xmin, ymax - ymin); 1540 var maxWidth = Math.max(xmax - xmin, ymax - ymin);
1492 for (var curves in test) { 1541 for (var curves in test) {
1493 var curve = test[curves]; 1542 var curve = test[curves];
1494 if (curve.length == 6 || curve.length == 8) { 1543 if (curve.length == 6 || curve.length == 8) {
1495 var opp = curves == 1 ? 0 : 1; 1544 var opp = curves == 0 || curves == 1 ? 0 : 1;
1496 var sects = ray_curve_intersect(origin, hullEnds[opp], curve); 1545 var sects = ray_curve_intersect(origin, hullEnds[opp], curve);
1497 intersect.push(sects); 1546 intersect.push(sects);
1498 if (sects.length > 1) { 1547 if (sects.length > 1) {
1499 var intersection = sects[0]; 1548 var intersection = sects[0];
1500 if (intersection == 0) { 1549 if (intersection == 0) {
1501 intersection = sects[1]; 1550 intersection = sects[1];
1502 } 1551 }
1503 var ix = x_at_t(curve, intersection) - origin[0]; 1552 var ix = x_at_t(curve, intersection) - origin[0];
1504 var iy = y_at_t(curve, intersection) - origin[1]; 1553 var iy = y_at_t(curve, intersection) - origin[1];
1505 var ex = hullEnds[opp][0] - origin[0]; 1554 var ex = hullEnds[opp][0] - origin[0];
1506 var ey = hullEnds[opp][1] - origin[1]; 1555 var ey = hullEnds[opp][1] - origin[1];
1507 if (ix * ex >= 0 && iy * ey >= 0) { 1556 if (ix * ex >= 0 && iy * ey >= 0) {
1508 var iDist = Math.sqrt(ix * ix + iy * iy); 1557 var iDist = Math.sqrt(ix * ix + iy * iy);
1509 var eDist = Math.sqrt(ex * ex + ey * ey); 1558 var eDist = Math.sqrt(ex * ex + ey * ey);
1510 var delta = Math.abs(iDist - eDist) / maxWidth; 1559 var delta = Math.abs(iDist - eDist) / maxWidth;
1511 if (delta > (curve.length == 6 ? 1e-5 : 1e-4)) { 1560 if (delta > (curve.length == 6 ? 1e-5 : 1e-4)) {
1512 useIntersect ^= true; 1561 useIntersect ^= true;
1513 } 1562 }
1514 } 1563 }
1515 } 1564 }
1516 } 1565 }
1517 } 1566 }
1518 var midLeft = crossPt(origin, midSpokes[0], midSpokes[1]); 1567 var midLeft = curves != 0 ? crossPt(origin, midSpokes[0], midSpokes[1]) : 0;
1519 var firstInside; 1568 var firstInside;
1520 if (useIntersect) { 1569 if (useIntersect) {
1521 var sect1 = intersect[0].length > 1; 1570 var sect1 = intersect[0].length > 1;
1522 var sIndex = sect1 ? 0 : 1; 1571 var sIndex = sect1 ? 0 : 1;
1523 var sects = intersect[sIndex]; 1572 var sects = intersect[sIndex];
1524 var intersection = sects[0]; 1573 var intersection = sects[0];
1525 if (intersection == 0) { 1574 if (intersection == 0) {
1526 intersection = sects[1]; 1575 intersection = sects[1];
1527 } 1576 }
1528 var curve = test[sIndex]; 1577 var curve = test[sIndex];
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 <body onLoad="start();"> 2091 <body onLoad="start();">
2043 2092
2044 <canvas id="canvas" width="750" height="500" 2093 <canvas id="canvas" width="750" height="500"
2045 onmousedown="mouseDown = true" 2094 onmousedown="mouseDown = true"
2046 onmouseup="mouseDown = false" 2095 onmouseup="mouseDown = false"
2047 onmousemove="handleMouseOver()" 2096 onmousemove="handleMouseOver()"
2048 onclick="handleMouseClick()" 2097 onclick="handleMouseClick()"
2049 ></canvas > 2098 ></canvas >
2050 </body> 2099 </body>
2051 </html> 2100 </html>
OLDNEW
« no previous file with comments | « tests/PathOpsThreadedCommon.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698