aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsAngleTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-10-20 08:32:18 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-20 08:32:18 -0700
commita35ab3e6e024d0b548ded26a2e3b8ecd838ead93 (patch)
treec009069f86b1129fcf5037ffc8e8fbf1b9ba010f /tests/PathOpsAngleTest.cpp
parent65820db5e15201a3f30968420232d36c0ca89cd8 (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/PathOpsAngleTest.cpp')
-rw-r--r--tests/PathOpsAngleTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/PathOpsAngleTest.cpp b/tests/PathOpsAngleTest.cpp
index fe39d40b9c..d5285c8fbc 100644
--- a/tests/PathOpsAngleTest.cpp
+++ b/tests/PathOpsAngleTest.cpp
@@ -81,7 +81,9 @@ DEF_TEST(PathOpsAngleFindQuadEpsilon, reporter) {
SkDPoint qPt2 = line.ptAtT(t3);
qPt.fX += qPt2.fY;
qPt.fY -= qPt2.fX;
- SkDQuad quad = {{line[0], dPt, qPt}};
+ QuadPts q = {{line[0], dPt, qPt}};
+ SkDQuad quad;
+ quad.debugSet(q.fPts);
// binary search for maximum movement of quad[1] towards test that still has 1 intersection
double moveT = 0.5f;
double deltaT = moveT / 2;
@@ -223,7 +225,7 @@ public:
};
struct CircleData {
- const SkDCubic fPts;
+ const CubicPts fPts;
const int fPtCount;
SkPoint fShortPts[4];
};
@@ -266,7 +268,7 @@ DEF_TEST(PathOpsAngleCircle, reporter) {
}
struct IntersectData {
- const SkDCubic fPts;
+ const CubicPts fPts;
const int fPtCount;
double fTStart;
double fTEnd;