History log of /external/skia/src/pathops/SkOpEdgeBuilder.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0eb6ed421ccd4f8a84ef5e5a11df73a00d210aec 16-Dec-2016 Cary Clark <caryclark@google.com> fix fuzzing empty contours squirrelly cubics

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>
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
ff11428526843d3e03feb6843bd21f2d80536415 14-Dec-2016 Cary Clark <caryclark@google.com> more simplify bugs

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>
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
7eb01e00b1a1f7c649e1e78eb3f4644033ce94ee 08-Dec-2016 Cary Clark <caryclark@google.com> simplify bug

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>
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
40f23780e7ca36818660add0faf783fda81bf0b1 06-Oct-2016 Cary Clark <caryclark@google.com> fuzzer fix

Error out when fuzzing
conditions are met.

Also, make degenerate
input line ends consistent.

TBR=reed@google.com
BUG=653452, 626164, skia:5829

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3048

Change-Id: I23a01adde9dec07b54d66ab2418b3ea0b96e4456
Reviewed-on: https://skia-review.googlesource.com/3048
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
b9ae53727b2f8b65be8365562c170940e0439611 05-Oct-2016 Cary Clark <caryclark@google.com> fix fuzz

This fix is slightly interesting; if the final
close of the contour degenerates into a zero-length
line, remove the previous line from the generated
contour.

TBR=reed@google.com
BUG=skia:5822

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3004

Change-Id: Id668d13ccf6aad9bc81d78588fc77437527a0b7b
Reviewed-on: https://skia-review.googlesource.com/3004
Reviewed-by: Cary Clark <caryclark@google.com>
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
414c4295f951d43068666b6294df15b2fd2ba85c 26-Sep-2016 caryclark <caryclark@google.com> allow conic chop to fail

Fuzzy values may cause the conic chop to fail.

Check to see if the values are all finite, and
require the caller to do the same.

R=reed@google.com
BUG=650178
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2368993002

Review-Url: https://codereview.chromium.org/2368993002
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
cc09372730301be78b9d26c1198db1584622cdd9 23-Sep-2016 caryclark <caryclark@google.com> fix msan bug in pathops

Msan and Valgrind found an uninitialized memory mistake in
pathops. This also fixes similar bugs where not all parts
of the geometry were covered in the loop iteration.

R=borenet@google.com
NOTREECHECKS=true
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2366893003

Review-Url: https://codereview.chromium.org/2366893003
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
27c015dfcf4e2b8fb1abe327cc40204e2a4f452a 23-Sep-2016 caryclark <caryclark@google.com> split tight quads and conics

Tight quads and conics may nearly fold over on themselves, confusing
coincidence against other curves. Split them at their max curvature
early on to avoid complicating later logic.

TBR=reed@google.com
BUG=skia:5131
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357353002

Review-Url: https://codereview.chromium.org/2357353002
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
eed356d281adbf93ecbd89cb23913a7861cd8578 14-Sep-2016 caryclark <caryclark@google.com> Rewriting path writer

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
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
bb51f4a3a78ecb35cc4da24d50a440f58a0f8899 23-Aug-2016 caryclark <caryclark@google.com> fix pathops fuzz

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
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
55888e44171ffd48b591d19256884a969fe4da17 18-Jul-2016 caryclark <caryclark@google.com> pathops coincidence and security rewrite

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
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
b77821c30cd07507447244271eedf4e7c615e35a 26-Apr-2016 deanm <deanm@chromium.org> pathops: Cosmetic only change, update comments around ComplexBreak().

Rename loopT to splitT and make it clearer that it is not just
self intersecting loop cubics that are split.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1921173003

