• Home
  • Raw
  • Download

Lines Matching full:fuzz

8 #include "fuzz/Fuzz.h"
9 #include "fuzz/FuzzCommon.h"
13 static void fuzz_nice_float(Fuzz* fuzz, float* f) { in fuzz_nice_float() argument
15 fuzz->next(&v); in fuzz_nice_float()
21 static void fuzz_nice_float(Fuzz* fuzz, float* f, Args... rest) { in fuzz_nice_float() argument
22 fuzz_nice_float(fuzz, f); in fuzz_nice_float()
23 fuzz_nice_float(fuzz, rest...); in fuzz_nice_float()
26 static void fuzz_nice_rect(Fuzz* fuzz, SkRect* r) { in fuzz_nice_rect() argument
27 fuzz_nice_float(fuzz, &r->fLeft, &r->fTop, &r->fRight, &r->fBottom); in fuzz_nice_rect()
32 void FuzzNicePath(Fuzz* fuzz, SkPath* path, int maxOps) { in FuzzNicePath() argument
33 if (maxOps <= 0 || fuzz->exhausted() || path->countPoints() > 100000) { in FuzzNicePath()
37 fuzz->nextRange(&fillType, 0, (uint8_t)SkPathFillType::kInverseEvenOdd); in FuzzNicePath()
40 fuzz->nextRange(&numOps, 0, maxOps); in FuzzNicePath()
50 fuzz->nextRange(&op, 0, MAX_PATH_OPERATION); in FuzzNicePath()
61 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
65 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
69 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
73 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
77 fuzz_nice_float(fuzz, &a, &b, &c, &d); in FuzzNicePath()
81 fuzz_nice_float(fuzz, &a, &b, &c, &d); in FuzzNicePath()
85 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e); in FuzzNicePath()
89 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e); in FuzzNicePath()
93 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e, &f); in FuzzNicePath()
97 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e, &f); in FuzzNicePath()
101 fuzz_nice_float(fuzz, &a, &b, &c, &d, &e); in FuzzNicePath()
105 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
106 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
107 fuzz->next(&test); in FuzzNicePath()
114 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
115 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
120 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
122 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
123 fuzz->next(&ui); in FuzzNicePath()
127 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
129 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
133 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
135 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
136 fuzz->next(&ui); in FuzzNicePath()
140 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
142 fuzz_nice_float(fuzz, &a, &b, &c); in FuzzNicePath()
146 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
147 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
151 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
152 fuzz_nice_rect(fuzz, &r); in FuzzNicePath()
153 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
158 FuzzNiceRRect(fuzz, &rr); in FuzzNicePath()
159 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
164 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
166 FuzzNiceRRect(fuzz, &rr); in FuzzNicePath()
170 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
172 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
173 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
178 fuzz->nextRange(&ui, 0, 1); in FuzzNicePath()
180 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
185 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
195 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
199 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
200 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
204 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
208 FuzzNicePath(fuzz, &p, maxOps-1); in FuzzNicePath()
211 FuzzNiceMatrix(fuzz, &m); in FuzzNicePath()
216 fuzz_nice_float(fuzz, &a, &b); in FuzzNicePath()
232 void FuzzEvilPath(Fuzz* fuzz, SkPath* path, int last_verb) { in FuzzEvilPath() argument
233 while (!fuzz->exhausted()) { in FuzzEvilPath()
237 fuzz->next(&operation); in FuzzEvilPath()
242 fuzz->next(&a, &b); in FuzzEvilPath()
247 fuzz->next(&a, &b); in FuzzEvilPath()
252 fuzz->next(&a, &b, &c, &d); in FuzzEvilPath()
257 fuzz->next(&a, &b, &c, &d, &e); in FuzzEvilPath()
262 fuzz->next(&a, &b, &c, &d, &e, &f); in FuzzEvilPath()
277 void FuzzNiceRRect(Fuzz* fuzz, SkRRect* rr) { in FuzzNiceRRect() argument
279 fuzz_nice_rect(fuzz, &r); in FuzzNiceRRect()
283 fuzz->nextRange(&vec.fX, 0.0f, 1.0f); in FuzzNiceRRect()
285 fuzz->nextRange(&vec.fY, 0.0f, 1.0f); in FuzzNiceRRect()
292 void FuzzNiceMatrix(Fuzz* fuzz, SkMatrix* m) { in FuzzNiceMatrix() argument
296 fuzz->nextRange(&matrixType, 0, 4); in FuzzNiceMatrix()
302 fuzz->nextRange(&buffer[0], -4000.0f, 4000.0f); in FuzzNiceMatrix()
303 fuzz->nextRange(&buffer[1], -4000.0f, 4000.0f); in FuzzNiceMatrix()
307 fuzz->nextRange(&buffer[0], -400.0f, 400.0f); in FuzzNiceMatrix()
308 fuzz->nextRange(&buffer[1], -400.0f, 400.0f); in FuzzNiceMatrix()
309 fuzz->nextRange(&buffer[2], -4000.0f, 4000.0f); in FuzzNiceMatrix()
310 fuzz->nextRange(&buffer[3], -4000.0f, 4000.0f); in FuzzNiceMatrix()
315 fuzz->nextN(buffer, 6); in FuzzNiceMatrix()
319 fuzz->nextN(buffer, kArrayLength); in FuzzNiceMatrix()
328 void FuzzNiceRegion(Fuzz* fuzz, SkRegion* region, int maxN) { in FuzzNiceRegion() argument
330 fuzz->nextRange(&N, 0, maxN); in FuzzNiceRegion()
335 fuzz->nextRange(&r.fLeft, -2147483646, 2147483646); in FuzzNiceRegion()
336 fuzz->nextRange(&r.fTop, -2147483646, 2147483646); in FuzzNiceRegion()
337 fuzz->nextRange(&r.fRight, -2147483646, 2147483646); in FuzzNiceRegion()
338 fuzz->nextRange(&r.fBottom, -2147483646, 2147483646); in FuzzNiceRegion()
340 fuzz->nextEnum(&op, SkRegion::kLastOp); in FuzzNiceRegion()