diff options
author | Chris Dalton <csmartdalton@google.com> | 2018-07-24 01:08:31 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-25 17:29:26 +0000 |
commit | 1d474dd1941bfdfec7a5a005b37ddc96482a7706 (patch) | |
tree | b26b635b3953b6030aef0acef6927c6f17848d55 /src/gpu/ops/GrAAHairLinePathRenderer.cpp | |
parent | 4014ba6ec7a7825495ac0a6ed591c5dadd30751d (diff) |
Pin max curvature solutions to 0..1
Pins out-of-range solutions for cubic/quad max curvature instead of
throwing them out. Code that wants to know the endpoint(s) closest to
max curvature now has the information. Code not interested in these
values can just ignore 0 and 1.
Bug: skia:
Change-Id: I8e7e2ef236b4ab963865dc049ac3e09d5396757d
Reviewed-on: https://skia-review.googlesource.com/143041
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/ops/GrAAHairLinePathRenderer.cpp')
-rw-r--r-- | src/gpu/ops/GrAAHairLinePathRenderer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp index d6f3c0664e..05f1fbd684 100644 --- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp @@ -140,7 +140,7 @@ static int get_float_exp(float x) { // and dst[1] are the two new conics. static int split_conic(const SkPoint src[3], SkConic dst[2], const SkScalar weight) { SkScalar t = SkFindQuadMaxCurvature(src); - if (t == 0) { + if (t == 0 || t == 1) { if (dst) { dst[0].set(src, weight); } |