Port 2 Canvas fuzzers to oss-fuzz
Bug: skia:
Change-Id: I0d34bfff4a53f831986614844bdc955935f28501
Reviewed-on: https://skia-review.googlesource.com/115582
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp
index 0180809..c7f1419 100644
--- a/fuzz/FuzzCanvas.cpp
+++ b/fuzz/FuzzCanvas.cpp
@@ -1703,12 +1703,11 @@
fuzz_canvas(fuzz, SkMakeNullCanvas().get());
}
-// 8.5x11 letter paper at 72ppi.
-constexpr SkISize kCanvasSize = {612, 792};
+constexpr SkISize kCanvasSize = {128, 160};
DEF_FUZZ(RasterN32Canvas, fuzz) {
auto surface = SkSurface::MakeRasterN32Premul(kCanvasSize.width(), kCanvasSize.height());
- SkASSERT(surface && surface->getCanvas());
+ if (!surface || !surface->getCanvas()) { fuzz->signalBug(); }
fuzz_canvas(fuzz, surface->getCanvas());
}