History log of /external/skia/src/pathops/SkPathOpsTypes.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c3cc5fa6de0a8237d9241dbf3e6c0786a9040069 07-Mar-2017 Herb Derby <herb@google.com> Move from SkChunkAlloc to SkArenaAlloc for PathOps

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>
/external/skia/src/pathops/SkPathOpsTypes.h
c0a4c4f969464ec9854d726836a430262351d63d 07-Mar-2017 Derek Sollenberger <djsollen@google.com> Revert "Move from SkChunkAlloc to SkArenaAlloc for PathOps"

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>
/external/skia/src/pathops/SkPathOpsTypes.h
38c60180241e335e368fdadbf7856aff114ff668 01-Mar-2017 Herb Derby <herb@google.com> 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>
/external/skia/src/pathops/SkPathOpsTypes.h
59d5a0e3f560da40e0ae7036a01d7d58ce3718d8 23-Jan-2017 Cary Clark <caryclark@google.com> Revert "offset angle check edge in common"

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>
/external/skia/src/pathops/SkPathOpsTypes.h
d2eb581ebc8f8009e80cccccd74d5b341ef5bd5b 18-Jan-2017 Cary Clark <caryclark@google.com> 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>
/external/skia/src/pathops/SkPathOpsTypes.h
e9f78b41c65a78400c22a1b79007b1b9e187a745 22-Nov-2016 Mike Klein <mtklein@chromium.org> Guard against buggy ucrt\math.h.

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>
/external/skia/src/pathops/SkPathOpsTypes.h
759ae5639b0dfe5a0d5491aa0e0b9855aa42ab73 18-Nov-2016 Bruce Dawson <brucedawson@google.com> Avoid runtime initialization of FLT_EPSILON_SQRT

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>
/external/skia/src/pathops/SkPathOpsTypes.h
1326068147ee60de138061a3fc1157fcfd5d017b 24-Oct-2016 caryclark <caryclark@google.com> formalize host debugging

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
/external/skia/src/pathops/SkPathOpsTypes.h
a35ab3e6e024d0b548ded26a2e3b8ecd838ead93 20-Oct-2016 caryclark <caryclark@google.com> fix fuzzers

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
/external/skia/src/pathops/SkPathOpsTypes.h
e47ae2998c1cf944db5743a416583dd0f042b6d9 05-Oct-2016 Cary Clark <caryclark@google.com> remove dead code

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>
/external/skia/src/pathops/SkPathOpsTypes.h
ab87d7abf1df007c90bef2e916294ca325d81c81 04-Oct-2016 Cary Clark <caryclark@google.com> coin debugging runs all tests in extended

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>
/external/skia/src/pathops/SkPathOpsTypes.h
30b9fdd6a1d607bde20c793af65b5e2e8a1737ca 31-Aug-2016 caryclark <caryclark@google.com> pathops coincident work

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
/external/skia/src/pathops/SkPathOpsTypes.h
29b2563afb1677515739f1d24fb27733626eca92 25-Aug-2016 caryclark <caryclark@google.com> path ops stream-lining

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
/external/skia/src/pathops/SkPathOpsTypes.h
e25a4f6cbeaccfdc34cf031103f0fbc3e53a3ee5 26-Jul-2016 caryclark <caryclark@google.com> fix fuzz bugs

Add ability for intersection template to detect that
the test contains bounded numbers so that extra
asserts can trigger.

Add some exit points for out of range numbers
in those templates.

TBR=reed@google.com
BUG=631383,631374,631360
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185703002

Review-Url: https://codereview.chromium.org/2185703002
/external/skia/src/pathops/SkPathOpsTypes.h
cdeff81bdb2e5cde422b6850634c5d3977fcbae9 22-Jul-2016 caryclark <caryclark@google.com> conic fuzz fix

If no closest section is found in conic intersection
(which can happen if the numbers are out of range)
abort the intersection.

Also suppress assert fired in this case so it only
checks intersections with in-range values.

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

Review-Url: https://codereview.chromium.org/2166813006
/external/skia/src/pathops/SkPathOpsTypes.h
1597628fa38d24f23ad505bfb40e70e7c8617457 21-Jul-2016 caryclark <caryclark@google.com> fix fuzzer bug

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
/external/skia/src/pathops/SkPathOpsTypes.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/SkPathOpsTypes.h
dae6b97705fde08958b1a36fa6ce685d28fc692c 08-Jun-2016 caryclark <caryclark@google.com> fix pathops fuzz bugs

Fail out in a couple of new places when the input data is very
large and exceeds the limits of the pathops machinery.

Most of the change here plumbs in a way to exclude an assert in
one of these exceptional cases. The current SkAddIntersection
implementation and the inner functions it calls has no way to
report an error to the root caller for an early exit, so rather
than add that in, exclude the assert when the test that would
trigger it runs (allowing the test to otherwise ensure that it
properly fails).

TBR=reed@google.com
BUG=617586,617635
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046713003

Review-Url: https://codereview.chromium.org/2046713003
/external/skia/src/pathops/SkPathOpsTypes.h
b669300a9753893ef900207c38aeff2d467764e5 16-Dec-2015 caryclark <caryclark@google.com> only call scalar finite when necessary

Mike points that the the ulps compares
rank high in path ops profiles. The
check for finite scalars is rarely
required.

Call it less by:
- specializing _pin version of compares
- checking for 0 divides up front
- handling failing cases before comparing
- casting float to double before adding

R=reed@google.com

