| * Copyright 2018 Google Inc. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| #include "fuzz/FuzzCommon.h" |
| #include "include/core/SkData.h" |
| #include "include/core/SkPath.h" |
| #include "include/core/SkRegion.h" |
| void FuzzRegionSetPath(Fuzz* fuzz) { |
| FuzzNicePath(fuzz, &p, 1000); |
| // Do some follow on computations to make sure region is well-formed. |
| r1.computeRegionComplexity(); |
| #if defined(IS_FUZZING_WITH_LIBFUZZER) |
| extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { |
| sk_sp<SkData> bytes(SkData::MakeWithoutCopy(data, size)); |
| FuzzRegionSetPath(&fuzz); |