diff options
author | 2016-06-01 15:39:47 -0700 | |
---|---|---|
committer | 2016-06-01 15:39:48 -0700 | |
commit | 99600d0a158e3b2f1ff077a6fd102e78ce9db0e4 (patch) | |
tree | 64ee77563a58bb6f394a8189b5b9194187adb85d /src | |
parent | 9876ac5b3016e5353c072378ac1545a0a2270757 (diff) |
Add a test to ensure that a case where SkCubicClipper::ChopMonoAtY returns 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
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkPath.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index bf27372a56..f5b53fcc00 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -2813,7 +2813,7 @@ static int winding_mono_cubic(const SkPoint pts[], SkScalar x, SkScalar y, int* // compute the actual x(t) value SkScalar t; if (!SkCubicClipper::ChopMonoAtY(pts, y, &t)) { - return 0; + return 0; } SkScalar xt = eval_cubic_pts(pts[0].fX, pts[1].fX, pts[2].fX, pts[3].fX, t); if (SkScalarNearlyEqual(xt, x)) { @@ -3052,7 +3052,7 @@ static void tangent_cubic(const SkPoint pts[], SkScalar x, SkScalar y, SkPoint* c = &dst[i * 3]; SkScalar t; if (!SkCubicClipper::ChopMonoAtY(c, y, &t)) { - continue; + continue; } SkScalar xt = eval_cubic_pts(c[0].fX, c[1].fX, c[2].fX, c[3].fX, t); if (!SkScalarNearlyEqual(x, xt)) { |