aboutsummaryrefslogtreecommitdiff
path: root/tests/PathOpsDVectorTest.cpp
AgeCommit message (Collapse)Author
2023-01-03Use skvx instead of SkDVector in Path/PathBuilderKevin Lubick
We would like to remove the dependency of SkPath on SkPathops. Remaining dependencies: - SkGeometry.cpp - SkGlyph.cpp While working on this, I broke something and the Paths tests started to fail. I found those hard to understand and debug, so I ported some of the failing ones over to PathBuilder (which does not have as comprehensive of tests). I figured out what I was doing wrong and what those failing tests were for. See the additional documentation in SkPath.cpp and SkPathBuilder.cpp This adds some new static methods to skvx, along with unit tests for them. Because I was comparing functionality between skvx and SkDVector, I added some tests to the latter for an apples to apple comparison. Change-Id: I8aa43ed021949ccf1015b2dedf26a52b59d15860 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/621198 Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-10-17[includes] Fix includes on tests/Kevin Lubick
Not included tests/graphite and tests/sksl Most of these changes are mechanical, except for: - include/gpu/dawn/GrDawnTypes.h to mark Dawn headers as exported (seems like the intent). - tests/DeferredDisplayListTest.cpp absorbing tests from tests/VkProtectedContextTest.cpp to avoid two test files from having a dependency on one another. The follow-on CL enforces IWYU on these files. Change-Id: I09138827001f28cbe0a9e52ac1025d4e547be644 Bug: skia:13052 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/589402 Reviewed-by: Ben Wagner <bungeman@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com>
2022-06-27Replace SK_ARRAY_COUNT with std::size() for skia/testsHerb Derby
Change-Id: I4f0321dbf5c03adc7219ca2cfb6dbfbbaecc1e4f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553582 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: John Stiles <johnstiles@google.com>
2019-04-24rewrite includes to not need so much -IfooMike Klein
Current strategy: everything from the top Things to look at first are the manual changes: - added tools/rewrite_includes.py - removed -Idirectives from BUILD.gn - various compile.sh simplifications - tweak tools/embed_resources.py - update gn/find_headers.py to write paths from the top - update gn/gn_to_bp.py SkUserConfig.h layout so that #include "include/config/SkUserConfig.h" always gets the header we want. No-Presubmit: true Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-04-24Compile with latest clang 7.Ben Wagner
Changes to warnings in clang introduced by https://reviews.llvm.org/D43322 and https://reviews.llvm.org/D44883 cause warning as error failures when building Skia. In particular this addresses return-std-move-in-c++11 and self-assign-overloaded. Change-Id: I680318098d8af1b64fba464585c7cdfcfcf39d66 Reviewed-on: https://skia-review.googlesource.com/123582 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
2015-05-11Path ops formerly found the topmost unprocessed edge and determined its ↵caryclark
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
2014-01-14Move macros from TestClassDef.h to Test.hcommit-bot@chromium.org
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-02Get rid of DEFINE_TESTCLASS_SHORT() macro.tfarina@chromium.org
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
2013-07-16harden and speed up path op unit testscaryclark@google.com
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-04-15path ops work in progresscaryclark@google.com
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-08Add base types for path opscaryclark@google.com
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