Fuzz Canvas: Remember that nextRange is inclusive.
authorHal Canary <halcanary@google.com>
Tue, 7 Mar 2017 20:06:29 +0000 (15:06 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 7 Mar 2017 21:27:30 +0000 (21:27 +0000)
BUG=skia:6336
Change-Id: I5ca005f8bf821d5a6f153c3df80d4c7309519cba
Reviewed-on: https://skia-review.googlesource.com/9395
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

fuzz/FuzzCanvas.cpp

index 3114975..2fde8b5 100644 (file)
@@ -1103,8 +1103,8 @@ void fuzz_canvas(Fuzz* fuzz, SkCanvas* canvas, int depth = 4) {
                 SkCanvas::VertexMode vertexMode;
                 SkBlendMode mode;
                 uint8_t vm, bm;
-                fuzz->nextRange(&vm, 0, 3);
-                fuzz->nextRange(&bm, 0, (int)SkBlendMode::kLastMode);
+                fuzz->nextRange(&vm, 0, (uint8_t)SkCanvas::kTriangleFan_VertexMode);
+                fuzz->nextRange(&bm, 0, (uint8_t)SkBlendMode::kLastMode);
                 vertexMode = (SkCanvas::VertexMode)vm;
                 mode = (SkBlendMode)bm;
                 constexpr int kMaxCount = 100;