aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathTest.cpp
Commit message (Collapse)AuthorAge
...
* Mark overridden destructors with 'override' and remove 'virtual'Gravatar Brian Salomon2017-03-22
| | | | | | | | | This silences a new warning in clang 5.0 Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8 Reviewed-on: https://skia-review.googlesource.com/10006 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* hide trivial helpers on canvasGravatar Mike Reed2017-02-22
| | | | | | | | | BUG=skia: Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef Reviewed-on: https://skia-review.googlesource.com/8852 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* stop using SkScalarMulGravatar Mike Reed2017-02-14
| | | | | | | | | BUG=skia: Change-Id: Ie41d8665a1c62ba8eddc93d8cfefaf64ddc52ff8 Reviewed-on: https://skia-review.googlesource.com/8411 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
* expose new tight-bounds method on SkPathGravatar Mike Reed2017-02-03
| | | | | | | | | BUG=skia: Change-Id: Ie50df49c1758af203042a84dc2cd505046373d2c Reviewed-on: https://skia-review.googlesource.com/7996 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* experimental tight-boundsGravatar Mike Reed2017-02-03
| | | | | | | | | | | | | not sure about api -- perhaps it could just return the bounds, and make them 0,0,0,0 if the path is empty -- the caller can trivially know if the path is empty themselves. BUG=skia: Change-Id: I2dbb861e8d981b27c5a6833643977f5bd6802217 Reviewed-on: https://skia-review.googlesource.com/7989 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* give up on big cubics (for now) and just draw a lineGravatar Mike Reed2017-01-27
| | | | | | | | | BUG=683631, skia:6152 Change-Id: I69aa741af74a37e1d7bed25ad0401535599f6af0 Reviewed-on: https://skia-review.googlesource.com/7659 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* add test for big cubic -- currently disabledGravatar Mike Reed2017-01-26
| | | | | | | | | BUG=skia: Change-Id: Ief11a1e54d427b1241b47f3cfab5b44fb656443a Reviewed-on: https://skia-review.googlesource.com/7607 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* conservativelyContainsRect is assertingGravatar Mike Reed2017-01-24
| | | | | | | | | BUG=skia:6156 Change-Id: Iea571f001e9a4c4e70313c1bd49fb4e3c598869a Reviewed-on: https://skia-review.googlesource.com/7423 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* make SkPath::conservativelyContainsRect consume degenerate segmentsGravatar Lee Salzman2017-01-23
| | | | | | | | | BUG=skia: Change-Id: I3a39318bceaf6c95a50d84961d93af4ba62550e3 Reviewed-on: https://skia-review.googlesource.com/6900 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* SkTypes.h : move SkAutoMalloc into SkAutoMalloc.hGravatar Hal Canary2017-01-11
| | | | | | | | | | | | | | | | * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr). * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);" Revert "Revert 'SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h'" This reverts commit c456b73fef9589bbdc5eb83eaa83e53c357bb3da. Change-Id: Ie2c1a17c20134b8ceab85a68b3ae3e61c24fbaab Reviewed-on: https://skia-review.googlesource.com/6886 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h"Gravatar Kevin Lubick2017-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a5494f117086d712855e4b6289c58c92d1549bcf. Reason for revert: Broke Google3 Original change's description: > SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h > > * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr). > > * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h > > * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);" > > Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88 > Reviewed-on: https://skia-review.googlesource.com/4543 > Reviewed-by: Ben Wagner <bungeman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> > TBR=halcanary@google.com,bungeman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ie8bd176121c3ee83c110d66c0d0ac65e09bfc9c5 Reviewed-on: https://skia-review.googlesource.com/6884 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* SkTypes.h : move SkAutoMalloc into SkAutoMalloc.hGravatar Hal Canary2017-01-11
| | | | | | | | | | | | | | * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr). * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);" Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88 Reviewed-on: https://skia-review.googlesource.com/4543 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* validate deserialized path verbsGravatar Mike Reed2017-01-03
| | | | | | | | | BUG=676755 Change-Id: Ie9bd70d3a130c53737756587f73c9dce4a6bcb6d Reviewed-on: https://skia-review.googlesource.com/6529 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* dump path fill type with dataGravatar Cary Clark2016-12-16
| | | | | | | | | | | | | | | | | SkPath::dump() and SkPath::dumpHex() dump the fill type in addition to the data so that the original path can be faithfully reconstructed. This may be a small part of why some error cases aren't reproduced. R=reed@google.com BUG=skia:6041 Change-Id: Ice86bf08ea907a6b87ceef182a9316a3c979af0b Reviewed-on: https://skia-review.googlesource.com/6185 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Add the missing shift to the dyGravatar Yuqian Li2016-11-29
| | | | | | | | | | | | | | This is identical to https://skia-review.googlesource.com/c/5266/ except for the SK_ANALYTIC_AA_GUARD flag. BUG=chromium:668907 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5302 Change-Id: I3fc225a925d21fe615c46a4a0be7fe33c5790766 Reviewed-on: https://skia-review.googlesource.com/5302 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Use AdditiveBlitter for partial rowsGravatar Yuqian Li2016-11-29
| | | | | | | | | | | | Previously, we forgot to use AdditiveBlitter in two places where partial rows are blitterred. That causes SkAAClip to complain as in skia:6003. BUG=skia:6003 Change-Id: I4f4a896072448bdb3f287a2eb61cb64b1256ea78 Reviewed-on: https://skia-review.googlesource.com/5273 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Compute slope using fSnappedYGravatar Yuqian Li2016-11-29
| | | | | | | | | | | | | | If we use the oldy and dy directly as we did previously, the slope could be very different from (newSnappedX - fSnappedX) / (newSnappedY - fSnappedY) in the updateLine when the edge made a lot of updates with small dy but large dx. That will cause bug skia:5995 BUG=skia:5995 Change-Id: If521976ed87195dfea5961afd58bedb98447c568 Reviewed-on: https://skia-review.googlesource.com/5269 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Revert "Add the missing shift to the dy"Gravatar Yuqian Li2016-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dd13c020793b0a7fb2ac1f22024e9fb91ea483ef. Reason for revert: this breaks the Chromium DEPS roll as we break the layout_tests. I'll add a flag to guard the change in the future and enable the flag while change the layout_tests. Original change's description: > Add the missing shift to the dy > > BUG=chromium:668907 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5266 > > Change-Id: I6d3e56ffc149fbeac6f7a2df740542abbf84dac8 > Reviewed-on: https://skia-review.googlesource.com/5266 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> > TBR=mtklein@chromium.org,caryclark@google.com,liyuqian@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ifd5aa50f155c3ebe2f1495cbf3b8dd706211a639 Reviewed-on: https://skia-review.googlesource.com/5286 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* Add the missing shift to the dyGravatar Yuqian Li2016-11-28
| | | | | | | | | | | BUG=chromium:668907 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5266 Change-Id: I6d3e56ffc149fbeac6f7a2df740542abbf84dac8 Reviewed-on: https://skia-review.googlesource.com/5266 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Fix mask overflow caused by edge driftGravatar Yuqian Li2016-11-16
| | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4797 Change-Id: Ica1568b67c1e1ce4aae2bdaba2c5b1f2155d1382 Reviewed-on: https://skia-review.googlesource.com/4797 Reviewed-by: Cary Clark <caryclark@google.com>
* Tighten SkAAClip Bounds by Path BoundsGravatar liyuqian2016-11-11
| | | | | | | | | | | | | This bug chromium:662780 exists after our original fix (https://codereview.chromium.org/2477393002/) because this path (added in unit test) is calling blitAntiRect rather than blitAntiH when the path is drifted across the boundary. (The quadratic edge drifts across the boundary after an update and sets a dX=0 line segment which triggers blitAntiRect.) Note that I didn't assert for the dLeft = dRite = 0 case because the left/right there won't drift after the SkTMin/SkTMax in line 964/966. Theoretically we can revert the relaxation in https://codereview.chromium.org/2477393002/ (that's only a relaxation for analytic AA, not supersampled AA). However, consider that the initial landing of analytic AA is so painful, I decide to revert that relaxation only after our successful landing... BUG=chromium:662780, chromium:662862 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2482193004 Review-Url: https://codereview.chromium.org/2482193004
* Catch width overflowGravatar Yuqian Li2016-11-11
| | | | | | | | | | | BUG=chromium:662730 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4628 Change-Id: Iaf3a30d39fda3166a6f8fc62a30580629418dc88 Reviewed-on: https://skia-review.googlesource.com/4628 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Do not call blitV with 0 heightGravatar liyuqian2016-11-09
| | | | | | | | | This is causing SkAAClipBlitter to crash. BUG=chromium:662952 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2485243002 Review-Url: https://codereview.chromium.org/2485243002
* Fix quad convexity with only one backward dirGravatar liyuqian2016-11-03
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2465253008 Review-Url: https://codereview.chromium.org/2465253008
* Remove SkAutoTUnref and SkAutoTDelete from public includes.Gravatar bungeman2016-10-27
| | | | | | | | | | | | | | | This also makes the required changed to src, tests, and tools. The few public APIs modified by this change appear to be unused outside of Skia. Removing these from the public API makes it easier to ensure users are no longer using them. This also updates GrGpu::wrapBackendXXX and the ::onWrapBackendXXX methods to clarify ownership. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2448593002 Review-Url: https://codereview.chromium.org/2448593002
* Reland of ix for conic fuzz (patchset #1 id:1 of ↵Gravatar caryclark2016-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2361473004/ ) Reason for revert: Landed suppression in Chrome's LayoutTests/TestExpectations Original issue's description: > Revert of fix for conic fuzz (patchset #3 id:40001 of https://codereview.chromium.org/2350263003/ ) > > Reason for revert: > See if this fixes the layout tests. > > Original issue's description: > > fix for conic fuzz > > > > A fuzzer generates a conic that hangs when drawn. > > The quads that approximate the conics move up and down > > in y, confusing the renderer. > > > > This fix ensures that the split conic maintains the > > same y direction as the original conic. > > > > R=reed@google.com > > BUG=647922 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350263003 > > > > Committed: https://skia.googlesource.com/skia/+/ac78863acdef4b428aaf66985b80c76d1be0fdea > > TBR=reed@google.com > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=647922 > > Committed: https://skia.googlesource.com/skia/+/08b345588414b861af8a55950e7dc21a1bd85a28 TBR=reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=647922 Review-Url: https://codereview.chromium.org/2359253002
* Revert of fix for conic fuzz (patchset #3 id:40001 of ↵Gravatar caryclark2016-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2350263003/ ) Reason for revert: See if this fixes the layout tests. Original issue's description: > fix for conic fuzz > > A fuzzer generates a conic that hangs when drawn. > The quads that approximate the conics move up and down > in y, confusing the renderer. > > This fix ensures that the split conic maintains the > same y direction as the original conic. > > R=reed@google.com > BUG=647922 > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350263003 > > Committed: https://skia.googlesource.com/skia/+/ac78863acdef4b428aaf66985b80c76d1be0fdea TBR=reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=647922 Review-Url: https://codereview.chromium.org/2361473004
* fix for conic fuzzGravatar caryclark2016-09-22
| | | | | | | | | | | | | | | A fuzzer generates a conic that hangs when drawn. The quads that approximate the conics move up and down in y, confusing the renderer. This fix ensures that the split conic maintains the same y direction as the original conic. R=reed@google.com BUG=647922 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350263003 Review-Url: https://codereview.chromium.org/2350263003
* change SkStreams to work with sk_sp<SkData> instead of SkData*Gravatar reed2016-09-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333713002 Review-Url: https://codereview.chromium.org/2333713002
* compare degenerates with toleranceGravatar caryclark2016-09-06
| | | | | | | | | | | | | | | | | | | Conics with very large w values can be approximated with two straight lines. This avoids iterating endlessly in an attempt to create quadratics with unstable numerics. Check to see if the first chop generated a pair of lines within the default point comparison tolerance. R=reed@google.com BUG=643933, 643665 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2312923002 Review-Url: https://codereview.chromium.org/2312923002
* fix conic path fuzzGravatar caryclark2016-08-23
| | | | | | | | | | | | The test conic has a very large weight, so it reduces to a pair of lines. Detect this case rather than subdividing the conic so much that the answers are meaningless. R=herb@google.com, reed@google.com BUG=638223 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268073004 Review-Url: https://codereview.chromium.org/2268073004
* move private test for sect_with_horizontal into unittestsGravatar reed2016-08-17
| | | | | | | BUG=638575 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250353004 Review-Url: https://codereview.chromium.org/2250353004
* Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.Gravatar bungeman2016-08-02
| | | | | | | This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004 Review-Url: https://codereview.chromium.org/2206633004
* Fix misdetection of rectangles in SkPath::IsSimpleClosedRect.Gravatar bsalomon2016-07-24
| | | | | | | BUG=chromium:630369 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175923002 Review-Url: https://codereview.chromium.org/2175923002
* re-chop if we fail on a big-bad-cubicGravatar reed2016-07-20
| | | | | | | BUG=629455 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2159223005 Review-Url: https://codereview.chromium.org/2159223005
* handle large conic weightsGravatar reed2016-07-13
| | | | | | | BUG=627414 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142393003 Review-Url: https://codereview.chromium.org/2142393003
* SkLeanWindows.h: #include "Windows.h" fewer placesGravatar halcanary2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | $ git grep -l '<windows.h>' include src include/private/SkLeanWindows.h $ git grep -l SkLeanWindows.h | grep '\.h$' include/ports/SkTypeface_win.h include/utils/win/SkHRESULT.h include/utils/win/SkTScopedComPtr.h include/views/SkEvent.h src/core/SkMathPriv.h src/ports/SkTypeface_win_dw.h src/utils/SkThreadUtils_win.h src/utils/win/SkWGL.h The same for `#include <intrin.h>` that was found in SkMath.h. Those functions that needed it are moved to SkMathPriv.h. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041943002 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng Review-Url: https://codereview.chromium.org/2041943002
* Add a test to ensure that a case where SkCubicClipper::ChopMonoAtY returns ↵Gravatar mbarbella2016-06-01
| | | | | | | | | | | false is handled properly. Also fixes a style issue in the fix for the issue being tested. BUG=chromium:613918 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2021343004 Review-Url: https://codereview.chromium.org/2021343004
* Add SkPathPriv::IsSimpleClosedRectGravatar bsalomon2016-06-01
| | | | | | | | This function looks for "simple" rect paths. Simple here means begins and ends at a corner and is closed (either manually or with a close verb). Unlike SkPath::isRect this returns the starting point index (using the same start indexing scheme as SkPath::addRect). GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2017313002 Review-Url: https://codereview.chromium.org/2017313002
* Fix bug where SkPath will convert an arc to an oval and change the starting ↵Gravatar bsalomon2016-05-31
| | | | | | | | | point. Adds unit tests to test the behavior of addArc to oval conversions. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2017743002 Review-Url: https://codereview.chromium.org/2017743002
* Make SkPath::isOval() and SkPath::isRRect return the orientation and ↵Gravatar bsalomon2016-05-27
| | | | | | | | | | | starting index. These are tracked in SkPathRef. Unit tests are updated to test that the returned values are correct. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2012233002 Review-Url: https://codereview.chromium.org/2012233002
* switch surface to sk_spGravatar reed2016-03-23
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1817383002
* add interp pathGravatar caryclark2016-02-18
| | | | | | | | | | | Add path methods to determine if a pair of paths can be interpolated, and to interpolate them. R=reed@google.com, robertphillips@google.com BUG=skia:4549 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1703943003 Review URL: https://codereview.chromium.org/1703943003
* Add SkPath::isLastContourClosed()Gravatar fs2016-01-20
| | | | | | | | | | | | | | Adds a simple method for checking if the last command/verb in the current contour is a 'close'. This will simplify determining "closedness" for blink::Path, and aid in the implementation of algorithms such as: https://drafts.fxtf.org/motion-1/#motion-processing (second item in list) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1601103006 Review URL: https://codereview.chromium.org/1601103006
* fix nexus playerGravatar caryclark2016-01-05
| | | | | | | | | | | The path contains test has such large numbers that it is indeterminate whether it will return true or false. Allow either result, ensuring that the test itself doesn't crash. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1565463002 Review URL: https://codereview.chromium.org/1565463002
* give up on quad root if infiniteGravatar caryclark2016-01-05
| | | | | | | | | | | | SkPath::contains() uses SkFindUnitQuadRoots to see which side of a curve a point is on. If the intermediate exceeds a float, return no found root. R=reed@google.com BUG=572406 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556353002 Review URL: https://codereview.chromium.org/1556353002
* fix bugs in path containsGravatar caryclark2015-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull out the logic to check to see if the point is on the edge so all curve types can share. Reorder cubic to be like conic and quad so that mixed types consider the curves consistently. Don't count on curve points twice if they are on the end and compute a zero cross product. Remove logic that checks, when there are no roots, if the point is closer to the top or the bottom (it's always the top). Initialize the iterator correctly when it is accessing the list of on point curves. Use 'multiply' instead of 'subtract' to see if the vectors are pointing in opposite directions. Add more test cases. R=reed@google.com,fs@opera.com BUG=skia:4265 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1532003004 Review URL: https://codereview.chromium.org/1532003004
* Use the unswapped end point y for early out case in winding_lineGravatar fs2015-12-17
| | | | | | | | | | The x-coordinates are not swapped, so using the swapped y will result in a comparison with the wrong (end) point. BUG=skia:4265 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533873002 Review URL: https://codereview.chromium.org/1533873002
* If a point is on a path edge, it's in the path, at least for all cases where ↵Gravatar caryclark2015-12-14
| | | | | | | | | | | the path edge is not canceled with another edge through coincidence. Add test cases for edges and conics, and make sure it all works. R=reed@google.com BUG=skia:4669,4265 Review URL: https://codereview.chromium.org/1517883002
* Comments Style: s/skbug.com/bug.skia.org/Gravatar halcanary2015-11-07
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1432503003 Review URL: https://codereview.chromium.org/1432503003