fuzz/FuzzCanvas: range in inclucive, not half-open

BUG=skia:7427
Change-Id: Id38e7ed42021a9a4a0c406668d8909e7f47d5ba8
Reviewed-on: https://skia-review.googlesource.com/87765
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This commit is contained in:
Hal Canary 2017-12-20 11:21:05 -05:00 committed by Skia Commit-Bot
parent 539040cbf9
commit c8bebd461c

View File

@ -1325,14 +1325,15 @@ static void fuzz_canvas(Fuzz* fuzz, SkCanvas* canvas, int depth = 9) {
break; break;
case 24: { case 24: {
fuzz_paint(fuzz, &paint, depth - 1); fuzz_paint(fuzz, &paint, depth - 1);
uint8_t pointMode; SkCanvas::PointMode pointMode;
fuzz->nextRange(&pointMode, 0, 3); fuzz_enum_range(fuzz, &pointMode,
SkCanvas::kPoints_PointMode, SkCanvas::kPolygon_PointMode);
size_t count; size_t count;
constexpr int kMaxCount = 30; constexpr int kMaxCount = 30;
fuzz->nextRange(&count, 0, kMaxCount); fuzz->nextRange(&count, 0, kMaxCount);
SkPoint pts[kMaxCount]; SkPoint pts[kMaxCount];
fuzz->nextN(pts, count); fuzz->nextN(pts, count);
canvas->drawPoints((SkCanvas::PointMode)pointMode, count, pts, paint); canvas->drawPoints(pointMode, count, pts, paint);
break; break;
} }
case 25: { case 25: {