Lines Matching full:fuzz

8 #include "fuzz/Fuzz.h"
9 #include "fuzz/FuzzCommon.h"
18 static void fuzz_nice_float(Fuzz* fuzz, float* f) { in fuzz_nice_float() argument
20 fuzz->next(&v); in fuzz_nice_float()
26 static void fuzz_nice_float(Fuzz* fuzz, float* f, Args... rest) { in fuzz_nice_float() argument
27 fuzz_nice_float(fuzz, f); in fuzz_nice_float()
28 fuzz_nice_float(fuzz, rest...); in fuzz_nice_float()
31 static void fuzz_nice_rect(Fuzz* fuzz, SkRect* r) { in fuzz_nice_rect() argument
32 fuzz_nice_float(fuzz, &r->fLeft, &r->fTop, &r->fRight, &r->fBottom); in fuzz_nice_rect()
37 void FuzzNicePath(Fuzz* fuzz, SkPath* path, int maxOps) { in FuzzNicePath() argument
38 if (maxOps <= 0 || fuzz->exhausted() || path->countPoints() > 100000) { in FuzzNicePath()
42 fuzz->nextRange(&fillType, 0, (uint8_t)SkPathFillType::kInverseEvenOdd); in FuzzNicePath()
45 fuzz->nextRange(&numOps, 0, maxOps); in FuzzNicePath()
55 fuzz->nextRange(&op, 0, MAX_PATH_OPERATION); in FuzzNicePath()
66 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
70 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
74 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
78 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
82 fuzz_nice_float(fuzz, &a, &b, &c, &d); in FuzzNicePath()
86 fuzz_nice_float(fuzz, &a, &b, &c, &d); in FuzzNicePath()
90 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e); in FuzzNicePath()
94 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e); in FuzzNicePath()
98 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e, &f); in FuzzNicePath()
102 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e, &f); in FuzzNicePath()
106 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e); in FuzzNicePath()
110 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
111 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
112 fuzz->next(&test); in FuzzNicePath()
119 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
120 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
125 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
127 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
128 fuzz->next(&ui); in FuzzNicePath()
132 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
134 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
138 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
140 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
141 fuzz->next(&ui); in FuzzNicePath()
145 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
147 fuzz_nice_float(fuzz, &a, &b, &c); in FuzzNicePath()
151 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
152 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
156 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
157 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
158 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
163 FuzzNiceRRect(fuzz, &rr); in FuzzNicePath()
164 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
169 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
171 FuzzNiceRRect(fuzz, &rr); in FuzzNicePath()
175 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
177 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
178 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
183 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
185 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
190 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
200 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
204 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
205 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
209 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
213 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
216 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
221 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
237 void FuzzEvilPath(Fuzz* fuzz, SkPath* path, int last_verb) { in FuzzEvilPath() argument
238 while (!fuzz->exhausted()) { in FuzzEvilPath()
242 fuzz->next(&operation); in FuzzEvilPath()
247 fuzz->next(&a, &b); in FuzzEvilPath()
252 fuzz->next(&a, &b); in FuzzEvilPath()
257 fuzz->next(&a, &b, &c, &d); in FuzzEvilPath()
262 fuzz->next(&a, &b, &c, &d, &e); in FuzzEvilPath()
267 fuzz->next(&a, &b, &c, &d, &e, &f); in FuzzEvilPath()
282 void FuzzNiceRRect(Fuzz* fuzz, SkRRect* rr) { in FuzzNiceRRect() argument
284 fuzz_nice_rect(fuzz, &r); in FuzzNiceRRect()
288 fuzz->nextRange(&vec.fX, 0.0f, 1.0f); in FuzzNiceRRect()
290 fuzz->nextRange(&vec.fY, 0.0f, 1.0f); in FuzzNiceRRect()
297 void FuzzNiceMatrix(Fuzz* fuzz, SkMatrix* m) { in FuzzNiceMatrix() argument
301 fuzz->nextRange(&matrixType, 0, 4); in FuzzNiceMatrix()
307 fuzz->nextRange(&buffer[0], -4000.0f, 4000.0f); in FuzzNiceMatrix()
308 fuzz->nextRange(&buffer[1], -4000.0f, 4000.0f); in FuzzNiceMatrix()
312 fuzz->nextRange(&buffer[0], -400.0f, 400.0f); in FuzzNiceMatrix()
313 fuzz->nextRange(&buffer[1], -400.0f, 400.0f); in FuzzNiceMatrix()
314 fuzz->nextRange(&buffer[2], -4000.0f, 4000.0f); in FuzzNiceMatrix()
315 fuzz->nextRange(&buffer[3], -4000.0f, 4000.0f); in FuzzNiceMatrix()
320 fuzz->nextN(buffer, 6); in FuzzNiceMatrix()
324 fuzz->nextN(buffer, kArrayLength); in FuzzNiceMatrix()
333 void FuzzNiceRegion(Fuzz* fuzz, SkRegion* region, int maxN) { in FuzzNiceRegion() argument
335 fuzz->nextRange(&N, 0, maxN); in FuzzNiceRegion()
340 fuzz->nextRange(&r.fLeft, -2147483646, 2147483646); in FuzzNiceRegion()
341 fuzz->nextRange(&r.fTop, -2147483646, 2147483646); in FuzzNiceRegion()
342 fuzz->nextRange(&r.fRight, -2147483646, 2147483646); in FuzzNiceRegion()
343 fuzz->nextRange(&r.fBottom, -2147483646, 2147483646); in FuzzNiceRegion()
345 fuzz->nextEnum(&op, SkRegion::kLastOp); in FuzzNiceRegion()