fix divides for osfuzz
R=kjlubick@google.com Bug: oss-fuzz:10567,oss-fuzz:10568 Change-Id: I22bf654e183a973f2c50ea619aaaba1c22f44912 Reviewed-on: https://skia-review.googlesource.com/c/162580 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
a90ea228ab
commit
016d9b098c
@ -577,7 +577,7 @@ bool SkOpAngle::endsIntersect(SkOpAngle* rh) {
|
||||
maxY = SkTMax(maxY, curve[idx2].fY);
|
||||
}
|
||||
double maxWidth = SkTMax(maxX - minX, maxY - minY);
|
||||
delta /= maxWidth;
|
||||
delta = sk_ieee_double_divide(delta, maxWidth);
|
||||
if (delta > 1e-3 && (useIntersect ^= true)) { // FIXME: move this magic number
|
||||
sRayLonger = rayLonger;
|
||||
sCept = cept;
|
||||
|
@ -94,8 +94,8 @@ SkDPoint SkDConic::ptAtT(double t) const {
|
||||
}
|
||||
double denominator = conic_eval_denominator(fWeight, t);
|
||||
SkDPoint result = {
|
||||
conic_eval_numerator(&fPts[0].fX, fWeight, t) / denominator,
|
||||
conic_eval_numerator(&fPts[0].fY, fWeight, t) / denominator
|
||||
sk_ieee_double_divide(conic_eval_numerator(&fPts[0].fX, fWeight, t), denominator),
|
||||
sk_ieee_double_divide(conic_eval_numerator(&fPts[0].fY, fWeight, t), denominator)
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user