From fe75930ce0b8d9451d29162942badfd568a1ec47 Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Sat, 26 Aug 2017 17:06:42 -0400 Subject: [PATCH] Fuzz: use SkNullWStream Change-Id: I2ed989b10671f4acf9aa3e25c5bcb709630cb9e9 Reviewed-on: https://skia-review.googlesource.com/38961 Commit-Queue: Ben Wagner Reviewed-by: Ben Wagner --- fuzz/FuzzCanvas.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp index bcd4619615..3b3715fe8a 100644 --- a/fuzz/FuzzCanvas.cpp +++ b/fuzz/FuzzCanvas.cpp @@ -1803,11 +1803,7 @@ DEF_FUZZ(DebugGLCanvas, fuzz) { #endif DEF_FUZZ(PDFCanvas, fuzz) { - struct final : public SkWStream { - bool write(const void*, size_t n) override { fN += n; return true; } - size_t bytesWritten() const override { return fN; } - size_t fN = 0; - } stream; + SkNullWStream stream; auto doc = SkDocument::MakePDF(&stream); fuzz_canvas(fuzz, doc->beginPage(SkIntToScalar(kCanvasSize.width()), SkIntToScalar(kCanvasSize.height())));