Index: src/codec/SkCodec_libbmp.cpp |
diff --git a/src/codec/SkCodec_libbmp.cpp b/src/codec/SkCodec_libbmp.cpp |
index d0c9623a40b36714f0d06a68a1613156084bef35..25f54597c2250a4d00c0e75e38dd7c1269b4cbc7 100644 |
--- a/src/codec/SkCodec_libbmp.cpp |
+++ b/src/codec/SkCodec_libbmp.cpp |
@@ -519,8 +519,11 @@ SkCodec::Result SkBmpCodec::onGetPixels(const SkImageInfo& dstInfo, |
const Options&, |
SkPMColor*, int*) { |
// Check for proper input and output formats |
- if (!this->rewindIfNeeded()) { |
+ SkCodec::RewindState rewindState = this->rewindIfNeeded(); |
+ if (rewindState == kCouldNotRewind_RewindState) { |
return kCouldNotRewind; |
+ } else if (rewindState == kRewound_RewindState) { |
+ return kCouldNotRewind; // TODO(msarett): handle rewinds |
} |
if (dstInfo.dimensions() != this->getInfo().dimensions()) { |
SkCodecPrintf("Error: scaling not supported.\n"); |