| Index: src/codec/SkCodec.cpp
|
| diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp
|
| index 84afc2bdee282b598b76f6f75234d276339712e6..c9b2d5a91fa4ff26a91a8527c4f567c588a47a67 100644
|
| --- a/src/codec/SkCodec.cpp
|
| +++ b/src/codec/SkCodec.cpp
|
| @@ -142,12 +142,6 @@ SkCodec::SkCodec(const SkEncodedInfo& info, const SkImageInfo& imageInfo, SkStre
|
| SkCodec::~SkCodec() {}
|
|
|
| bool SkCodec::rewindIfNeeded() {
|
| - if (!fStream) {
|
| - // Some codecs do not have a stream. They may hold onto their own data or another codec.
|
| - // They must handle rewinding themselves.
|
| - return true;
|
| - }
|
| -
|
| // Store the value of fNeedsRewind so we can update it. Next read will
|
| // require a rewind.
|
| const bool needsRewind = fNeedsRewind;
|
| @@ -161,7 +155,9 @@ bool SkCodec::rewindIfNeeded() {
|
| // startIncrementalDecode will need to be called before incrementalDecode.
|
| fStartedIncrementalDecode = false;
|
|
|
| - if (!fStream->rewind()) {
|
| + // Some codecs do not have a stream. They may hold onto their own data or another codec.
|
| + // They must handle rewinding themselves.
|
| + if (fStream && !fStream->rewind()) {
|
| return false;
|
| }
|
|
|
| @@ -472,14 +468,5 @@ void SkCodec::fillIncompleteImage(const SkImageInfo& info, void* dst, size_t row
|
| fill_proc(fillInfo, fillDst, rowBytes, fillValue, zeroInit, sampler);
|
| break;
|
| }
|
| - case kOutOfOrder_SkScanlineOrder: {
|
| - SkASSERT(1 == linesRequested || this->getInfo().height() == linesRequested);
|
| - const SkImageInfo fillInfo = info.makeWH(fillWidth, 1);
|
| - for (int srcY = linesDecoded; srcY < linesRequested; srcY++) {
|
| - fillDst = SkTAddOffset<void>(dst, this->outputScanline(srcY) * rowBytes);
|
| - fill_proc(fillInfo, fillDst, rowBytes, fillValue, zeroInit, sampler);
|
| - }
|
| - break;
|
| - }
|
| }
|
| }
|
|
|