| 1 |
/* |
| 2 |
* Copyright 2018 Google, LLC |
| 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 |
#ifndef FuzzCommon_DEFINED |
| 9 |
#define FuzzCommon_DEFINED |
| 10 |
|
| 11 |
#include "fuzz/Fuzz.h" |
| 12 |
#include "include/core/SkMatrix.h" |
| 13 |
#include "include/core/SkPath.h" |
| 14 |
#include "include/core/SkPathBuilder.h" |
| 15 |
#include "include/core/SkRRect.h" |
| 16 |
#include "include/core/SkRefCnt.h" |
| 17 |
#include "include/core/SkRegion.h" |
| 18 |
#include "include/effects/SkRuntimeEffect.h" |
| 19 |
#include "include/private/base/SkTArray.h" |
| 20 |
|
| 21 |
class SkData; |
| 22 |
|
| 23 |
// allows some float values for path points |
| 24 |
void FuzzNicePath(Fuzz* fuzz, SkPathBuilder*, int maxOps); |
| 25 |
|
| 26 |
static inline SkPath FuzzNicePath(Fuzz* fuzz, int maxOps) { |
| 27 |
SkPathBuilder builder; |
| 28 |
FuzzNicePath(fuzz, &builder, maxOps); |
| 29 |
return builder.detach(); |
| 30 |
} |
| 31 |
|
| 32 |
// allows all float values for path points |
| 33 |
SkPath FuzzEvilPath(Fuzz* fuzz, int last_verb); |
| 34 |
|
| 35 |
void FuzzNiceRRect(Fuzz* fuzz, SkRRect* rr); |
| 36 |
|
| 37 |
void FuzzNiceMatrix(Fuzz* fuzz, SkMatrix* m); |
| 38 |
|
| 39 |
void FuzzNiceRegion(Fuzz* fuzz, SkRegion* region, int maxN); |
| 40 |
|
| 41 |
void FuzzCreateValidInputsForRuntimeEffect( |
| 42 |
SkRuntimeEffect* effect, |
| 43 |
sk_sp<SkData>& uniformBytes, |
| 44 |
skia_private::TArray<SkRuntimeEffect::ChildPtr>& children); |
| 45 |
|
| 46 |
#endif |
| 47 |
|