aboutsummaryrefslogtreecommitdiffhomepage
path: root/fuzz
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-04-03 11:11:09 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-03 15:50:16 +0000
commit887cdf112809727c51890ba8b98b3ddce22249f0 (patch)
tree6ae2774f9ec869f72cf117993eba25c6ef97e28b /fuzz
parentb55dd553124cd00260bc9e3a63ec8a8fe09412a8 (diff)
move vertex-mode enum into SkVertices
BUG=skia:6366 Change-Id: I3c0bf96cce6d32c9b8d12d16a772aaa6f18981aa Reviewed-on: https://skia-review.googlesource.com/11062 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/FuzzCanvas.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp
index 3b533398a8..ba9f3eda90 100644
--- a/fuzz/FuzzCanvas.cpp
+++ b/fuzz/FuzzCanvas.cpp
@@ -1717,9 +1717,9 @@ static void fuzz_canvas(Fuzz* fuzz, SkCanvas* canvas, int depth = 9) {
}
case 53: {
fuzz_paint(fuzz, &paint, depth - 1);
- SkCanvas::VertexMode vertexMode;
+ SkVertices::VertexMode vertexMode;
SkBlendMode blendMode;
- fuzz_enum_range(fuzz, &vertexMode, 0, SkCanvas::kTriangleFan_VertexMode);
+ fuzz_enum_range(fuzz, &vertexMode, 0, SkVertices::kTriangleFan_VertexMode);
fuzz->next(&blendMode);
constexpr int kMaxCount = 100;
int vertexCount;
@@ -1744,18 +1744,11 @@ static void fuzz_canvas(Fuzz* fuzz, SkCanvas* canvas, int depth = 9) {
fuzz->nextRange(&indices[i], 0, vertexCount - 1);
}
}
- if (make_fuzz_t<bool>(fuzz)) {
- canvas->drawVertices(vertexMode, vertexCount, vertices,
- useTexs ? texs : nullptr, useColors ? colors : nullptr,
- blendMode, indexCount > 0 ? indices : nullptr, indexCount,
- paint);
- } else {
- canvas->drawVertices(SkVertices::MakeCopy(vertexMode, vertexCount, vertices,
- useTexs ? texs : nullptr,
- useColors ? colors : nullptr,
- indexCount, indices),
- blendMode, paint);
- }
+ canvas->drawVertices(SkVertices::MakeCopy(vertexMode, vertexCount, vertices,
+ useTexs ? texs : nullptr,
+ useColors ? colors : nullptr,
+ indexCount, indices),
+ blendMode, paint);
break;
}
default: