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
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
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/+/6f726addf3178b01949bb389ef83cf14a1d7b6b2TBR=caryclark@google.com
NOTREECHECKS=true
NOTRY=true
BUG=421132
Review URL: https://codereview.chromium.org/686843002
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
Extreme implicit quartic equations solve to roots that are different
enough that they appear to have failed. In this case, fall back on
binary searching to find an intersection.
Relax the condition when this happens; don't give up just because the
computed implicit root points aren't remotely the same.
TBR=reed
BUG=skia:2808
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/456383003
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
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