aboutsummaryrefslogtreecommitdiff
path: root/fuzz/FuzzPathMeasure.cpp
diff options
context:
space:
mode:
authorMike Klein <mtklein@google.com>2018-09-25 12:16:53 -0400
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2018-09-25 17:04:00 +0000
commit7ffa40cedbc42f36576c6dc7c65738df32d418c4 (patch)
tree06dabb0b92fc00ed3749218a9a2b497dcf223680 /fuzz/FuzzPathMeasure.cpp
parent297caafc5805723d445f603b71c70a9e144113ee (diff)
downloadskqp-7ffa40cedbc42f36576c6dc7c65738df32d418c4.tar.gz
FuzzPath -> FuzzNicePath
This CL renames FuzzPath() to FuzzNicePath() to remind us that it's meant to create paths that a user could reasonably want to create in good faith, to pass to Skia via its API, etc. Then, add fuzz_nice_rect(), and have FuzzNicePath() use that to create its rectangles and use FuzzNiceMatrix() to create its matrices, just like we already use FuzzNiceRRect() to create rounded rectangles and FuzzNicePath() itself to create sub-paths. Using fuzz_nice_rect() should be the fix for the attached bug. Using FuzzNiceMatrix() is by analogy, more preemptive. While we're at it, rename BuildPath to FuzzEvilPath, so the contrast with FuzzNicePath is more clear. Update the assertions that we create a valid path in FuzzNicePath() to tell us where things went wrong if they do. Bug: oss-fuzz:10667, skia:8384 Change-Id: I6d802182a62815cd969c65cf0479609f64b1da55 Reviewed-on: https://skia-review.googlesource.com/156840 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Mike Klein <mtklein@google.com>
Diffstat (limited to 'fuzz/FuzzPathMeasure.cpp')
-rw-r--r--fuzz/FuzzPathMeasure.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fuzz/FuzzPathMeasure.cpp b/fuzz/FuzzPathMeasure.cpp
index e6933a856f..62e7b7434c 100644
--- a/fuzz/FuzzPathMeasure.cpp
+++ b/fuzz/FuzzPathMeasure.cpp
@@ -19,7 +19,7 @@ DEF_FUZZ(PathMeasure, fuzz) {
fuzz->next(&distance[index]);
}
SkPath path;
- BuildPath(fuzz, &path, SkPath::Verb::kDone_Verb);
+ FuzzEvilPath(fuzz, &path, SkPath::Verb::kDone_Verb);
SkRect bounds = path.getBounds();
SkScalar maxDim = SkTMax(bounds.width(), bounds.height());
SkScalar resScale = maxDim / 1000;