Index: fuzz/fuzz.cpp |
diff --git a/fuzz/fuzz.cpp b/fuzz/fuzz.cpp |
index b8375d344a1e9a6ce1099d97d5661f9562e74a94..4ca253343d2f1db222475eaacc653c5a3b2253cf 100644 |
--- a/fuzz/fuzz.cpp |
+++ b/fuzz/fuzz.cpp |
@@ -14,6 +14,8 @@ |
#include "SkImageEncoder.h" |
#include "SkMallocPixelRef.h" |
#include "SkPicture.h" |
+#include "SkPicture.h" |
+#include "SkPicture.h" |
#include "SkStream.h" |
#include <cmath> |
@@ -404,6 +406,12 @@ Fuzz::Fuzz(SkData* bytes) : fBytes(SkSafeRef(bytes)), fNextByte(0) {} |
void Fuzz::signalBug () { SkDebugf("Signal bug\n"); raise(SIGSEGV); } |
void Fuzz::signalBoring() { SkDebugf("Signal boring\n"); exit(0); } |
+size_t Fuzz::size() { return fBytes->size(); } |
+ |
+size_t Fuzz::remaining() { |
+ return fBytes->size() - fNextByte; |
+} |
+ |
template <typename T> |
T Fuzz::nextT() { |
if (fNextByte + sizeof(T) > fBytes->size()) { |