Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
fuzz
FuzzRegionOp.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2018 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#include "
fuzz/Fuzz.h
"
9
#include "
fuzz/FuzzCommon.h
"
10
11
DEF_FUZZ
(RegionOp, fuzz) {
// `fuzz -t api -n RegionOp`
12
SkRegion
region;
13
// FuzzNiceRegion generates a random region by joining a random amount of regions
14
// together. This fuzzer simply targets that directly. 300 was picked arbitrarily as
15
// a number over 2^8.
16
FuzzNiceRegion
(fuzz, ®ion, 300);
17
// Do a computation to make sure region is not optimized out.
18
region.
computeRegionComplexity
();
19
}
FuzzNiceRegion
void FuzzNiceRegion(Fuzz *fuzz, SkRegion *region, int maxN)
Definition
FuzzCommon.cpp:333
FuzzCommon.h
Fuzz.h
DEF_FUZZ
#define DEF_FUZZ(name, f)
Definition
Fuzz.h:156
SkRegion
Definition
SkRegion.h:30
SkRegion::computeRegionComplexity
int computeRegionComplexity() const
Definition
SkRegion.cpp:176
Generated on Fri Apr 26 2024 06:15:59 for Flutter Engine by
1.9.8