aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2017-10-02 11:10:55 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-02 15:32:28 +0000
commitc405b9d5e369c43d12b637518504dc51878d1c78 (patch)
tree780f792f01036e0d45fa130105ee8567a3eee65d /src/core
parent5655ba4398854fbfeff33a47aad4b79a621f36fc (diff)
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>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkReadBuffer.h1
-rw-r--r--src/core/SkValidatingReadBuffer.cpp4
-rw-r--r--src/core/SkValidatingReadBuffer.h2
3 files changed, 0 insertions, 7 deletions
diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h
index 980e8cf80f..2541b54202 100644
--- a/src/core/SkReadBuffer.h
+++ b/src/core/SkReadBuffer.h
@@ -215,7 +215,6 @@ public:
// 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 bb0b162872..2da08c6f09 100644
--- a/src/core/SkValidatingReadBuffer.cpp
+++ b/src/core/SkValidatingReadBuffer.cpp
@@ -240,10 +240,6 @@ uint32_t SkValidatingReadBuffer::getArrayCount() {
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 fdf7a3f3ff..3203ebac55 100644
--- a/src/core/SkValidatingReadBuffer.h
+++ b/src/core/SkValidatingReadBuffer.h
@@ -68,8 +68,6 @@ public:
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);