aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops
Commit message (Collapse)AuthorAge
* Fix float-cast-overflow in SkOpSpan::sortableTop.Gravatar Ben Wagner2017-09-19
| | | | | | | | Bug: skia:4632 Change-Id: I5af8bb7b04673307cdf7865bb7d56a041ba27d83 Reviewed-on: https://skia-review.googlesource.com/47320 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
* possible fix for pathops timeoutGravatar Cary Clark2017-09-06
| | | | | | | | | | | | | | | | | | | | fuzzer causes pathops to loop somewhere finding complex intersections, but does not have a reproducible test case. Somewhat grasping at straws, the failing condition in this CL was triggered by the fuzzer tests, but may or may not be related to the hang. TBR=reed@google.com Bug: 754434 Change-Id: Ia8edc0709cec559b277ed83a5ad6feb67d8088c6 Reviewed-on: https://skia-review.googlesource.com/42780 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* Move all Linux GCE bots to DebianGravatar Eric Boren2017-06-28
| | | | | | | | | NOTREECHECKS:true Bug: skia: Change-Id: I612989c6ce2f309d2f70f896500f73e4baa971a7 Reviewed-on: https://skia-review.googlesource.com/19811 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Eric Boren <borenet@google.com>
* Convert SkClassifyCubic to double precisionGravatar Chris Dalton2017-06-12
| | | | | | | | | | | | | Even though it's in homogeneous coordinates, we still get unfortunate artifacts if this math is not done in double precision. Prioritizing correctness for now; we can revisit in the future as the need for performance dictates. Bug: skia: Change-Id: If416ef6b70291f1454fcb9f7630d1108644ac2a5 Reviewed-on: https://skia-review.googlesource.com/19501 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Improve cubic KLM accuracyGravatar Chris Dalton2017-06-09
| | | | | | | | | | | | | | | | | | | | | | Moves cubic root finding logic out of GrPathUtils and PathOpsCubicIntersectionTest, and unifies it in SkGeometry. "Normalizes" the homogeneous parameter values of the roots, rather than the cubic inflection function. Does this normalization by twiddling the exponents instead of division (which causes a loss of precision). Abandons the built-in derivatives in GrCubicEffect. These don't have high enough precision on many mobile gpus. Instead we pass the KLM matrix to the vertex shader via uniform, where we can use it to set up new linear functionals from which the fragment shader can calculate the gradient of the implicit function. Bug: skia:4410 Change-Id: Ibd64e999520adc8cdef7803a492d3699995aef5a Reviewed-on: https://skia-review.googlesource.com/19017 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Use more stable root finding methods for cubicsGravatar Christopher Dalton2017-06-06
| | | | | | | | | | | | | | Applies the quadratic formula from "Numerical Recipes in C", Section 5.6, to the homogeneous quadratic equations that find cubic inflection points and loop intersections. Also addresses KLM orientation ahead of time, rather than negating K and L after the fact. Bug: skia: Change-Id: Ic7e0818e2fe49b7724f9b583bae52281cfb1aea1 Reviewed-on: https://skia-review.googlesource.com/13481 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* SkSTArenaAllocGravatar Florin Malita2017-05-24
| | | | | | | | | Syntactic sugar, gets rid of some boilerplate. Change-Id: Ibdb28b7a8f1d5e4a4e18c12d423b987d7194e340 Reviewed-on: https://skia-review.googlesource.com/17837 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* 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>
* Improve accuracy of cubic classificationGravatar Chris Dalton2017-04-14
| | | | | | | | | | | | | | | | | | - Updates the logic to reflect the Loop-Blinn paper instead of the GPU gems website. - Removes the threshold for detecting local cusps. The serpentine codepath works for these cusps anyway, so what we really want to know is whether the discriminant is negative. - Makes sure to not scale the inflection function by 1/0. - Shifts the inflection function coefficients in d[] so they match the paper. - Stores the cubic discriminant in d[0]. Bug: skia: Change-Id: I909a522a0fd27c9c8dfbc27d968bc43eeb7a416f Reviewed-on: https://skia-review.googlesource.com/13304 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@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>
* limit addEndMoveSpans loop in pathopsGravatar Cary Clark2017-03-09
| | | | | | | | | | | | | | Prevent addEndMoveSpans from looping forever and abort with an error if the loop count is crazy big. R=kjlubick@google.com BUG=684553 Change-Id: I16c250c0b2f88534f809aba17a18081aea4e1f44 Reviewed-on: https://skia-review.googlesource.com/9458 Reviewed-by: Cary Clark <caryclark@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>
* fix fuzzerGravatar Cary Clark2017-03-01
| | | | | | | | | | | | turn asserts into error returns to fix fuzz R=kjlubick@google.com BUG=skia:6162 Change-Id: I7508eb5cb41425dcfc2718aaa9cc1ee8aa00acc9 Reviewed-on: https://skia-review.googlesource.com/9118 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Revert "offset angle check edge in common"Gravatar Cary Clark2017-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d2eb581ebc8f8009e80cccccd74d5b341ef5bd5b. Reason for revert: broke Google3 MSAN run of dm Original change's description: > offset angle check edge in common > > When curves cross, their intersection points may be nearby, but not exactly the same. > Sort the angles formed by the crossing curves when all angles don't have the same > origin. > > This sets up the framework to solve test case that currently fail (e.g., joel6) but > does not fix all related test cases (e.g., joel9). > > All older existing test cases, including extended tests, pass. > > Rework the test framework to better report when tests expected to produce failing > results now pass. > > Add new point and vector operations to support offset angles. > > TBR=reed@google.com > BUG=skia:6041 > > Change-Id: I67c651ded0a25e99ad93d55d6a35109b3ee3698e > Reviewed-on: https://skia-review.googlesource.com/6624 > Commit-Queue: Cary Clark <caryclark@google.com> > Reviewed-by: Cary Clark <caryclark@google.com> > TBR=caryclark@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia:6041 Change-Id: I43db0808522ac44aceeb4f70e296167ea84a3663 Reviewed-on: https://skia-review.googlesource.com/7373 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* offset angle check edge in commonGravatar Cary Clark2017-01-20
| | | | | | | | | | | | | | | | | | | | | | | | When curves cross, their intersection points may be nearby, but not exactly the same. Sort the angles formed by the crossing curves when all angles don't have the same origin. This sets up the framework to solve test case that currently fail (e.g., joel6) but does not fix all related test cases (e.g., joel9). All older existing test cases, including extended tests, pass. Rework the test framework to better report when tests expected to produce failing results now pass. Add new point and vector operations to support offset angles. TBR=reed@google.com BUG=skia:6041 Change-Id: I67c651ded0a25e99ad93d55d6a35109b3ee3698e Reviewed-on: https://skia-review.googlesource.com/6624 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* fix fuzz asserts triggered by old fuzzesGravatar Cary Clark2017-01-20
| | | | | | | | | | | | | | fuzz fixes Fixes from running all pathops fuzz testson ToT. R=kjlubick@google.com BUG=skia: Change-Id: Ic84b868a0cc53993e6561bc95fa364218bc3aa34 Reviewed-on: https://skia-review.googlesource.com/7325 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Scale the result of TightBounds when path was inverse-scaledGravatar Fredrik Söderquist2017-01-04
| | | | | | | | | | | | | When the path was "large" (as defined by ScaleFactor(...)), the computed bounds would not be adjusted to the correct space. Make sure to scale the result in those cases. BUG=chromium:678162 Change-Id: Ia2eb94050c4620286e9abb69976dbc0202ecc307 Reviewed-on: https://skia-review.googlesource.com/6501 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* fix fuzzGravatar Cary Clark2017-01-04
| | | | | | | | | | R=kjlubick@google.com BUG=skia:6084 Change-Id: I5978805c8d9048e399d83a13173c6a776cabe8ac Reviewed-on: https://skia-review.googlesource.com/6544 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* fix fuzzerGravatar Cary Clark2017-01-03
| | | | | | | | | | | | abort if incoming data is out of range TBR=reed@google.com BUG=676866 Change-Id: I7d4850611654a399e32ea2012b23ca369dc53e70 Reviewed-on: https://skia-review.googlesource.com/6525 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* one more empty contourGravatar Cary Clark2016-12-21
| | | | | | | | | | | | Add one more empty contour check. R=kjlubick@google.com BUG=skia:6073 Change-Id: Ie971875d37388f6bd86a0bdaeaf9230d64aca38d Reviewed-on: https://skia-review.googlesource.com/6356 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* check for empty contours in sortable topGravatar Cary Clark2016-12-20
| | | | | | | | | | TBR=reed@google.com BUG=675132 Change-Id: I022ce0c59574b450e47e22a3dac0929034439b1b Reviewed-on: https://skia-review.googlesource.com/6334 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* handle empty contours in a couple more placesGravatar Cary Clark2016-12-19
| | | | | | | | | | R=kjlubick@google.com BUG=skia:6061 Change-Id: I5b465f1495f80a5ac44253cadf4afd7f509fa75b Reviewed-on: https://skia-review.googlesource.com/6268 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Cary Clark <caryclark@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>
* fix fuzzing empty contours squirrelly cubicsGravatar Cary Clark2016-12-16
| | | | | | | | | | | | | | | | | | | The fuzzer triggered relatively new code that missized the split cubic array, i.e., if a cubic is split in three places it makes four cubics. The fuzzer triggered other relative new code that permits a contour to be empty. This happens when a line crosses over itself but doesn't enclose anything. R=kjlubick@google.com BUG=skia:6061 Change-Id: I0c04d0d390ff1092f7b3bb28ebbfca517451f497 Reviewed-on: https://skia-review.googlesource.com/6223 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* speculative pointer to member fixGravatar Cary Clark2016-12-15
| | | | | | | | | | | | | | | | Move the body of simple functions out of line if they are used in pointer to member function expressions. This may fix a chromeos-reported bug. TBR=reed@google.com BUG=674047 Change-Id: Id2a080a6d047103a48ebe2319abdae444de413e3 Reviewed-on: https://skia-review.googlesource.com/6110 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>
* fix fuzzGravatar Cary Clark2016-12-12
| | | | | | | | | | | | | Don't walk off the end if the loop doesn't contain the expected value. R=kjlubick@google.com BUG=skia:6047 Change-Id: I96815180dc7c92b45691037ae6c4b40beedc009a Reviewed-on: https://skia-review.googlesource.com/5845 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* fix fuzzersGravatar Cary Clark2016-12-08
| | | | | | | | | | | | | | Two crashes and a hang. Abort and return false in these cases. TBR=kjlubick@google.com BUG=skia:5983 Change-Id: I41ac3e56d47ee423b634b2f4886085b9caada76b Reviewed-on: https://skia-review.googlesource.com/5716 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* simplify bugGravatar Cary Clark2016-12-08
| | | | | | | | | | | | | | | | | | | | | | | The path contains a cubic with a very tight curve. Split the cubic into pieces so that the individual curves are better behaved. Use both inflections and max curvature to potentially split cubics. Since this may require a bit of work, preflight to ignore cubics that monotonically change in x and y. Only one of the three tests referred to by the bug below repro'd. Use path.dumpHex() instead of path.dump() to capture the crashing data. TBR=reed@google.com BUG=skia:6041 Change-Id: I29a264f87242cacc7c421e7685b90aca81621c74 Reviewed-on: https://skia-review.googlesource.com/5702 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Guard against buggy ucrt\math.h.Gravatar Mike Klein2016-11-28
| | | | | | | | | | | | | | BUG=666707 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5089 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I3bebfdf635d541d92fb84236f0f6fae2da39d691 Reviewed-on: https://skia-review.googlesource.com/5089 Reviewed-by: Bruce Dawson <brucedawson@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Avoid runtime initialization of FLT_EPSILON_SQRTGravatar Bruce Dawson2016-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FLT_EPSILON_SQRT is initialized with a call to sqrt which, in release builds on Windows, results in an initializer call (on official release builds this is optimized away). On Windows release (all flavors) builds this also triggers duplicate instantiations of the variable (always a risk with non-integral const variables defined in header files) with 32 copies ending up in both chrome.dll and chrome_child.dll. This change avoids the run-time initializer and as a side effect it also avoids most or all of the duplication. Section size savings in a Windows 32-bit release official build are: chrome.dll .text: -64 bytes change .rdata: -16 bytes change .data: -256 bytes change .reloc: -116 bytes change Total change: -452 bytes chrome_child.dll .text: 160 bytes change .rdata: -144 bytes change .data: -256 bytes change .reloc: -60 bytes change Total change: -300 bytes A more complete fix would include using extern const to declare these constants in the header file but define them once in a .cc file, but it's not clear that this is necessary. The size savings on non-official builds are greater. The increase in the .text segment is odd, but harmless since those bytes are shared. BUG=630755 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5061 Change-Id: I53d0cdc38e022039646df491d824a1aaf11def80 Reviewed-on: https://skia-review.googlesource.com/5061 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Bruce Dawson <brucedawson@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* fix fuzzer crashGravatar Cary Clark2016-11-17
| | | | | | | | | | | | | | | Fail if data is inconsistent. R=kjlubick@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4923 Change-Id: Ie3f65c80c0d59968b1e3fc8bc91839bedb2e3da3 Reviewed-on: https://skia-review.googlesource.com/4923 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* fuzz hang fix and pathops client debuggingGravatar Cary Clark2016-11-15
| | | | | | | | | | | | | | | | | The ASAN fuzzer on chrome caught a hanging state. To capture the data, allow the pathops client debugging to run in a release build. TBR=reed@google.com BUG=665295 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4834 Change-Id: I6b2c2baabd63994f63aa730d2ee7828986b5ab89 Reviewed-on: https://skia-review.googlesource.com/4834 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Remove dead code in SkBitmapProcLegacyShader::ContextSizeGravatar sylvestre.ledru2016-11-07
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2474973002 Review-Url: https://codereview.chromium.org/2474973002
* use reversePathTo in place of addPathReverseGravatar caryclark2016-11-07
| | | | | | | | | | | | | | Path ops was using addPathReverse, instead of reversePathTo. The former adds a moveTo always, and the latter requires that the caller add the moveTo if needed. Simplify the reversePathTo implementation. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2481463002 Committed: https://skia.googlesource.com/skia/+/d8db392be9dd1887df04b10b5670991d6b098c17 Review-Url: https://codereview.chromium.org/2481463002
* Revert of use reversePathTo in place of addPathReverse (patchset #1 id:1 of ↵Gravatar caryclark2016-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2481463002/ ) Reason for revert: breqking some bots Original issue's description: > use reversePathTo in place of addPathReverse > > Path ops was using addPathReverse, instead of reversePathTo. > The former adds a moveTo always, and the latter requires > that the caller add the moveTo if needed. > > Simplify the reversePathTo implementation. > > R=reed@google.com > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2481463002 > > Committed: https://skia.googlesource.com/skia/+/d8db392be9dd1887df04b10b5670991d6b098c17 TBR=reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2478763003
* use reversePathTo in place of addPathReverseGravatar caryclark2016-11-04
| | | | | | | | | | | | | Path ops was using addPathReverse, instead of reversePathTo. The former adds a moveTo always, and the latter requires that the caller add the moveTo if needed. Simplify the reversePathTo implementation. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2481463002 Review-Url: https://codereview.chromium.org/2481463002
* chmod -x *.cpp *.hGravatar Hal Canary2016-10-27
| | | | | | | Change-Id: I5b37499505e26e0837921292c1aea0056e4d5ecd Reviewed-on: https://skia-review.googlesource.com/4035 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* fix fuzzGravatar caryclark2016-10-25
| | | | | | | | | | Abort early if fuzz data breaks intersection. R=kjlubick@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2444333002 Review-Url: https://codereview.chromium.org/2444333002
* fix a few more fuzzesGravatar caryclark2016-10-24
| | | | | | | | | | | | Minor changes to fix some fuzz conditions. A couple of ignored asserts when the data is fuzzy, and one fail condition when the underlying data has already been deleted. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2443243002 Review-Url: https://codereview.chromium.org/2443243002
* nc seal breaks simplifyGravatar caryclark2016-10-24
| | | | | | | | | | | | | | | This test has nearly coincident lines that are missorted. The underlying bug is caused when a pair of curves are coincident when reduced to line segments, but the end points aren't detected. The error was generated by running nanobench over all svg sample data with the distance field patch installed. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2440043003 Review-Url: https://codereview.chromium.org/2440043003
* formalize host debuggingGravatar caryclark2016-10-24
| | | | | | | | | | | | | | Pathops writes files, anticipating upcoming crashes, and verifies the results against regions. Formalize these debugging methods so that they are more easily triggered by hosts outside of skia unit tests. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2441763003 Review-Url: https://codereview.chromium.org/2441763003
* fix one more fuzzerGravatar caryclark2016-10-24
| | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2438333002 Review-Url: https://codereview.chromium.org/2438333002
* fix more fuzz, carsvgGravatar caryclark2016-10-20
| | | | | | | | | | | | | Fix a few kevin-generated fuzzers. Remove an assert triggered by carsvg when thrown through the distance field stuff. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2427253005 Review-Url: https://chromiumcodereview.appspot.com/2427253005
* fix more chrome asan fuzzer failuresGravatar caryclark2016-10-20
| | | | | | | | | | | | Small change to gracefully quit when fuzzer values cause pathops to fail. TBR=reed@google.com BUG=657411, 657559 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2426393004 Review-Url: https://chromiumcodereview.appspot.com/2426393004
* fix debug version of cubicpair detected by asanGravatar caryclark2016-10-20
| | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2435063002 Review-Url: https://chromiumcodereview.appspot.com/2435063002
* fix fuzzersGravatar caryclark2016-10-20
| | | | | | | | | | | | | | | Many old pathops-related fuzz failures have built up while the codebase was under a state a flux. Now that the code is stable, address these failures. Most of the CL plumbs the debug global state to downstream routines so that, if the data is not trusted (ala fuzzed) the function can safely exit without asserting. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2426173002 Review-Url: https://chromiumcodereview.appspot.com/2426173002