aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGeometry.h
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-11-08 17:04:47 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-09 16:08:44 +0000
commitfc31be40cede4dfd5b06ecaffb551b06aea85693 (patch)
treee4eeb8ba07f58f12eb8c17bfea66676b82efbacc /src/core/SkGeometry.h
parentfdab576a75c636dbcd5ff44c3f5f57205cc26a6f (diff)
Harden SkClassifyCubic
BUG=chromium:743617 Change-Id: Idfb89832b48ebd60fd9109cd526bdd5cd5931ada Reviewed-on: https://skia-review.googlesource.com/68980 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/core/SkGeometry.h')
-rw-r--r--src/core/SkGeometry.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkGeometry.h b/src/core/SkGeometry.h
index 675ee80ae0..176ba4ef1f 100644
--- a/src/core/SkGeometry.h
+++ b/src/core/SkGeometry.h
@@ -196,6 +196,8 @@ static inline bool SkCubicIsDegenerate(SkCubicType type) {
d[] is filled with the cubic inflection function coefficients. See "Resolution Independent
Curve Rendering using Programmable Graphics Hardware", 4.2 Curve Categorization:
+ If the input points contain infinities or NaN, the return values are undefined.
+
https://www.microsoft.com/en-us/research/wp-content/uploads/2005/01/p1000-loop.pdf
*/
SkCubicType SkClassifyCubic(const SkPoint p[4], double t[2] = nullptr, double s[2] = nullptr,