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
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
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
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
PathOps tests internal routines direcctly. Check to make sure that
test points, lines, quads, curves, triangles, and bounds read from
arrays are valid (i.e., don't contain NaN) before calling the
test function.
Repurpose the test flags.
- make 'v' verbose test region output against path output
- make 'z' single threaded (before it made it multithreaded)
The latter change speeds up tests run by the buildbot by 2x to 3x.
BUG=
Review URL: https://codereview.chromium.org/19374003
git-svn-id: http://skia.googlecode.com/svn/trunk@10107 2bbb7eff-a529-9590-31e7-b0007b416f81
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
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
This CL depends on
https://codereview.chromium.org/12880016/
"Add intersections for path ops"
Given a path, iterate through its contour, and
construct an array of segments containing its curves.
Intersect each curve with every other curve, and for
cubics, with itself.
Given the set of intersections, find one with the
smallest y and sort the curves eminating from the
intersection. Assign each curve a winding value.
Operate on the curves, keeping and discarding them
according to the current operation and the sum of
the winding values.
Assemble the kept curves into an output path.
Review URL: https://codereview.chromium.org/13094010
git-svn-id: http://skia.googlecode.com/svn/trunk@8553 2bbb7eff-a529-9590-31e7-b0007b416f81