aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsCubicReduceOrderTest.cpp
Commit message (Collapse)AuthorAge
* fix fuzzersGravatar caryclark2016-10-20
| | | | | | | | | | | | | | | 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
* Path ops formerly found the topmost unprocessed edge and determined its ↵Gravatar caryclark2015-05-11
| | | | | | | | | | | | | | | 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
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | 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
* Get rid of DEFINE_TESTCLASS_SHORT() macro.Gravatar tfarina@chromium.org2014-01-02
| | | | | | | | | | | | | 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
* remove more unused static functionsGravatar caryclark@google.com2013-11-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12379 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unused static functionGravatar caryclark@google.com2013-11-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12378 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unused reduce order codeGravatar caryclark@google.com2013-11-25
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/85763002 git-svn-id: http://skia.googlecode.com/svn/trunk@12377 2bbb7eff-a529-9590-31e7-b0007b416f81
* path ops work in progressGravatar caryclark@google.com2013-10-02
| | | | | | | | | | | | 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
* harden and speed up path op unit testsGravatar caryclark@google.com2013-07-16
| | | | | | | | | | | | | | | | | | | 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
* path ops work in progressGravatar caryclark@google.com2013-04-15
| | | | | | | | | 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
* Add intersections for path opsGravatar caryclark@google.com2013-04-08
This CL depends on https://codereview.chromium.org/12827020/ "Add base types for path ops" The intersection of a line, quadratic, or cubic with another curve (or with itself) is found by solving the implicit equation for the curve pair. The curves are first reduced to find the simplest form that will describe the original, and to detect degenerate or special-case data like horizontal and vertical lines. For cubic self-intersection, and for a pair of cubics, the intersection is found by recursively approximating the cubic with a series of quadratics. The implicit solutions depend on the root finding contained in the DCubic and DQuad structs, and the quartic root finder included here. Review URL: https://codereview.chromium.org/12880016 git-svn-id: http://skia.googlecode.com/svn/trunk@8552 2bbb7eff-a529-9590-31e7-b0007b416f81