Remove SkReadBuffer::validateAvailable

Follow on to 4cdbf6056de29e8c12c3b1b4c2c2fa286cf68049. readByteArray was
the only caller of this method, and no longer uses it. So remove it and
its only override.

Bug: 769134
Change-Id: I0aaf97717baba1f0195162f3e644708bc101eba4
Reviewed-on: https://skia-review.googlesource.com/53920
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h
index 980e8cf..2541b54 100644
--- a/src/core/SkReadBuffer.h
+++ b/src/core/SkReadBuffer.h
@@ -215,7 +215,6 @@
     // Default impelementations don't check anything.
     virtual bool validate(bool isValid) { return isValid; }
     virtual bool isValid() const { return true; }
-    virtual bool validateAvailable(size_t size) { return true; }
     bool validateIndex(int index, int count) {
         return this->validate(index >= 0 && index < count);
     }
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp
index bb0b162..2da08c6 100644
--- a/src/core/SkValidatingReadBuffer.cpp
+++ b/src/core/SkValidatingReadBuffer.cpp
@@ -240,10 +240,6 @@
     return fError ? 0 : *(uint32_t*)fReader.peek();
 }
 
-bool SkValidatingReadBuffer::validateAvailable(size_t size) {
-    return this->validate((size <= SK_MaxU32) && fReader.isAvailable(static_cast<uint32_t>(size)));
-}
-
 SkFlattenable* SkValidatingReadBuffer::readFlattenable(SkFlattenable::Type type) {
     // The validating read buffer always uses strings and string-indices for unflattening.
     SkASSERT(0 == this->factoryCount());
diff --git a/src/core/SkValidatingReadBuffer.h b/src/core/SkValidatingReadBuffer.h
index fdf7a3f..3203eba 100644
--- a/src/core/SkValidatingReadBuffer.h
+++ b/src/core/SkValidatingReadBuffer.h
@@ -68,8 +68,6 @@
     bool validate(bool isValid) override;
     bool isValid() const override;
 
-    bool validateAvailable(size_t size) override;
-
 private:
     bool readArray(void* value, size_t size, size_t elementSize);