Review URL: https://codereview.chromium.org/1522183002
/external/skia/src/pathops/SkPathOpsTypes.h
26ad22ab61539e3d3b6bc5e0da8dcebbd52a53de 16-Oct-2015 caryclark <caryclark@google.com> Enabling clip stack flattening exercises path ops.
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
/external/skia/src/pathops/SkPathOpsTypes.h
d4349723fac9c0fd4dcf8c275fb7c756bdfdff7b 23-Jul-2015 caryclark <caryclark@google.com> fix path ops fuzz buster

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
/external/skia/src/pathops/SkPathOpsTypes.h
27c8eb8ffd7e221693d840c2b9279d53fe6f03d4 06-Jul-2015 caryclark <caryclark@google.com> When three or more edges are coincident, the logic needs
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
/external/skia/src/pathops/SkPathOpsTypes.h
4e1a4c9399b8bb0897218f3ec10c254d3bb97463 18-May-2015 caryclark <caryclark@google.com> fix builder winding again

Record the nesting level when finding the edge winding contribution
so that inner edges can be reversed as needed.

R=fmalita@chromium.org
BUG=skia:3838

Review URL: https://codereview.chromium.org/1140383002
/external/skia/src/pathops/SkPathOpsTypes.h
5b5ddd73b4baf22752924bf20d097e96236c36f8 18-May-2015 caryclark <caryclark@google.com> The path ops builder code needs to determine the winding of each contour 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
/external/skia/src/pathops/SkPathOpsTypes.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/SkPathOpsTypes.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/SkPathOpsTypes.h
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/SkPathOpsTypes.h
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/SkPathOpsTypes.h
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/SkPathOpsTypes.h
65f553182ab7069378ef863d30094d0327f178d0 13-Nov-2014 caryclark <caryclark@google.com> 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

Review URL: https://codereview.chromium.org/633393002
/external/skia/src/pathops/SkPathOpsTypes.h
27c46a08a9210e9306b8ea1b00349ec198153c38 28-Oct-2014 hcm <hcm@google.com> Revert of harden pathops for pathological test (patchset #19 id:410001 of 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
/external/skia/src/pathops/SkPathOpsTypes.h
6f726addf3178b01949bb389ef83cf14a1d7b6b2 28-Oct-2014 caryclark <caryclark@google.com> 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

Review URL: https://codereview.chromium.org/633393002
/external/skia/src/pathops/SkPathOpsTypes.h
dac1d17027dcaa5596885a9f333979418b35001c 17-Jun-2014 caryclark <caryclark@google.com> Enabling the canvas bit to turn the clip stack into a flat replace exposed 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
/external/skia/src/pathops/SkPathOpsTypes.h
2db7fe7d3b7ee875e1099a22f0af17520696f5d7 07-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> When solving the cubic line intersection directly fails, use binary search as a fallback.

The cubic line intersection math empirically works 99.99% of the time (fails 3100 out of 1B random tests) but when it fails, an intersection may be missed altogether.

The binary search is may not find a solution if the cubic line failed to find any solutions at all, but so far that case hasn't arisen.

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

Author: caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14614 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkPathOpsTypes.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/SkPathOpsTypes.h
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/SkPathOpsTypes.h
7eaa53d8f7e48fd17d02b5e3bd91f90e9c1899ef 02-Oct-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops work in progress

make more skps work

remove edit files

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11570 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkPathOpsTypes.h
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/SkPathOpsTypes.h
330313a8a8343876ee596da39da06a5d69badd9c 22-Aug-2013 mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> My clang now doesn't complain about !"foo".

BUG=
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10874 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkPathOpsTypes.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/SkPathOpsTypes.h
fa2aeee27af27f2934ee52a9732148f66481fb03 15-Jul-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops near exact

Modify line intersections to first
- match exact ends
- compute intersections
- match near ends
where the exact ends are preferred, then near matches, then
computed matches. This pulls matches towards existing end points
when possible, and keeps intersection distances consistent with
different line/line line/quad and line/cubic computations.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10073 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkPathOpsTypes.h
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/SkPathOpsTypes.h
cffbcc3b9665f2c928544b6fc6b8a0e22a4210fb 04-Jun-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops -- rewrite angle sort

This is a major change resulting from a minor
tweak. In the old code, the intersection point
of two curves was shared between them, but the
intersection points and end points of sorted edges was
computed directly from the intersection T value.

In this CL, both intersection points and sorted points
are the same, and intermediate control points are computed
to preserve their slope.

The sort itself has been completely rewritten to be more
robust and remove 'magic' checks, conditions that empirically
worked but couldn't be rationalized.

This CL was triggered by errors generated computing the clips
of SKP files. At this point, all 73M standard tests work and
at least the first troublesome SKPs work.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9432 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkPathOpsTypes.h
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/SkPathOpsTypes.h
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/SkPathOpsTypes.h
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/SkPathOpsTypes.h
c3f63570c35a1e2bc84b33906c6401d6f3062bf2 23-Apr-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops : enable optimizations

this addresses a few FIXME issues
- speed up implicit quad computation
- use ulps instead of epsilon
- assert on bad line results more often

git-svn-id: http://skia.googlecode.com/svn/trunk@8823 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkPathOpsTypes.h
3b97af5add04489d57c7926ba6dc6f0013daf40f 23-Apr-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops -- use standard max, min, double-is-nan

fix a comment or two as well
Review URL: https://codereview.chromium.org/13934009

git-svn-id: http://skia.googlecode.com/svn/trunk@8822 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/pathops/SkPathOpsTypes.h
0361032c0b53401030a720bc8b4930c3ec59f19e 18-Apr-2013 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> path ops work in progress

fix bugs in tests on 32 bit release

Most changes revolve around pinning computed t values
very close to zero and one.

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