diff options
author | caryclark <caryclark@google.com> | 2016-10-20 08:32:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-20 08:32:18 -0700 |
commit | a35ab3e6e024d0b548ded26a2e3b8ecd838ead93 (patch) | |
tree | c009069f86b1129fcf5037ffc8e8fbf1b9ba010f /tests/PathOpsQuadLineIntersectionThreadedTest.cpp | |
parent | 65820db5e15201a3f30968420232d36c0ca89cd8 (diff) |
fix fuzzers
Many old pathops-related fuzz failures have built up while
the codebase was under a state a flux. Now that the code
is stable, address these failures.
Most of the CL plumbs the debug global state to downstream
routines so that, if the data is not trusted (ala fuzzed)
the function can safely exit without asserting.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2426173002
Review-Url: https://chromiumcodereview.appspot.com/2426173002
Diffstat (limited to 'tests/PathOpsQuadLineIntersectionThreadedTest.cpp')
-rw-r--r-- | tests/PathOpsQuadLineIntersectionThreadedTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/PathOpsQuadLineIntersectionThreadedTest.cpp b/tests/PathOpsQuadLineIntersectionThreadedTest.cpp index 7766cfe028..a82ac28fde 100644 --- a/tests/PathOpsQuadLineIntersectionThreadedTest.cpp +++ b/tests/PathOpsQuadLineIntersectionThreadedTest.cpp @@ -5,6 +5,7 @@ * found in the LICENSE file. */ #include "PathOpsExtendedTest.h" +#include "PathOpsTestCommon.h" #include "PathOpsThreadedCommon.h" #include "SkIntersections.h" #include "SkPathOpsLine.h" @@ -79,8 +80,10 @@ static void testQuadLineIntersectMain(PathOpsThreadState* data) int by = state.fB >> 2; int cx = state.fC & 0x03; int cy = state.fC >> 2; - SkDQuad quad = {{{(double) ax, (double) ay}, {(double) bx, (double) by}, + QuadPts q = {{{(double) ax, (double) ay}, {(double) bx, (double) by}, {(double) cx, (double) cy}}}; + SkDQuad quad; + quad.debugSet(q.fPts); SkReduceOrder reducer; int order = reducer.reduce(quad); if (order < 3) { |