diff options
Diffstat (limited to 'fuzz/FuzzRegionOp.cpp')
-rw-r--r-- | fuzz/FuzzRegionOp.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fuzz/FuzzRegionOp.cpp b/fuzz/FuzzRegionOp.cpp new file mode 100644 index 0000000000..7f8bbbefba --- /dev/null +++ b/fuzz/FuzzRegionOp.cpp @@ -0,0 +1,18 @@ +/* + * 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.h" +#include "FuzzCommon.h" + +DEF_FUZZ(RegionOp, fuzz) { // `fuzz -t api -n RegionOp` + SkRegion regionA, regionB, regionC; + fuzz_region(fuzz, ®ionA, 2000); + fuzz_region(fuzz, ®ionB, 2000); + SkRegion::Op op; + fuzz_enum_range(fuzz, &op, (SkRegion::Op)0, SkRegion::kLastOp); + regionC.op(regionA, regionB, op); +} |