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/SkRRect.h" 15 #include "include/core/SkRefCnt.h" 16 #include "include/core/SkRegion.h" 17 #include "include/effects/SkRuntimeEffect.h" 18 #include "include/private/base/SkTArray.h" 19 20 class SkData; 21 22 // allows some float values for path points 23 void FuzzNicePath(Fuzz* fuzz, SkPath* path, int maxOps); 24 // allows all float values for path points 25 void FuzzEvilPath(Fuzz* fuzz, SkPath* path, int last_verb); 26 27 void FuzzNiceRRect(Fuzz* fuzz, SkRRect* rr); 28 29 void FuzzNiceMatrix(Fuzz* fuzz, SkMatrix* m); 30 31 void FuzzNiceRegion(Fuzz* fuzz, SkRegion* region, int maxN); 32 33 void FuzzCreateValidInputsForRuntimeEffect( 34 SkRuntimeEffect* effect, 35 sk_sp<SkData>& uniformBytes, 36 skia_private::TArray<SkRuntimeEffect::ChildPtr>& children); 37 38 #endif 39 40