aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-09-26 11:03:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-26 11:03:54 -0700
commit414c4295f951d43068666b6294df15b2fd2ba85c (patch)
tree4a8abbb094d1cedc8eb1b2a773f6b2f3609f0576 /src/gpu
parent849f5027e9d3e27c34453966fc3471eb57e76e54 (diff)
allow conic chop to fail
Fuzzy values may cause the conic chop to fail. Check to see if the values are all finite, and require the caller to do the same. R=reed@google.com BUG=650178 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2368993002 Review-Url: https://codereview.chromium.org/2368993002
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/batches/GrAAHairLinePathRenderer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
index 194c79e41e..9d73cf4f17 100644
--- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
@@ -145,7 +145,10 @@ static int split_conic(const SkPoint src[3], SkConic dst[2], const SkScalar weig
if (dst) {
SkConic conic;
conic.set(src, weight);
- conic.chopAt(t, dst);
+ if (!conic.chopAt(t, dst)) {
+ dst[0].set(src, weight);
+ return 1;
+ }
}
return 2;
}