Index: src/codec/SkCodec.cpp |
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp |
index 84afc2bdee282b598b76f6f75234d276339712e6..644f3e27a7d61730340d0b029fe5ecb669a4ec7f 100644 |
--- a/src/codec/SkCodec.cpp |
+++ b/src/codec/SkCodec.cpp |
@@ -34,9 +34,7 @@ static const DecoderProc gDecoderProcs[] = { |
#ifdef SK_HAS_WEBP_LIBRARY |
{ SkWebpCodec::IsWebp, SkWebpCodec::NewFromStream }, |
#endif |
-#ifdef SK_HAS_GIF_LIBRARY |
{ SkGifCodec::IsGif, SkGifCodec::NewFromStream }, |
-#endif |
#ifdef SK_HAS_PNG_LIBRARY |
{ SkIcoCodec::IsIco, SkIcoCodec::NewFromStream }, |
#endif |
@@ -142,12 +140,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 +153,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 +466,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; |
- } |
} |
} |