diff options
author | caryclark <caryclark@google.com> | 2016-08-23 09:41:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-23 09:41:00 -0700 |
commit | 3cebe24682ea8bea3bcab400ff1c79b8e0b12ff0 (patch) | |
tree | 35ba0cdb4abdd244c82f3006bcca22944fd14bac /src/core/SkGeometry.h | |
parent | c966ef9f07eed89bd571e3f89f8eb86f73b9328f (diff) |
fix conic path fuzz
The test conic has a very large weight, so it reduces to a pair
of lines. Detect this case rather than subdividing the conic
so much that the answers are meaningless.
R=herb@google.com, reed@google.com
BUG=638223
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268073004
Review-Url: https://codereview.chromium.org/2268073004
Diffstat (limited to 'src/core/SkGeometry.h')
-rw-r--r-- | src/core/SkGeometry.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkGeometry.h b/src/core/SkGeometry.h index 15f1e55195..74c9d89e3f 100644 --- a/src/core/SkGeometry.h +++ b/src/core/SkGeometry.h @@ -235,7 +235,7 @@ struct SkConic { * Chop this conic into N quads, stored continguously in pts[], where * N = 1 << pow2. The amount of storage needed is (1 + 2 * N) */ - int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; + int SK_WARN_UNUSED_RESULT chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; bool findXExtrema(SkScalar* t) const; bool findYExtrema(SkScalar* t) const; @@ -384,7 +384,7 @@ public: int pow2 = conic.computeQuadPOW2(tol); fQuadCount = 1 << pow2; SkPoint* pts = fStorage.reset(1 + 2 * fQuadCount); - conic.chopIntoQuadsPOW2(pts, pow2); + fQuadCount = conic.chopIntoQuadsPOW2(pts, pow2); return pts; } |