Lines Matching full:fuzz
8 #include "fuzz/Fuzz.h"
9 #include "fuzz/FuzzCommon.h"
12 static void fuzz_nice_float(Fuzz* fuzz, float* f) { in fuzz_nice_float() argument
14 fuzz->next(&v); in fuzz_nice_float()
20 static void fuzz_nice_float(Fuzz* fuzz, float* f, Args... rest) { in fuzz_nice_float() argument
21 fuzz_nice_float(fuzz, f); in fuzz_nice_float()
22 fuzz_nice_float(fuzz, rest...); in fuzz_nice_float()
25 static void fuzz_nice_rect(Fuzz* fuzz, SkRect* r) { in fuzz_nice_rect() argument
26 fuzz_nice_float(fuzz, &r->fLeft, &r->fTop, &r->fRight, &r->fBottom); in fuzz_nice_rect()
31 void FuzzNicePath(Fuzz* fuzz, SkPath* path, int maxOps) { in FuzzNicePath() argument
32 if (maxOps <= 0 || fuzz->exhausted() || path->countPoints() > 100000) { in FuzzNicePath()
36 fuzz->nextRange(&fillType, 0, (uint8_t)SkPathFillType::kInverseEvenOdd); in FuzzNicePath()
39 fuzz->nextRange(&numOps, 0, maxOps); in FuzzNicePath()
49 fuzz->nextRange(&op, 0, PATH_OPERATIONS); in FuzzNicePath()
60 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
64 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
68 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
72 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
76 fuzz_nice_float(fuzz, &a, &b, &c, &d); in FuzzNicePath()
80 fuzz_nice_float(fuzz, &a, &b, &c, &d); in FuzzNicePath()
84 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e); in FuzzNicePath()
88 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e); in FuzzNicePath()
92 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e, &f); in FuzzNicePath()
96 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e, &f); in FuzzNicePath()
100 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e); in FuzzNicePath()
104 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
105 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
106 fuzz->next(&test); in FuzzNicePath()
113 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
114 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
119 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
121 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
122 fuzz->next(&ui); in FuzzNicePath()
126 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
128 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
132 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
134 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
135 fuzz->next(&ui); in FuzzNicePath()
139 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
141 fuzz_nice_float(fuzz, &a, &b, &c); in FuzzNicePath()
145 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
146 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
150 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
151 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
152 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
157 FuzzNiceRRect(fuzz, &rr); in FuzzNicePath()
158 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
163 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
165 FuzzNiceRRect(fuzz, &rr); in FuzzNicePath()
169 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
171 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
172 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
177 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
179 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
184 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
194 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
198 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
199 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
203 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
207 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
208 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
212 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
225 void FuzzEvilPath(Fuzz* fuzz, SkPath* path, int last_verb) { in FuzzEvilPath() argument
226 while (!fuzz->exhausted()) { in FuzzEvilPath()
230 fuzz->next(&operation); in FuzzEvilPath()
235 fuzz->next(&a, &b); in FuzzEvilPath()
240 fuzz->next(&a, &b); in FuzzEvilPath()
245 fuzz->next(&a, &b, &c, &d); in FuzzEvilPath()
250 fuzz->next(&a, &b, &c, &d, &e); in FuzzEvilPath()
255 fuzz->next(&a, &b, &c, &d, &e, &f); in FuzzEvilPath()
270 void FuzzNiceRRect(Fuzz* fuzz, SkRRect* rr) { in FuzzNiceRRect() argument
272 fuzz_nice_rect(fuzz, &r); in FuzzNiceRRect()
276 fuzz->nextRange(&vec.fX, 0.0f, 1.0f); in FuzzNiceRRect()
278 fuzz->nextRange(&vec.fY, 0.0f, 1.0f); in FuzzNiceRRect()
285 void FuzzNiceMatrix(Fuzz* fuzz, SkMatrix* m) { in FuzzNiceMatrix() argument
289 fuzz->nextRange(&matrixType, 0, 4); in FuzzNiceMatrix()
295 fuzz->nextRange(&buffer[0], -4000.0f, 4000.0f); in FuzzNiceMatrix()
296 fuzz->nextRange(&buffer[1], -4000.0f, 4000.0f); in FuzzNiceMatrix()
300 fuzz->nextRange(&buffer[0], -400.0f, 400.0f); in FuzzNiceMatrix()
301 fuzz->nextRange(&buffer[1], -400.0f, 400.0f); in FuzzNiceMatrix()
302 fuzz->nextRange(&buffer[2], -4000.0f, 4000.0f); in FuzzNiceMatrix()
303 fuzz->nextRange(&buffer[3], -4000.0f, 4000.0f); in FuzzNiceMatrix()
308 fuzz->nextN(buffer, 6); in FuzzNiceMatrix()
312 fuzz->nextN(buffer, kArrayLength); in FuzzNiceMatrix()
321 void FuzzNiceRegion(Fuzz* fuzz, SkRegion* region, int maxN) { in FuzzNiceRegion() argument
323 fuzz->nextRange(&N, 0, maxN); in FuzzNiceRegion()
328 fuzz->nextRange(&r.fLeft, -2147483646, 2147483646); in FuzzNiceRegion()
329 fuzz->nextRange(&r.fTop, -2147483646, 2147483646); in FuzzNiceRegion()
330 fuzz->nextRange(&r.fRight, -2147483646, 2147483646); in FuzzNiceRegion()
331 fuzz->nextRange(&r.fBottom, -2147483646, 2147483646); in FuzzNiceRegion()
333 fuzz->nextEnum(&op, SkRegion::kLastOp); in FuzzNiceRegion()