Skip bad line segments inside gen_alpha_deltas

Bug: chromium:847386
Change-Id: I5bb3268c27ecfbd66268adbc36be3ea72e0a69ba
Reviewed-on: https://skia-review.googlesource.com/131324
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Yuqian Li <liyuqian@google.com>
This commit is contained in:
Yuqian Li 2018-05-31 15:18:54 -07:00 committed by Skia Commit-Bot
parent fbe7166685
commit 9ea47bedb9

View File

@ -182,8 +182,9 @@ void gen_alpha_deltas(const SkPath& path, const SkIRect& clippedIR, const SkIRec
}
SkAnalyticEdge l, r;
l.setLine(lb->fP0, lb->fP1);
r.setLine(rb->fP0, rb->fP1);
if (!l.setLine(lb->fP0, lb->fP1) || !r.setLine(rb->fP0, rb->fP1)) {
continue;
}
SkFixed xorUpperY = l.fUpperY ^ r.fUpperY;
SkFixed xorLowerY = l.fLowerY ^ r.fLowerY;