Coverage Report

Created: 2021-08-22 09:07

/src/skia/fuzz/FuzzRegionOp.cpp
Line
Count
Source
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
1.53k
DEF_FUZZ(RegionOp, fuzz) {  // `fuzz -t api -n RegionOp`
12
1.53k
    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
1.53k
    FuzzNiceRegion(fuzz, &region, 300);
17
    // Do a computation to make sure region is not optimized out.
18
1.53k
    region.computeRegionComplexity();
19
1.53k
}