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/PathOpsCubicConicIntersectionTest.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/PathOpsCubicConicIntersectionTest.cpp')
-rw-r--r-- | tests/PathOpsCubicConicIntersectionTest.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/PathOpsCubicConicIntersectionTest.cpp b/tests/PathOpsCubicConicIntersectionTest.cpp index fae1233a55..d7924634b2 100644 --- a/tests/PathOpsCubicConicIntersectionTest.cpp +++ b/tests/PathOpsCubicConicIntersectionTest.cpp @@ -12,8 +12,8 @@ #include "Test.h" static struct cubicConic { - SkDCubic cubic; - SkDConic conic; + CubicPts cubic; + ConicPts conic; } cubicConicTests[] = { {{{{188.60000610351562, 2041.5999755859375}, {188.60000610351562, 2065.39990234375}, {208, 2084.800048828125}, {231.80000305175781, 2084.800048828125}}}, @@ -29,9 +29,13 @@ static struct cubicConic { static const int cubicConicTests_count = (int) SK_ARRAY_COUNT(cubicConicTests); static void cubicConicIntersection(skiatest::Reporter* reporter, int index) { - const SkDCubic& cubic = cubicConicTests[index].cubic; + const CubicPts& cu = cubicConicTests[index].cubic; + SkDCubic cubic; + cubic.debugSet(cu.fPts); SkASSERT(ValidCubic(cubic)); - const SkDConic& conic = cubicConicTests[index].conic; + const ConicPts& co = cubicConicTests[index].conic; + SkDConic conic; + conic.debugSet(co.fPts.fPts, co.fWeight); SkASSERT(ValidConic(conic)); SkReduceOrder reduce1; SkReduceOrder reduce2; |