Commit Graph

24 Commits

Author SHA1 Message Date
caryclark
dac1d17027 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
2014-06-17 05:15:38 -07:00
commit-bot@chromium.org
efaf53ba24 remove unused tests to fix new clang build
R=mtklein@google.com

Author: caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14237 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-17 15:18:21 +00:00
skia.committer@gmail.com
a1ed7aec95 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@14196 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-15 03:04:18 +00:00
commit-bot@chromium.org
4431e7757c 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
2014-04-14 17:08:59 +00:00
commit-bot@chromium.org
e2eac8b2fd Move macros from TestClassDef.h to Test.h
Motivation: those macros don't make any sense without the definitions
in Test.h.

BUG=
R=mtklein@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-14 21:04:37 +00:00
tfarina@chromium.org
78e7b4e1b9 Get rid of DEFINE_TESTCLASS_SHORT() macro.
Instead tests should be written using DEF_TEST() macro, which is much
nicer and simplifies the process of setting up an unit test.

BUG=None
TEST=skpskgr_test, pathops_unittest
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12870 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-02 21:45:03 +00:00
mtklein@google.com
6e223af090 I feel like my clang is especially sensitive to unused variables.
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12369 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-22 20:43:54 +00:00
commit-bot@chromium.org
866f4e34a9 optimize pathops coverage
Remove unused code from SkOpSegment.cpp and friends.
Add new tests exposed by coverage.
Fix a bug exposed by coverage -- removing the need to detect points that are nearby when intersecting.
Add gyp rule for building coverage flavor on Mac.

R=mtklein@google.com

Author: caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12344 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 17:04:29 +00:00
commit-bot@chromium.org
4b7d673089 More clang warning fixes.
Mostly unused functions and variables removed.

BUG=None
TEST=ninja -C out/Debug most
     ninja -C out/Release most

R=bsalomon@google.com, caryclark@google.com, robertphillips@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11884 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 16:41:00 +00:00
caryclark@google.com
570863f2e2 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
2013-09-16 15:55:01 +00:00
caryclark@google.com
4fdbb22964 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
2013-07-23 15:27:41 +00:00
caryclark@google.com
8d0a524a48 harden and speed up path op unit tests
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
2013-07-16 16:11:16 +00:00
caryclark@google.com
07e97fccd2 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
2013-07-08 17:17:02 +00:00
skia.committer@gmail.com
8f6ef4010f Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9440 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-05 07:01:06 +00:00
caryclark@google.com
20d5461df7 path ops -- try to fix build again
Review URL: https://codereview.chromium.org/15994019

git-svn-id: http://skia.googlecode.com/svn/trunk@9434 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-04 18:30:02 +00:00
caryclark@google.com
4b66f367b4 path ops work in progress
do not check in

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9433 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-04 18:14:11 +00:00
caryclark@google.com
cffbcc3b96 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
2013-06-04 17:59:42 +00:00
reed@google.com
277c3f8765 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
2013-05-31 15:17:50 +00:00
reed@google.com
fa2f2a48f6 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
2013-05-30 15:29:48 +00:00
reed@google.com
7950a9eba7 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
2013-05-30 14:57:55 +00:00
caryclark@google.com
a5e55925ea path ops -- fix skp bugs
This fixes a series of bugs discovered by running
the small set of Skia skp files through pathops
to flatten the clips.
Review URL: https://codereview.chromium.org/14798004

git-svn-id: http://skia.googlecode.com/svn/trunk@9042 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-07 18:51:31 +00:00
caryclark@google.com
b3f0921fba shape ops work in progress
Try to fix the 32 bit build by making some math
decisions more robust.

Rewrite the cubic intersection special case that 
detects if only end points are shared.

Rewrite the angle sort setup that computes whether
a cubic bends to the left or right.

git-svn-id: http://skia.googlecode.com/svn/trunk@8726 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-17 15:49:16 +00:00
skia.committer@gmail.com
7841c63136 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8693 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-16 07:01:17 +00:00
caryclark@google.com
ad65a3e5fb path ops work in progress
standardize tests
use SK_ARRAY_COUNT everywhere
debug why x87 differs from SIMD 64
various platform specific fixes

git-svn-id: http://skia.googlecode.com/svn/trunk@8689 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-15 19:13:59 +00:00