limit discrete path effect iterations
R=fmalita@google.com, reed@google.com Bug: skia:7737 Change-Id: I339548f7a39618d7559182487e8969d591953b89 Reviewed-on: https://skia-review.googlesource.com/115659 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Cary Clark <caryclark@skia.org>
This commit is contained in:
parent
2f2a6e3960
commit
cec40a9320
@ -102,6 +102,8 @@ bool SkDiscretePathEffect::filterPath(SkPath* dst, const SkPath& src,
|
||||
meas.getSegment(0, length, dst, true); // to short for us to mangle
|
||||
} else {
|
||||
int n = SkScalarRoundToInt(length / fSegLength);
|
||||
constexpr int kMaxReasonableIterations = 100000;
|
||||
n = SkTMin(n, kMaxReasonableIterations);
|
||||
SkScalar delta = length / n;
|
||||
SkScalar distance = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user