History log of /external/skia/src/pathops/SkPathOpsCurve.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/SkPathOpsCurve.h
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/SkPathOpsCurve.h
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/src/pathops/SkPathOpsCurve.h
624637cc8ec22c000409704d0b403ac1b81ad4b0 11-May-2015 caryclark <caryclark@google.com> Path ops formerly found the topmost unprocessed edge and determined its 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
/external/skia/src/pathops/SkPathOpsCurve.h
aec251012542e971100e218bf463adbfb5d21d20 29-Apr-2015 caryclark <caryclark@google.com> minor fixes to cubics code and overall alignment of how bounds and tops are 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
/external/skia/src/pathops/SkPathOpsCurve.h
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/SkPathOpsCurve.h
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/SkPathOpsCurve.h
4431e7757cfcb8cfa99535eed0e9f156dabf95c2 14-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Mike R: please sanity check SkPostConfig.h
Mike K: please sanity check Test.cpp and skia_test.cpp

Feel free to look at the rest, but I don't expect any in depth review of path ops innards.

Path Ops first iteration used QuickSort to order segments radiating from an intersection to compute the winding rule.

This revision uses a circular sort instead. Breaking out the circular sort into its own long-lived structure (SkOpAngle) allows doing less work and provides a home for caching additional sorting data.

The circle sort is more stable than the former sort, has a robust ordering and fewer exceptions. It finds unsortable ordering less often. It is less reliant on the initial curve tangent, using convex hulls instead whenever it can.

Additional debug validation makes sure that the computed structures are self-consistent. A new visualization tool helps verify that the angle ordering is correct.

The 70+M tests pass with this change on Windows, Mac, Linux 32 and Linux 64 in debug and release.

R=mtklein@google.com, reed@google.com

Author: caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14183 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkPathOpsCurve.h
4fdbb229649caf74e5c1b55a1823926df903af34 23-Jul-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> turn off debugging printfs

fix pathops issues 1417, 1418

be more rigorous about pulling intersections of lines to end points
rewrite cubic/line and quad/line intersections to share style

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10270 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkPathOpsCurve.h
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/SkPathOpsCurve.h