Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: src/core/SkReadBuffer.cpp

Issue 1845283002: Remode dead code from SkReadBuffer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkReadBuffer.h ('K') | « src/core/SkReadBuffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« src/core/SkReadBuffer.h ('K') | « src/core/SkReadBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698