aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPath.cpp
Commit message (Collapse)AuthorAge
* fix deserialization after FirstDirection change to pathsGravatar reed2015-06-11
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1185453003
* SkPath::Direction serves two masters:Gravatar reed2015-06-10
| | | | | | | | | | | | | - input param to addFoo (e.g. addRect), where only CW or CCW are valid) - output param from computing functions, that sometimes return kUnknown This CL's intent is to split these into distinct enums/features: - Direction (public) loses kUnknown, and is only used for input - FirstDirection (private) is used for computing the first direction we see when analyzing a contour BUG=skia: Review URL: https://codereview.chromium.org/1176953002
* simplify RawIter - don't return a pt in kCloseGravatar reed2015-05-27
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1156893003
* simplify RawIterGravatar reed2015-05-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1137783006
* Fix build warning: 'this' pointer cannot be null in well-defined C++ code; ↵Gravatar dongseong.hwang2015-04-30
| | | | | | comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare] Review URL: https://codereview.chromium.org/1109933003
* Fix build warning: reference cannot be bound to dereferenced null pointer in ↵Gravatar dongseong.hwang2015-04-30
| | | | | | well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare] Review URL: https://codereview.chromium.org/1110353003
* minor fixes to cubics code and overall alignment of how bounds and tops are ↵Gravatar caryclark2015-04-29
| | | | | | | | | | | | computed for all curve types 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
* Now, path ops natively intersect conics, quads, and cubics in any ↵Gravatar caryclark2015-04-20
| | | | | | | | | | | combination. There are still a class of cubic tests that fail and a handful of undiagnosed failures from skps and fuzz tests, but things are much better overall. 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
* change isNestedRect to isNestedFillRectGravatar caryclark2015-04-08
| | | | | | | | | R=reed@google.com, bsalomon@google.com Let isNested(Fill)Rect return true if drawn path describes filled rectangles. Review URL: https://codereview.chromium.org/1073473002
* remove SK_SUPPORT_LEGACY_ARCTO_QUADS codeGravatar reed2015-03-20
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1023103004
* Remove SK_SUPPORT_LEGACY_ADDOVALGravatar fmalita2015-03-09
| | | | | | | | | The flad has been retired from Chromium. BUG=chromium:458898 R=reed@google.com Review URL: https://codereview.chromium.org/994533002
* add double precision convex testGravatar caryclark2015-03-02
| | | | | | BUG=389050 Review URL: https://codereview.chromium.org/975523002
* treat backwards quads as not convexGravatar caryclark2015-03-02
| | | | | | | | | | If a quad, cubic, or conic goes back on itself, assume it's not convex. In a future CL, we could check to see if the curve is linear so that linear curves are treated the same as lines. BUG=skia:3469 Review URL: https://codereview.chromium.org/971773002
* fuzzer fixesGravatar caryclark2015-02-25
| | | | | | | | | | | | | | | | | | | Fix path bugs exposed by the path fuzzer. Changes to existing gm and samplecode files defer their calls to construct SkPath objects until the first draw instead of at test initialization. Add an experimental call to SkPath to validate the internal SkPathRef. Fix SkPath::addPoly to set the last moveto after adding a close verb. Fix stroke to handle failures when computing the unit normal. Add a unit test for the unit normal failure. R=reed@google.com Review URL: https://codereview.chromium.org/953383002
* Reset conicWeights in SkPath::consumeDegenerateSegments when rewinding to ↵Gravatar robertphillips2015-02-23
| | | | | | | | | | | | last Move op Without this patch the iterator can end up running off the end of the conic weights if there is a mixture of degenerate and non-degenerate ops Note: we might want to suppress the generation of degenerate conics and lines in SkPath::addRRect BUG=459897 Review URL: https://codereview.chromium.org/954453003
* add gm for path-arcs, and catch degenerate arc in conic-caseGravatar reed2015-02-17
| | | | | | BUG=skia:3428 Review URL: https://codereview.chromium.org/931183002
* Remove SK_SUPPORT_LEGACY_ADDRRECTGravatar fmalita2015-02-17
| | | | | | | | | The flag is no longer used in Chromium. BUG=458898 R=reed@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/929173002
* Remove android specific srcPath from SkPathGravatar djsollen2015-02-17
| | | | Review URL: https://codereview.chromium.org/926693002
* use conics for arcToGravatar reed2015-02-09
| | | | | | | | guarded by SK_SUPPORT_LEGACY_ARCTO_QUADS BUG=skia: Review URL: https://codereview.chromium.org/892703002
* share code between arcTo and addArc, update doxGravatar reed2015-01-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/863123005
* reorg some path routines, preparing to switch arcs to conicsGravatar reed2015-01-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/887783002
* use conics for ovals and roundrectsGravatar reed2015-01-06
| | | | | | | | | This reverts commit e3b61eb7997d12c5f9b844dd3af1847492d9f411. BUG=skia: TBR= Review URL: https://codereview.chromium.org/834303002
* Revert of use conics for ovals and roundrects (patchset #1 id:1 of ↵Gravatar reed2015-01-06
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/817283005/) Reason for revert: need fix in edgebuilder+aa Original issue's description: > use conics for ovals and roundrects > > adapted from https://codereview.chromium.org/831313002/ > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/2bf1c4d58b84c73c6421edcb25e3afb4971da200 TBR=reed@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/840573002
* use conics for ovals and roundrectsGravatar reed2015-01-05
| | | | | | | | | adapted from https://codereview.chromium.org/831313002/ BUG=skia: TBR= Review URL: https://codereview.chromium.org/817283005
* Remove SkPath::asRectGravatar robertphillips2015-01-05
| | | | | | | | | | AFAICT the asRect entry point is not needed. Greg: GPU Reed: API Cary: Path Review URL: https://codereview.chromium.org/833193002
* Cleanup isRect variantsGravatar robertphillips2015-01-05
| | | | Review URL: https://codereview.chromium.org/832083002
* Update stroke path to use rect returned from isRect (to fix trailing moveTo bug)Gravatar robertphillips2014-12-29
| | | | | | | | | | This basically recreates what was done in: https://codereview.chromium.org/16950021/ (add rect-output parameter to isRect, allowing us to return the correct bounds even if a rectagular path has a trailing moveTo) with the addition of GM representation BUG=skia:247770 Review URL: https://codereview.chromium.org/834503002
* Fix bound returned by SkPath::isRect when the path contains a trailing moveToGravatar robertphillips2014-12-29
| | | | | | | | | | | | | | | | | | Oddly enough this was fixed in: https://codereview.chromium.org/16950021/ (add rect-output parameter to isRect, allowing us to return the correct bounds even if a rectagular path has a trailing moveTo) but was reverted here: https://skia.googlesource.com/skia/+/8fd160350ca5f57fbb1b2e03383c5778414a9b48 since it appeared to be crashing Chrome's trybots. I think it just fell through the cracks after that. If this sticks I will land a follow on patch for the stroke issue reported in the original bug (crbug.com/247770). BUG=247770,445368 Review URL: https://codereview.chromium.org/834483002
* use conics for addRRectGravatar reed2014-12-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/792493005
* use conicsGravatar reed2014-12-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/455043002
* Fix rrects that are large enough that we lose/gain a bit when we add the ↵Gravatar reed2014-12-15
| | | | | | | | | | radius to a bounds coordinate. add test that triggers assert in addRRect BUG=skia:3239 Review URL: https://codereview.chromium.org/803153003
* add dumpHex option to rect and rrect, to match pathGravatar reed2014-12-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/801383002
* change SkPoint::setLength to set itself to (0,0) if it starting length is ↵Gravatar reed2014-12-09
| | | | | | | | | degenerate. BUG=skia:3203 TBR=caryclark Review URL: https://codereview.chromium.org/785933003
* add convexity logic and tests for scalar max, Inf, and NaNGravatar caryclark2014-12-08
| | | | | | | | | | PathOps relies on isConvex() only returning true for trivially convex paths. The old logic also returns true if the paths that contain NaNs and Infinities. Return kUnknown_Convexity instead in those cases and in cases where the convexity logic computes intermediaries that overflow. Review URL: https://codereview.chromium.org/784593002
* Fix yet another convexicator issueGravatar robertphillips2014-11-17
| | | | | | | | | | | | | | | | This CL fixes the case where a bad initial vector (i.e., nearly zero) managed to short circuit all of the convexicator's logic. The initial bad vector would become the last vector and then never get displaced. The history of this is: https://codereview.chromium.org/298973004/ Switched the convexicator to not advance the last vector when the cross product wasn't significant https://codereview.chromium.org/573763002/ Fixed a bug (crbug.com/412640) wherein a zero area path was being incorrectly categorized as convex b.c. opposite but equal vectors were not signaling concavity. BUG=433683 Review URL: https://codereview.chromium.org/727283003
* Set temporary paths volatile so we don't cache them.Gravatar jvanverth2014-10-24
| | | | | | | | | | Any path that is generated frame-to-frame should not be rendered by using the DistanceFieldPathRenderer, because generating the initial distance field, uploading it and rendering it takes longer than the SoftwarePathRenderer. BUG=skia:2935 Review URL: https://codereview.chromium.org/677463002
* add float equivalent in dumpHex output as commentGravatar caryclark2014-10-23
| | | | | | R=reed@google.com,bsalomon@google.com Review URL: https://codereview.chromium.org/676803002
* Fix convexicator bugGravatar robertphillips2014-09-16
| | | | | | | | | BUG=crbug.com/412640 R=caryclark@google.com, bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/573763002
* add dumpHex() option to SkPathGravatar caryclark2014-09-15
| | | | | | | | | | | | | This provides exact precision to help debugging when the float representation of a SkScalar may introduce error. R=reed@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/571973003
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Add dirty_after_edit to SkPath::moveTo. Add commented out test case that ↵Gravatar bsalomon2014-08-28
| | | | | | | | | | | triggers assert. BUG=skia:1460 R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/517023003
* Remove SK_IGNORE_QUAD_RR_CORNERS_OPT-related code.Gravatar Florin Malita2014-08-01
| | | | | | | | | Now that the flag is no longer used in Chromium (https://codereview.chromium.org/426593006/), we can remove it. R=bsalomon@google.com, reed@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/430473012
* add path dump testGravatar caryclark2014-06-24
| | | | | | | | | | | | | Add a unit test for SkPath::dump(). The unit test exposed a minor bug (inconsistent CRs) and an unused parameter (title). R=bsalomon@google.com TBR=bsalomon BUG=skia:1836 Author: caryclark@google.com Review URL: https://codereview.chromium.org/351833003
* Add dump() to SkClipStack to help with debugging.Gravatar bsalomon2014-06-09
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/311263015
* In convexity checker don't advance last vector when x-product isn't significant.Gravatar commit-bot@chromium.org2014-05-22
| | | | | | | | | | | BUG=skia:2235 R=caryclark@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/298973004 git-svn-id: http://skia.googlecode.com/svn/trunk@14845 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of r13379 (Move fLastMoveToIndex from SkPath to SkPathRef - ↵Gravatar commit-bot@chromium.org2014-02-12
| | | | | | | | | | | | | https://codereview.chromium.org/146913002/) due to image quality regression in Chromium. See crbug.com/343123 (Regression - UI issue observed for any "Notification infobars" in Chrome browser) R=bsalomon@google.com TBR=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/137863006 git-svn-id: http://skia.googlecode.com/svn/trunk@13421 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding new 'extend' mode to SkPath::addPathGravatar commit-bot@chromium.org2014-02-11
| | | | | | | | | | | BUG=261727 R=reed@google.com, caryclark@google.com, schenney@chromium.org, robertphillips@google.com Author: junov@chromium.org Review URL: https://codereview.chromium.org/151353006 git-svn-id: http://skia.googlecode.com/svn/trunk@13415 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix minor error between kStroke_PathAsRect and kFill_PathAsRect in ↵Gravatar commit-bot@chromium.org2014-02-11
| | | | | | | | | | | | SkPath::asRect R=caryclark@google.com, reed@google.com Author: yunchao.he@intel.com Review URL: https://codereview.chromium.org/138703008 git-svn-id: http://skia.googlecode.com/svn/trunk@13390 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move fLastMoveToIndex from SkPath to SkPathRefGravatar robertphillips@google.com2014-02-10
| | | | | | | | https://codereview.chromium.org/146913002/ git-svn-id: http://skia.googlecode.com/svn/trunk@13379 2bbb7eff-a529-9590-31e7-b0007b416f81
* add alternative to isRect named asRectGravatar commit-bot@chromium.org2014-01-25
| | | | | | | | | | | | | | This defines yunchao's proposed interface in terms of an existing implementation. BUG=skia: R=reed@google.com, yunchao.he@intel.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/140953003 git-svn-id: http://skia.googlecode.com/svn/trunk@13183 2bbb7eff-a529-9590-31e7-b0007b416f81