diff options
-rw-r--r-- | src/core/SkReadBuffer.cpp | 18 | ||||
-rw-r--r-- | src/core/SkReadBuffer.h | 13 |
2 files changed, 0 insertions, 31 deletions
diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp index fba02f7bdb..2dd9f093ac 100644 --- a/src/core/SkReadBuffer.cpp +++ b/src/core/SkReadBuffer.cpp @@ -31,7 +31,6 @@ SkReadBuffer::SkReadBuffer() { fTFArray = nullptr; fTFCount = 0; - fFactoryTDArray = nullptr; fFactoryArray = nullptr; fFactoryCount = 0; fBitmapDecoder = nullptr; @@ -50,7 +49,6 @@ SkReadBuffer::SkReadBuffer(const void* data, size_t size) { fTFArray = nullptr; fTFCount = 0; - fFactoryTDArray = nullptr; fFactoryArray = nullptr; fFactoryCount = 0; fBitmapDecoder = nullptr; @@ -71,7 +69,6 @@ SkReadBuffer::SkReadBuffer(SkStream* stream) { fTFArray = nullptr; fTFCount = 0; - fFactoryTDArray = nullptr; fFactoryArray = nullptr; fFactoryCount = 0; fBitmapDecoder = nullptr; @@ -350,17 +347,6 @@ SkFlattenable* SkReadBuffer::readFlattenable(SkFlattenable::Type ft) { return nullptr; } factory = fFactoryArray[index]; - } else if (fFactoryTDArray) { - int32_t index = fReader.readU32(); - if (0 == index) { - return nullptr; // writer failed to give us the flattenable - } - index -= 1; // we stored the index-base-1 - if ((unsigned)index >= (unsigned)fFactoryCount) { - this->validate(false); - return nullptr; - } - factory = (*fFactoryTDArray)[index]; } else { factory = (SkFlattenable::Factory)readFunctionPtr(); if (nullptr == factory) { @@ -397,10 +383,6 @@ void SkReadBuffer::skipFlattenable() { if (0 == fReader.readU32()) { return; } - } else if (fFactoryTDArray) { - if (0 == fReader.readU32()) { - return; - } } else { if (nullptr == this->readFunctionPtr()) { return; diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h index 960f2a3687..a9983989cc 100644 --- a/src/core/SkReadBuffer.h +++ b/src/core/SkReadBuffer.h @@ -199,23 +199,11 @@ public: * were created/written by the writer. SkPicture uses this. */ void setFactoryPlayback(SkFlattenable::Factory array[], int count) { - fFactoryTDArray = nullptr; fFactoryArray = array; fFactoryCount = count; } /** - * Call this with an initially empty array, so the reader can cache each - * factory it sees by name. Used by the pipe code in conjunction with - * SkWriteBuffer::setNamedFactoryRecorder. - */ - void setFactoryArray(SkTDArray<SkFlattenable::Factory>* array) { - fFactoryTDArray = array; - fFactoryArray = nullptr; - fFactoryCount = 0; - } - - /** * Provide a function to decode an SkBitmap from encoded data. Only used if the writer * encoded the SkBitmap. If the proper decoder cannot be used, a red bitmap with the * appropriate size will be used. @@ -244,7 +232,6 @@ private: SkTypeface** fTFArray; int fTFCount; - SkTDArray<SkFlattenable::Factory>* fFactoryTDArray; SkFlattenable::Factory* fFactoryArray; int fFactoryCount; |