Fuzz: use SkNullWStream

Change-Id: I2ed989b10671f4acf9aa3e25c5bcb709630cb9e9
Reviewed-on: https://skia-review.googlesource.com/38961
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
Hal Canary 2017-08-26 17:06:42 -04:00 committed by Skia Commit-Bot
parent eda8b52677
commit fe75930ce0

View File

@ -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())));