From 414c4295f951d43068666b6294df15b2fd2ba85c Mon Sep 17 00:00:00 2001 From: caryclark Date: Mon, 26 Sep 2016 11:03:54 -0700 Subject: 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 --- src/gpu/batches/GrAAHairLinePathRenderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gpu') 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; } -- cgit v1.2.3