Index: src/core/SkReadBuffer.cpp |
diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp |
index fba02f7bdbc507558913679d73492c52c7a997bf..2dd9f093ac2be7e21da632f84e7f03cc15bbc0c7 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) { |
msarett
2016/03/31 15:05:35
AFAICT, fFactoryCount is always zero when fFactory
|
- 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; |