Have FuzzPathop make a new path every time
This will hopefully be more interesting logic. Bug: skia: Change-Id: I8aa6ab3d66ece4a6c1042701e1aae06d96247f32 Reviewed-on: https://skia-review.googlesource.com/c/164600 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
b70fd91681
commit
1f0170ce7a
@ -19,16 +19,16 @@ DEF_FUZZ(Pathop, fuzz) {
|
||||
fuzz->nextRange(&choice, 0, 4);
|
||||
switch (choice) {
|
||||
case 0: {
|
||||
SkPath path;
|
||||
FuzzEvilPath(fuzz, &path, SkPath::Verb::kDone_Verb);
|
||||
SkPath::FillType ft;
|
||||
fuzz->nextEnum(&ft, 0, SkPath::kInverseEvenOdd_FillType);
|
||||
path.setFillType(ft);
|
||||
|
||||
uint8_t ops;
|
||||
fuzz->nextRange(&ops, 0, MAX_OPS);
|
||||
SkOpBuilder builder;
|
||||
for (uint8_t i = 0; i < ops; i++) {
|
||||
for (uint8_t i = 0; i < ops && !fuzz->exhausted(); i++) {
|
||||
SkPath path;
|
||||
FuzzEvilPath(fuzz, &path, SkPath::Verb::kDone_Verb);
|
||||
SkPath::FillType ft;
|
||||
fuzz->nextEnum(&ft, 0, SkPath::kInverseEvenOdd_FillType);
|
||||
path.setFillType(ft);
|
||||
|
||||
SkPathOp op;
|
||||
fuzz->nextEnum(&op, 0, SkPathOp::kReverseDifference_SkPathOp);
|
||||
builder.add(path, op);
|
||||
|
Loading…
Reference in New Issue
Block a user