aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkDashPathPriv.h
Commit message (Collapse)AuthorAge
* limit the number of points in SkDashPathEffect::asPointsGravatar lsalzman2016-07-21
| | | | | | | | | | | | | | | | | | | If the length of a line path is sufficiently long relative to the dash interval, it is possible to cause SkDashPathEffect::asPoints to produce so many points that it overflows the amount that can fit in an int type, or otherwise produce non-finite values, i.e. path from (0,0) to (0,9e15) with a dash interval of 1. This fixes that by capping the amount of points to a sane limit - in this case, 1mil, since that limit is also used in utils/SkDashPath.cpp and has precedent. Downstream Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1287515 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165013002 Review-Url: https://codereview.chromium.org/2165013002
* Add control over whether lines are special cased in SkDashPath. Disable when ↵Gravatar bsalomon2016-06-13
| | | | | | | | called from GrShape. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055253002 Review-Url: https://codereview.chromium.org/2055253002
* allow one zero length dashGravatar caryclark2016-03-18
| | | | | | | | | | | | | | | | | | If the constructed stroke that represents a dash has a single dash of length zero, and the end cap is square or round, draw the cap. The old code initialized the initial dash length to zero, making it ambiguous whether the first length is zero or not. R=robertphillips@google.com BUG=583299 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1805963002 Committed: https://skia.googlesource.com/skia/+/5e1a24808415df2748822e8082e21a361362cdfe Review URL: https://codereview.chromium.org/1805963002
* Revert of allow one zero length dash (patchset #8 id:140001 of ↵Gravatar bungeman2016-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1805963002/ ) Reason for revert: Causes the dash bench to crash. Example crash: https://build.chromium.org/p/client.skia/builders/Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release/builds/5581/steps/nanobench/logs/stdio Original issue's description: > allow one zero length dash > > If the constructed stroke that represents a dash has a > single dash of length zero, and the end cap is square or > round, draw the cap. > > The old code initialized the initial dash length to zero, > making it ambiguous whether the first length is zero or > not. > > R=robertphillips@google.com > BUG=583299 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1805963002 > > Committed: https://skia.googlesource.com/skia/+/5e1a24808415df2748822e8082e21a361362cdfe TBR=robertphillips@google.com,reed@google.com,caryclark@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=583299 Review URL: https://codereview.chromium.org/1808303004
* allow one zero length dashGravatar caryclark2016-03-18
| | | | | | | | | | | | | | | | If the constructed stroke that represents a dash has a single dash of length zero, and the end cap is square or round, draw the cap. The old code initialized the initial dash length to zero, making it ambiguous whether the first length is zero or not. R=robertphillips@google.com BUG=583299 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1805963002 Review URL: https://codereview.chromium.org/1805963002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Move Dashing filterPath to a dashing utils fileGravatar egdaniel2014-06-11
| | | | | | | | | | | | | | | | From inside GrContext, we have a need to create an SkPath an original path and some dashing info. We do not have access to the original path effect so we need a way to make the FilterPath function accessible outside of the effect. So I moved the core filterPath code (and all need helper functions) out of SkDashPathEffect and created a SkDashPath in utils to store these helper functions. BUG=skia: Committed: https://skia.googlesource.com/skia/+/576dcdc793a762ec63fbecdbfd5768066b548fe5 Author: egdaniel@google.com Review URL: https://codereview.chromium.org/314623004
* Revert of Move Dashing filterPath to a dashing utils file ↵Gravatar egdaniel2014-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/314623004/) Reason for revert: Need to create utils.gypi file and update chrome Original issue's description: > Move Dashing filterPath to a dashing utils file > > From inside GrContext, we have a need to create an SkPath an original path and > some dashing info. We do not have access to the original path effect so we need > a way to make the FilterPath function accessible outside of the effect. So I moved > the core filterPath code (and all need helper functions) out of SkDashPathEffect > and created a SkDashPath in utils to store these helper functions. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/576dcdc793a762ec63fbecdbfd5768066b548fe5 R=bsalomon@google.com, reed@google.com, rmistry@google.com TBR=bsalomon@google.com, reed@google.com, rmistry@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: egdaniel@google.com Review URL: https://codereview.chromium.org/317663003
* Move Dashing filterPath to a dashing utils fileGravatar egdaniel2014-06-04
From inside GrContext, we have a need to create an SkPath an original path and some dashing info. We do not have access to the original path effect so we need a way to make the FilterPath function accessible outside of the effect. So I moved the core filterPath code (and all need helper functions) out of SkDashPathEffect and created a SkDashPath in utils to store these helper functions. BUG=skia: R=bsalomon@google.com, reed@google.com, rmistry@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/314623004