aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-05-02 07:09:24 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-02 07:09:25 -0700
commit57b46159740020ef904aaf41e9e5ae07106591cc (patch)
treee47c5737657391be1e92eb5703af8275769319bc
parent778555cfda267eee031b9fc8530f988cd270fbf0 (diff)
Remove unused encodedString API on SkWriteBuffer/SkReadBuffer
-rw-r--r--include/core/SkWriteBuffer.h1
-rw-r--r--src/core/SkReadBuffer.cpp9
-rw-r--r--src/core/SkReadBuffer.h1
-rw-r--r--src/core/SkValidatingReadBuffer.cpp13
-rw-r--r--src/core/SkValidatingReadBuffer.h1
-rw-r--r--src/core/SkWriteBuffer.cpp8
6 files changed, 0 insertions, 33 deletions
diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h
index bd04dec0f9..1577ad04bc 100644
--- a/include/core/SkWriteBuffer.h
+++ b/include/core/SkWriteBuffer.h
@@ -54,7 +54,6 @@ public:
void writeUInt(uint32_t value);
void write32(int32_t value);
void writeString(const char* value);
- void writeEncodedString(const void* value, size_t byteLength, SkPaint::TextEncoding encoding);
void writeFunctionPtr(void* ptr) { fWriter.writePtr(ptr); }
void writeFlattenable(const SkFlattenable* flattenable);
diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp
index 70b0d13a40..b0a371390b 100644
--- a/src/core/SkReadBuffer.cpp
+++ b/src/core/SkReadBuffer.cpp
@@ -117,15 +117,6 @@ void SkReadBuffer::readString(SkString* string) {
string->set(strContents, len);
}
-void* SkReadBuffer::readEncodedString(size_t* length, SkPaint::TextEncoding encoding) {
- SkDEBUGCODE(int32_t encodingType = ) fReader.readInt();
- SkASSERT(encodingType == encoding);
- *length = fReader.readInt();
- void* data = sk_malloc_throw(*length);
- memcpy(data, fReader.skip(SkAlign4(*length)), *length);
- return data;
-}
-
void SkReadBuffer::readPoint(SkPoint* point) {
point->fX = fReader.readScalar();
point->fY = fReader.readScalar();
diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h
index 8f15a8d366..ae03a69042 100644
--- a/src/core/SkReadBuffer.h
+++ b/src/core/SkReadBuffer.h
@@ -122,7 +122,6 @@ public:
// strings -- the caller is responsible for freeing the string contents
virtual void readString(SkString* string);
- virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encoding);
// common data structures
virtual void readPoint(SkPoint* point);
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp
index bc4042a2d7..a27d42d82d 100644
--- a/src/core/SkValidatingReadBuffer.cpp
+++ b/src/core/SkValidatingReadBuffer.cpp
@@ -110,19 +110,6 @@ void SkValidatingReadBuffer::readString(SkString* string) {
}
}
-void* SkValidatingReadBuffer::readEncodedString(size_t* length, SkPaint::TextEncoding encoding) {
- const int32_t encodingType = this->readInt();
- this->validate(encodingType == encoding);
- *length = this->readInt();
- const void* ptr = this->skip(SkAlign4(*length));
- void* data = nullptr;
- if (!fError) {
- data = sk_malloc_throw(*length);
- memcpy(data, ptr, *length);
- }
- return data;
-}
-
void SkValidatingReadBuffer::readPoint(SkPoint* point) {
point->fX = this->readScalar();
point->fY = this->readScalar();
diff --git a/src/core/SkValidatingReadBuffer.h b/src/core/SkValidatingReadBuffer.h
index aaea1493ef..cd2d0c1ebf 100644
--- a/src/core/SkValidatingReadBuffer.h
+++ b/src/core/SkValidatingReadBuffer.h
@@ -42,7 +42,6 @@ public:
// strings -- the caller is responsible for freeing the string contents
void readString(SkString* string) override;
- void* readEncodedString(size_t* length, SkPaint::TextEncoding encoding) override;
// common data structures
SkFlattenable* readFlattenable(SkFlattenable::Type type) override;
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp
index 2b35b67702..5c65755e3e 100644
--- a/src/core/SkWriteBuffer.cpp
+++ b/src/core/SkWriteBuffer.cpp
@@ -74,14 +74,6 @@ void SkWriteBuffer::writeString(const char* value) {
fWriter.writeString(value);
}
-void SkWriteBuffer::writeEncodedString(const void* value, size_t byteLength,
- SkPaint::TextEncoding encoding) {
- fWriter.writeInt(encoding);
- fWriter.writeInt(SkToU32(byteLength));
- fWriter.write(value, byteLength);
-}
-
-
void SkWriteBuffer::writeColor(const SkColor& color) {
fWriter.write32(color);
}