Index: src/codec/SkCodec_libpng.cpp |
diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp |
index 4850235c0794ab591e8e16167d0409be214a313c..9330ac5aee3974fd8044b6fd22333997be444462 100644 |
--- a/src/codec/SkCodec_libpng.cpp |
+++ b/src/codec/SkCodec_libpng.cpp |
@@ -420,7 +420,11 @@ SkCodec::Result SkPngCodec::initializeSwizzler(const SkImageInfo& requestedInfo, |
SkCodec::Result SkPngCodec::onGetPixels(const SkImageInfo& requestedInfo, void* dst, |
size_t rowBytes, const Options& options, |
SkPMColor ctable[], int* ctableCount) { |
- if (!this->rewindIfNeeded()) { |
+ SkCodec::RewindState rewindState = this->rewindIfNeeded(); |
+ if (rewindState == kCouldNotRewind_RewindState) { |
+ return kCouldNotRewind; |
+ } else if (rewindState == kRewound_RewindState) { |
+ // TODO(scroggo): handle rewinds |
return kCouldNotRewind; |
} |
if (requestedInfo.dimensions() != this->getInfo().dimensions()) { |