Abort early if fuzz data
breaks intersection.

R=kjlubick@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2444333002

Review-Url: https://codereview.chromium.org/2444333002
This commit is contained in:
caryclark 2016-10-25 08:58:26 -07:00 committed by Commit bot
parent 0117485a4a
commit 9feb6326d0
3 changed files with 29 additions and 1 deletions

View File

@ -1134,6 +1134,31 @@ if (skia_enable_tools) {
testonly = true
}
pathops_tests_sources = exec_script("gyp/find.py",
[
"PathOps*.cpp",
rebase_path("tests"),
],
"list lines",
[])
executable("pathops_unittest") {
sources =
pathops_tests_sources -
[ rebase_path("tests/PathOpsSkpClipTest.cpp") ] + # alternate main
[
rebase_path("tests/skia_test.cpp"),
rebase_path("tests/Test.cpp"),
]
deps = [
":flags",
":gpu_tool_utils",
":skia",
":tool_utils",
]
testonly = true
}
executable("dump_record") {
sources = [
"tools/DumpRecord.cpp",

View File

@ -992,6 +992,9 @@ SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::boundsMax() const {
template<typename TCurve, typename OppCurve>
bool SkTSect<TCurve, OppCurve>::coincidentCheck(SkTSect<OppCurve, TCurve>* sect2) {
SkTSpan<TCurve, OppCurve>* first = fHead;
if (!first) {
return false;
}
SkTSpan<TCurve, OppCurve>* last, * next;
do {
int consecutive = this->countConsecutiveSpans(first, &last);

View File

@ -171,7 +171,7 @@ int test_main() {
if (FLAGS_dumpOp) {
header.appendf(" -d");
}
#if SK_DEBUG
#ifdef SK_DEBUG
if (FLAGS_runFail) {
header.appendf(" -f");
}