aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpSegment.h
Commit message (Collapse)AuthorAge
* handle failing pathop testsGravatar Cary Clark2018-07-24
| | | | | | | | | | | | | | | Some tests isolated from GrShapes_arcs do not fail gracefully, so make sure errors are properly handled. TBR=reed@google.com Bug: skia: Change-Id: Ia8c9903e64ef755ec11c398df3e5d258ca1f5f8b Reviewed-on: https://skia-review.googlesource.com/143112 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* propogate simple angles in pathopsGravatar Cary Clark2018-07-11
| | | | | | | | | | | | | | | | | | | | If an edge is unsortable, its winding value is untrustworthy; it cannot be added to the output on that alone. If one end adjoins a trusted edge, and that edge is added to the output, the untrusted edge can be added as well. Also add in msvs debugging for angles. With this change, all extended tests pass. TBR=reed@google.com Bug: skia:8125 Change-Id: I049c6efa2fa83edd7b49cdd598ec94c356481b0f Reviewed-on: https://skia-review.googlesource.com/140562 Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* fix pathop fuzz timeoutGravatar Cary Clark2018-06-25
| | | | | | | | | | | R=caryclark@google.com Bug:855751 Change-Id: Ieb6bae50311f62c9b03b84b2cf84f09ad2db2e46 Reviewed-on: https://skia-review.googlesource.com/137361 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* fix op fuzz timeoutGravatar Cary Clark2018-06-19
| | | | | | | | | | R=kjlubick@google.com Bug:831647 Change-Id: I003ff28ac40ec81400570310bf6f6f1a08a925e5 Reviewed-on: https://skia-review.googlesource.com/134505 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* Remove SkOpTAllocatorGravatar Herb Derby2017-04-19
| | | | | | | | | | Have the callsites of SkOpTAllocator call SkArenaAlloc directly. Bug: skia: Change-Id: Ic54e92c3e9a0abed038aa3ae40e8a195895af99d Reviewed-on: https://skia-review.googlesource.com/13870 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Herb Derby <herb@google.com>
* keep integral rectangle intersections integralGravatar Cary Clark2017-04-18
| | | | | | | | | | | | | | | | | | | | | | A pair of coincident lines can generate multiple intersection points. Path ops is more stable when the intersection T value is used to recompute the intersection point, but this has the side-effect of making integral edges intersect at non-integral values. While it's worthwhile to fix this, for the moment it is less disruptive to only worry about keeping intersection values integral if the original intersection point is integral in both axes. Also, fix some debugging code that bit-rotted. R=msarett@google.com Change-Id: Iefd27b25d1d21c22b224c174bd59bc6c105033c4 Reviewed-on: https://skia-review.googlesource.com/13721 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* fix fuzzGravatar Cary Clark2017-03-21
| | | | | | | | | | | | | | | | corrupted intersection point lists can loop forever. Add a safety hatch to abort after a large number of iterations. TBR=kjlubick@google.com BUG=700679 Change-Id: Ifd4b180b47ba3bbde38ade0bb13b16b8d645c1cb Reviewed-on: https://skia-review.googlesource.com/9967 Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Move from SkChunkAlloc to SkArenaAlloc for PathOpsGravatar Herb Derby2017-03-07
| | | | | | | | | Attempt two. Remove ~SkOpContour because it is handled by the SkArenaAlloc. Change-Id: Id3049db97aebcc1009d403a031f2fac219f58f2f Reviewed-on: https://skia-review.googlesource.com/9381 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Move from SkChunkAlloc to SkArenaAlloc for PathOps"Gravatar Derek Sollenberger2017-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 38c60180241e335e368fdadbf7856aff114ff668. Reason for revert: breaking ASAN run in TAP build Original change's description: > Move from SkChunkAlloc to SkArenaAlloc for PathOps > > Change-Id: Iab111a4ebcae4e896b1fdfe285def9ef0ae2ab6b > Reviewed-on: https://skia-review.googlesource.com/7314 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Herb Derby <herb@google.com> > TBR=herb@google.com,caryclark@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I6364254571bb1617a9f45ed08f2af4a59f9d5841 Reviewed-on: https://skia-review.googlesource.com/9335 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* Move from SkChunkAlloc to SkArenaAlloc for PathOpsGravatar Herb Derby2017-03-06
| | | | | | | Change-Id: Iab111a4ebcae4e896b1fdfe285def9ef0ae2ab6b Reviewed-on: https://skia-review.googlesource.com/7314 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Herb Derby <herb@google.com>
* rework xor to be more like windingGravatar Cary Clark2016-12-16
| | | | | | | | | | | | | | | | Pathops is very well exercised with winding paths, but less so with xor (even odd) paths. Rewrite the xor main loop to look like the winding one to take advantage of the latter's bug fixes. TBR=reed@google.com BUG=skia:6041 Change-Id: Ied8d522254a327b1817b54f0abbf4414f5fab7da Reviewed-on: https://skia-review.googlesource.com/6228 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* more simplify bugsGravatar Cary Clark2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | SkOpAngle::alignmentSameSide() Shifting an edge to align it for angle sorting may move a compared edge to the opposite side. For lines that are shifted, check to see if this is so. class SkOpContourBuilder If the path contains a pair of lines that cancel, skip them as early as possible. While not strictly necessary, this optimization is cheap and makes debugging much easier. SkOpEdgeBuilder::walk() case SkPath::kCubic_Verb: If max curvature or inflections break a cubic into pieces, make sure that the pieces are large enough to process. If not, add the broken piece back to a neighbor. Correct debugging that had gone stale. Add active span debugging cache so only changes are shown. TBR=reed@google.com BUG=skia:6401 Change-Id: I766f77e4fb9b76537cf5464961addb103114f5db Reviewed-on: https://skia-review.googlesource.com/5764 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* break ambiguous angle sorting loopGravatar caryclark2016-10-18
| | | | | | | | | | | | | | | | | | A pair of cubics may be difficult to sort if the tangents suggest one sort but the midpoints suggest a different one. When in this gray area, and when the cumulative sort of all the angles fails to resolve, reverse the sort to break the tie. Before, when tiger8 was run through the signed distance field generated directly from the path data, the simplify call might hang since the angle could not be resolved. If the endless loop is detected, and if there is no tie to break, just fail instead. TBR=reed@google.com BUG=skia:5131 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2426753002 Review-Url: https://codereview.chromium.org/2426753002
* remove dead codeGravatar Cary Clark2016-10-05
| | | | | | | | | | | | | | | Use code coverage and a new '-c' flag to find and remove unneeded code. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2397593002 patch from issue 2397593002 at patchset 1 (http://crrev.com/2397593002#ps1) Change-Id: I741a82de9191146c10457d4c0b9cb9605dff2069 Reviewed-on: https://skia-review.googlesource.com/2983 Reviewed-by: Cary Clark <caryclark@google.com>
* coin debugging runs all tests in extendedGravatar Cary Clark2016-10-04
| | | | | | | | | | | | | | | | | | | This extends path ops concidence debugging to find unused algorithms and determine the extent of loops. This verifies that all 140M tests run without error in release and debug. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2391733002 patch from issue 2391733002 at patchset 1 (http://crrev.com/2391733002#ps1) Change-Id: I02ca29764405c5ac3e7ca3b2621fba28dbaaffc2 Reviewed-on: https://skia-review.googlesource.com/2923 Reviewed-by: Cary Clark <caryclark@google.com>
* Rewriting path writerGravatar caryclark2016-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | The path writer takes constructs the output path out of curves that satisfy the pathop operation. Curves contain lists of t/point pairs that may not be comparable to each other. To match up curve ends in the output path, look for adjacent curves to have a shared membership rather than comparing point values. Use path utilities to connect partial curve lists into closed contours. Share the angle code that determines if a curve has become a degenerate line with the path writer. Clean up some code on the way, and delete some unused functions. TBR=reed@google.com BUG=5188 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321973005 Review-Url: https://codereview.chromium.org/2321973005
* pathops coincident workGravatar caryclark2016-08-31
| | | | | | | | | | | | | This is working towards fixing all bugs around simplifying the tiger. This installment simplifies the point-t intersection list as it is built rather than doing the analysis once the intersections are complete. This avoids getting the list in an inconsistent state and makes coincident checks faster and more stable. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2237223002 TBR=reed@google.com BUG=skia:5131 Review-Url: https://codereview.chromium.org/2237223002
* path ops stream-liningGravatar caryclark2016-08-25
| | | | | | | | | | | | | | | | The addT() function is a workhorse of pathops. Make it simpler, removing branches and parameters. Separate addOpp() into const and modify parts. Add more debugging that asserts if the function fails and the data is not extreme (e.g., fuzzer generated). TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2273293004 Review-Url: https://codereview.chromium.org/2273293004
* add pathops debuggingGravatar caryclark2016-08-25
| | | | | | | | | | | | | | | | | | | Pathops has many points of failure, most of which are triggered by extreme data generated by fuzzers. It's difficult to figure out which failure point was triggered when the operation gives up. Add instrumentation so that the failure can be debugged when the data is well-behaved. Also, add a check that looks for a sequence of coincident points on multiple edges that are out of order when compared to each other. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274803003 Review-Url: https://codereview.chromium.org/2274803003
* remove point aliasesGravatar caryclark2016-08-24
| | | | | | | | | | | | | | | | This removes the notion of keeping track of every different t value that resolves to the same or a similar point. Other fixes make this concept unnecessary, and removing it simplifies the code. This removes an allocation, and speeds up paths with many overlapping curves. As a bonus, four fuzzer tests that failed before now succeed. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275703003 Review-Url: https://codereview.chromium.org/2275703003
* fix pathops fuzzGravatar caryclark2016-08-23
| | | | | | | | | | | Extreme cubics may split so that one half is a point. Discard this rather than generating a degenerate line. TBR=reed@google.com BUG=640025 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276503002 Review-Url: https://codereview.chromium.org/2276503002
* fix fuzzer bugGravatar caryclark2016-07-21
| | | | | | | | | | | | | | | | | Fix another fuzzer bug. Some PathOps asserts only make sense if the incoming data is well-behaved. Well-behaved tests set debugging state to trigger these additional asserts. Formalize this by creating macros similar to SkASSERT that check to see if the assert should be skipped. TBR=reed@google.com BUG=629962 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2169863002 Review-Url: https://codereview.chromium.org/2169863002
* pathops coincidence and security rewriteGravatar caryclark2016-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most changes stem from working on an examples bracketed by #if DEBUG_UNDER_DEVELOPMENT // tiger These exposed many problems with coincident curves, as well as errors throughout the code. Fixing these errors also fixed a number of fuzzer-inspired bug reports. * Line/Curve Intersections Check to see if the end of the line nearly intersects the curve. This was a FIXME in the old code. * Performance Use a central chunk allocator. Plumb the allocator into the global variable state so that it can be shared. (Note that 'SkGlobalState' is allocated on the stack and is visible to children functions but not other threads.) * Refactor Let SkOpAngle grow up from a structure to a class. Let SkCoincidentSpans grow up from a structure to a class. Rename enum Alias to AliasMatch. * Coincidence Rewrite Add more debugging to coincidence detection. Parallel debugging routines have read-only logic to report the current coincidence state so that steps through the logic can expose whether things got better or worse. More functions can error-out and cause the pathops engine to non-destructively exit. * Accuracy Remove code that adjusted point locations. Instead, offset the curve part so that sorted curves all use the same origin. Reduce the size (and influence) of magic numbers. * Testing The debug suite with verify and the full release suite ./out/Debug/pathops_unittest -v -V ./out/Release/pathops_unittest -v -V -x expose one error. That error is captured as cubics_d3. This error exists in the checked in code as well. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2128633003 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2128633003 Review-Url: https://codereview.chromium.org/2128633003
* fix asan bug triggered by pathops fuzz testsGravatar caryclark2016-06-29
| | | | | | | | R=dogben@google.com TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111473004 Review-Url: https://codereview.chromium.org/2111473004
* detach -> releaseGravatar mtklein2016-03-16
| | | | | | | | | | | | | The C++ standard library uses the name "release" for the operation we call "detach". Rewriting each "detach(" to "release(" brings us a step closer to using standard library types directly (e.g. std::unique_ptr instead of SkAutoTDelete). This was a fairly blind transformation. There may have been unintentional conversions in here, but it's probably for the best to have everything uniformly say "release". BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1809733002 Review URL: https://codereview.chromium.org/1809733002
* fix path ops fuzz bugGravatar caryclark2016-02-24
| | | | | | | | | | | | | | | | | | | If one path is empty and the other has extreme values, the intermediate coincident paths cannot be resolved, but triggers an assert that a data structure unexpectedly has zero-length. Tunnel this failure back up to the top and return that the entire path op fails. A future optimization could detect the empty path and avoid this, allowing the op to succeed -- not sure that it's worth the additional logic though. TBR=reed@google.com BUG=535151 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1730293002 Review URL: https://codereview.chromium.org/1730293002
* More conic-specific tests revealed a few conic-specific bugs. Because ↵Gravatar caryclark2015-10-30
| | | | | | | | | | | | | | | | | | | | | | | | javascript / canvas make visualizing conics tricky, new native tools are required. The utility SubsetPath removes parts of a potentially very large path to isolate a minimal test case. SubsetPath is very useful for debugging path ops, but is not path ops specific. PathOpsBuilderConicTest compares the output of the Path Ops Builder, sequential calls to Simplify, and SkRegions for some number of rotated ovals. Some tests caused path ops to hang. It was caught adding a loop of curves because the head was not found by the tail. Even though the root cause has been fixed, SkSegment::addCurveTo callers now abort the path op if the same curve was added twice. The subdivided conic weight was been computed anew. Fortunately, it's a simpler computation that the one it replaces. Some Simplify() subroutines returned false to signal that the results needed assembling. Change these to abort the current operation instead. Coincident curve intersection triggered two small bugs; one where no perpendicular could be found for coincident curves, and one where no coincident curves remain after looping. The SixtyOvals test can be run through multiple processes instead of multiple threads. This strategy allows a 48 core machine to saturate all cores at 100%. The DEBUG_VISUALIZE_CONICS code in PathOpsConicIntersectionTest acknowleges that it is easier to visualize conics with Skia than with script and html canvas. This test also verifies that path ops subdivision matches geometry chopping. TBR=reed@google.com Review URL: https://codereview.chromium.org/1405383004
* Enabling clip stack flattening exercises path ops.Gravatar caryclark2015-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Iterating through the 903K skps that represent the imagable 1M top web pages triggers a number of bugs, some of which are addressed here. Some web pages trigger intersecting cubic representations of arc with their conic counterparts. This exposed a flaw in coincident detection that caused an infinite loop. The loop alternatively extended the coincident section and, determining the that the bounds of the curve pairs did not overlap, deleted the extension. Track the number of times the coincident detection is called, and if it exceeds an empirically found limit, assume that the curves are coincident and force it to be so. The loop count limit can be determined by enabling DEBUG_T_SECT_LOOP_COUNT and running all tests. The largest count is reported on completion. Another class of bugs was caused by concident detection duplicating nearly identical points that had been merged earlier. To track these bugs, the 'handle coincidence' code was duplicated as a const debug variety that reported if one of a dozen or so irregularities are present; then it is easier to see when a block of code that fixes one irregularity regresses another. Creating the debug const code version exposed some non-debug code that could be const, and some that was experimental and could be removed. Set DEBUG_COINCIDENCE to track coincidence health and handling. For running on Chrome, DEBUG_VERIFY checks the result of pathops against the same operation using SkRegion to verify that the results are nearly the same. When visualizing the pathops work using tools/pathops_visualizer.htm, set DEBUG_DUMP_ALIGNMENT to see the curves after they've been aligned for coincidence. Other bugs fixed include detecting when a section of a pair of curves have devolved into lines and are coincident. TBR=reed@google.com Review URL: https://codereview.chromium.org/1394503003
* remove unused fields from SkOpSegmentGravatar caryclark2015-09-04
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1322413002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* fix path ops fuzz busterGravatar caryclark2015-07-23
| | | | | | | | | | | | Mark collapsed segments as done and remove collapsed segment references from the coincidence array. Also add test names to global debugging. R=fmalita@chromium.org BUG=512592 Review URL: https://codereview.chromium.org/1250293002
* When three or more edges are coincident, the logic needsGravatar caryclark2015-07-06
| | | | | | | | | | | | | | | | to compute the overlapping ranges and combine the winding into a single destination. This computes coincidence more rigorously, fixing the edge cases exposed by this bug. Also, add the ability to debug and dump pathop structures from the coincident context. TBR=reed@google.com BUG=skia:3651 Review URL: https://codereview.chromium.org/1182493015
* The path ops builder code needs to determine the winding of each contour ↵Gravatar caryclark2015-05-18
| | | | | | | | | | | | | | added, and reverse windings if the contours are nested in other contours. Cheap (one contour) paths can be evaluated and reversed as needed with a minimum of checking, but multi-contour paths invoke the regular path ops machinery to determine who is contained by whom. More tests need to be added to verify that all corner cases are considered, but this fixes the cases in the bug thus far. R=fmalita@chromium.org TBR=reed@google.com BUG=skia:3838 Review URL: https://codereview.chromium.org/1129193006
* deal more consistently with unsortable edgesGravatar caryclark2015-05-13
| | | | | | | | | | | | | Improve line/curve coincident detection and resolution. This fixed the remaining simple failures. When an edge is unsortable, use the ray intersection to determine the angles' winding. Deal with degenerate segments. TBR=reed@google.com BUG=skia:3588,skia:3762 Review URL: https://codereview.chromium.org/1140813002
* Path ops formerly found the topmost unprocessed edge and determined its ↵Gravatar caryclark2015-05-11
| | | | | | | | | | | | | | | angle sort order to initialize the winding. This never worked correctly with cubics and was flaky with paths consisting mostly of vertical edges. This replacement shoots axis-aligned rays through all intersecting edges to find the outermost one either horizontally or vertically. The resulting code is smaller and twice as fast. To support this, most of the horizontal / vertical intersection code was rewritten and standardized, and old code supporting the top-directed winding was deleted. Contours were pointed to by an SkTDArray. Instead, put them in a linked list, and designate the list head with its own class to ensure that methods that take lists of contours start at the top. This change removed a large percentage of memory allocations used by path ops. TBR=reed@google.com BUG=skia:3588 Review URL: https://codereview.chromium.org/1111333002
* minor fixes to cubics code and overall alignment of how bounds and tops are ↵Gravatar caryclark2015-04-29
| | | | | | | | | | | | computed for all curve types All but 17 extended tests work. A helper function is privately added to SkPath.h to permit a test to modify a given point in a path. BUG=skia:3588 Review URL: https://codereview.chromium.org/1107353004
* fix multiple intersection logicGravatar caryclark2015-04-24
| | | | | | | | | | | When three or more curves intersect at the same point, ensure that each curve records the intersections of the others. This fixes a number of cubic tests. TBR=reed@google.com BUG=skia:3588 Review URL: https://codereview.chromium.org/1105943002
* working on initial winding for cubicsGravatar caryclark2015-04-23
| | | | | | | | | | | Path ops works well for all tests except for cubics. Isolate failures caused by cubics, and do a better job of computing the initial winding for cubics. TBR=reed@google.com BUG=skia:3588 Review URL: https://codereview.chromium.org/1096923003
* Now, path ops natively intersect conics, quads, and cubics in any ↵Gravatar caryclark2015-04-20
| | | | | | | | | | | combination. There are still a class of cubic tests that fail and a handful of undiagnosed failures from skps and fuzz tests, but things are much better overall. Extended tests (150M+) run to completion in release in about 6 minutes; the standard test suite exceeds 100K and finishes in a few seconds on desktops. TBR=reed BUG=skia:3588 Review URL: https://codereview.chromium.org/1037953004
* cumulative pathops patchGravatar caryclark2015-03-26
| | | | | | | | | | | | | | | | | | | | | Replace the implicit curve intersection with a geometric curve intersection. The implicit intersection proved mathematically unstable and took a long time to zero in on an answer. Use pointers instead of indices to refer to parts of curves. Indices required awkward renumbering. Unify t and point values so that small intervals can be eliminated in one pass. Break cubics up front to eliminate loops and cusps. Make the Simplify and Op code more regular and eliminate arbitrary differences. Add a builder that takes an array of paths and operators. Delete unused code. BUG=skia:3588 R=reed@google.com Review URL: https://codereview.chromium.org/1037573004
* Revert of pathops version two (patchset #16 id:150001 of ↵Gravatar reed2015-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1002693002/) Reason for revert: ASAN investigation Original issue's description: > pathops version two > > R=reed@google.com > > marked 'no commit' to attempt to get trybots to run > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/ccec0f958ffc71a9986d236bc2eb335cb2111119 TBR=caryclark@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1029993002
* pathops version twoGravatar caryclark2015-03-24
| | | | | | | | | | R=reed@google.com marked 'no commit' to attempt to get trybots to run TBR=reed@google.com Review URL: https://codereview.chromium.org/1002693002
* These tests stress pathops by describing the union of circle-like paths that ↵Gravatar caryclark2014-11-13
| | | | | | | | | | | | | | | | | | | have tiny line segments embedded and double back to create near-coincident conditions. The fixes include - detect when finding the active top loops between two possible answers - preflight chasing winding to ensure answer is consistent - binary search more often when quadratic intersection fails - add more failure paths when an intersect is missed While this fixes the chrome bug, reenabling path ops in svg should be deferred until additional fixes are landed. TBR= BUG=421132 Committed: https://skia.googlesource.com/skia/+/6f726addf3178b01949bb389ef83cf14a1d7b6b2 Review URL: https://codereview.chromium.org/633393002
* Revert of harden pathops for pathological test (patchset #19 id:410001 of ↵Gravatar hcm2014-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/633393002/) Reason for revert: Compile errors on bots Original issue's description: > These tests stress pathops by describing the union of circle-like paths that have tiny line segments embedded and double back to create near-coincident conditions. > > The fixes include > - detect when finding the active top loops between two possible answers > - preflight chasing winding to ensure answer is consistent > - binary search more often when quadratic intersection fails > - add more failure paths when an intersect is missed > > While this fixes the chrome bug, reenabling path ops in svg should be deferred until additional fixes are landed. > > TBR= > BUG=421132 > > Committed: https://skia.googlesource.com/skia/+/6f726addf3178b01949bb389ef83cf14a1d7b6b2 TBR=caryclark@google.com NOTREECHECKS=true NOTRY=true BUG=421132 Review URL: https://codereview.chromium.org/686843002
* These tests stress pathops by describing the union of circle-like paths that ↵Gravatar caryclark2014-10-28
| | | | | | | | | | | | | | | | | have tiny line segments embedded and double back to create near-coincident conditions. The fixes include - detect when finding the active top loops between two possible answers - preflight chasing winding to ensure answer is consistent - binary search more often when quadratic intersection fails - add more failure paths when an intersect is missed While this fixes the chrome bug, reenabling path ops in svg should be deferred until additional fixes are landed. TBR= BUG=421132 Review URL: https://codereview.chromium.org/633393002
* fail on extremely large coincident curvesGravatar caryclark2014-09-29
| | | | | | | | | TBR= BUG=418381 Author: caryclark@google.com Review URL: https://codereview.chromium.org/607913007
* fail early if coincidence can't be resolvedGravatar caryclark2014-09-19
| | | | | | | | | | | | Bail out if a very large value causes coincidence resolution to fail. TBR= BUG=415866 Author: caryclark@google.com Review URL: https://codereview.chromium.org/585913002
* fix pathops skp-derived bugs; add more failing testsGravatar caryclark2014-08-12
| | | | | | | | TBR= Author: caryclark@google.com Review URL: https://codereview.chromium.org/463883002
* Fix last pathops skp bugGravatar caryclark2014-06-18
| | | | | | | | | | | | | | | | | | | | | | This fixes the last bug discovered by iterating through the 800K skp corpus representing the top 1M websites. For every clip on the stack, the paths are replaced with the pathop intersection. The resulting draw is compared with the original draw for pixel errors. At least two prominent bugs remain. In one, the winding value is confused by a cubic with an inflection. In the other, a quad/cubic pair, nearly coincident, fails to find an intersection. These minor changes include ignoring very tiny self-intersections of cubics, and processing degenerate edges that don't connect to anything else. R=reed@android.com TBR=reed Author: caryclark@google.com Review URL: https://codereview.chromium.org/340103002
* Enabling the canvas bit to turn the clip stack into a flat replace exposed ↵Gravatar caryclark2014-06-17
| | | | | | | | | | | | | | | | | | around 100 failures when testing the 800K skp set generated from the top 1M web sites. This fixes all but one of those failures. Major changes include: - Replace angle indices with angle pointers. This was motivated by the need to add angles later but not renumber existing angles. - Aggressive segment chase. When the winding is known on a segment, more aggressively passing that winding to adjacent segments allows fragmented data sets to succeed. - Line segments with ends nearly the same are treated as coincident first. - Transfer partial coincidence by observing that if segment A is partially coincident to B and C then B and C may be partially coincident. TBR=reed Author: caryclark@google.com Review URL: https://codereview.chromium.org/272153002