Review URL: https://codereview.chromium.org/1921173003
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
6ff734b311e11ba79c0fad8602cd6e890d438cb6 04-Sep-2015 caryclark <caryclark@google.com> remove unused fields from SkOpSegment

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1322413002
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
03b03cad01628146bbb8d4f33c073bd0c77ee558 23-Apr-2015 caryclark <caryclark@google.com> working on initial winding for cubics

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
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
1049f1246e7be4ccb68001361efceb8933e6f81c 20-Apr-2015 caryclark <caryclark@google.com> Now, path ops natively intersect conics, quads, and cubics in any 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
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
54359294a7c9dc54802d512a5d891a35c1663392 26-Mar-2015 caryclark <caryclark@google.com> cumulative pathops patch

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
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
0dc4dd6dda9a7912f696b46d9c02155ec1d1ba5f 24-Mar-2015 reed <reed@google.com> Revert of pathops version two (patchset #16 id:150001 of 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
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
ccec0f958ffc71a9986d236bc2eb335cb2111119 24-Mar-2015 caryclark <caryclark@google.com> pathops version two

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
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
3f4e045b4f8b97d189162d17c85b8410e083a3af 06-Jan-2015 reed <reed@google.com> fixes for conics

- use std tolerance in edgebuilder, since the path has not been scaled-up to its super-sample size (that happens in the builder methods.

- off-by-1 fix for pathops when using the output of the conicquadder

BUG=skia:

Review URL: https://codereview.chromium.org/837023002
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
e3b61eb7997d12c5f9b844dd3af1847492d9f411 06-Jan-2015 reed <reed@google.com> Revert of use conics for ovals and roundrects (patchset #1 id:1 of https://codereview.chromium.org/817283005/)

Reason for revert:
need fix in edgebuilder+aa

Original issue's description:
> use conics for ovals and roundrects
>
> adapted from https://codereview.chromium.org/831313002/
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/2bf1c4d58b84c73c6421edcb25e3afb4971da200

TBR=reed@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/840573002
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
2bf1c4d58b84c73c6421edcb25e3afb4971da200 06-Jan-2015 reed <reed@chromium.org> use conics for ovals and roundrects

adapted from https://codereview.chromium.org/831313002/

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/817283005
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
65b427cff9cd34a06ff060d65d00cc3615d8fd94 18-Sep-2014 caryclark <caryclark@google.com> fix battlefield website by disallowing very small coordinates

also add and remove comments to document other attempts to fix this that had drawbacks

R=fmalita@chromium.org
BUG=414409

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/575553003
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
fe41b8ffff3463a1b062c4fd7315b44e278ba390 25-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> one more tsan fix

BUG=skia:2460
R=mtklein@google.com
TBR=mtklein

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/255893002

git-svn-id: http://skia.googlecode.com/svn/trunk@14382 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
8cb1daaa1e4343eb60a7c4f21c12e33de30dad64 25-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> fix minor skp-found bugs

remove globals from pathops_unittest

BUG=skia:2460
TBR=mtklein

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/239563004

git-svn-id: http://skia.googlecode.com/svn/trunk@14378 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
a2bbc6e19d5332e81784e582c290cc060f40c4c7 01-Nov-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> pathops work in progress

BUG=

Review URL: https://codereview.chromium.org/52653002

git-svn-id: http://skia.googlecode.com/svn/trunk@12089 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
570863f2e22b8ea7d7c504bd15e4f766af097df2 16-Sep-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops work in progress

path ops work in progress

BUG=

Review URL: https://codereview.chromium.org/21359002

git-svn-id: http://skia.googlecode.com/svn/trunk@11291 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
a4aced47281e085201a356ce888b92138846e9f6 09-Jul-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@9919 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
07e97fccd2d85076cd22ef411b0773ab92a18abe 08-Jul-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops work in progress

BUG=

Review URL: https://codereview.chromium.org/18058007

git-svn-id: http://skia.googlecode.com/svn/trunk@9908 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
d892bd8ba676d34d4ce4a73ac7aad88e102fad70 17-Jun-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> convert pathops to use SkSTArray where possible.

Replace SkTDArray with SkTArray and use SkSTArray when
the probable array size is known.

In a couple of places (spans, chases) the arrays are
constructed using insert() so SkTArrays can't be used for
now.

Also, add an optimization to cubic subdivide if either end
is zero or one.

BUG=

Review URL: https://codereview.chromium.org/16951017

git-svn-id: http://skia.googlecode.com/svn/trunk@9635 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
277c3f87656c44e0a651ed0dd56efa16c0ab07b4 31-May-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> bump picture version since SkPath has changed (conics)

enable conics in SkPath

git-svn-id: http://skia.googlecode.com/svn/trunk@9370 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
fa2f2a48f6822b88ab895fece1998af549c16ebe 30-May-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "add asserts to point<-->verb helpers"

This reverts commit b4775ac7b55802e87231768f002e4b42f233b0aa.

git-svn-id: http://skia.googlecode.com/svn/trunk@9347 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
7950a9eba71f65365d88021680a16f245ad3fa68 30-May-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add asserts to point<-->verb helpers

patch from issue 16153005

BUG=

Review URL: https://codereview.chromium.org/16195004

git-svn-id: http://skia.googlecode.com/svn/trunk@9344 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
66560ca776773858abfffd59974eac32c942acc3 26-Apr-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops -- handle non-finite numbers

Op() and Simplify() do nothing if the input
is non-finite. Add code and tests.
Review URL: https://codereview.chromium.org/14407006

git-svn-id: http://skia.googlecode.com/svn/trunk@8882 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
6dc7df69ae6b24c90d231e0d6a4516bf4f1aee2e 25-Apr-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops : fix empty-diff bug, op-in-place

add some debugging around reverse diff, inverse
Review URL: https://codereview.chromium.org/13851015

git-svn-id: http://skia.googlecode.com/svn/trunk@8852 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp
07393cab57ce74a4aae89a31fae9aaa9780fc19d 08-Apr-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add base types for path ops

Paths contain lines, quads, and cubics, which are
collectively curves.

To work with path intersections, intermediary curves
are constructed. For now, those intermediates use
doubles to guarantee sufficient precision.

The DVector, DPoint, DLine, DQuad, and DCubic
structs encapsulate these intermediate curves.

The DRect and DTriangle structs are created to
describe intersectable areas of interest.

The Bounds struct inherits from SkRect to create
a SkScalar-based rectangle that intersects shared
edges.

This also includes common math equalities and
debugging that the remainder of path ops builds on,
as well as a temporary top-level interface in
include/pathops/SkPathOps.h.
Review URL: https://codereview.chromium.org/12827020

git-svn-id: http://skia.googlecode.com/svn/trunk@8551 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkOpEdgeBuilder.cpp