Index: src/codec/SkSampledCodec.cpp |
diff --git a/src/codec/SkSampledCodec.cpp b/src/codec/SkSampledCodec.cpp |
index cca26000d684bacaaa8bc52d1896daf66da4b0c0..46286cff9da6f868d181e3250c6bdbe08fe7e41d 100644 |
--- a/src/codec/SkSampledCodec.cpp |
+++ b/src/codec/SkSampledCodec.cpp |
@@ -258,10 +258,9 @@ SkCodec::Result SkSampledCodec::sampledDecode(const SkImageInfo& info, void* pix |
} |
SkASSERT(incResult == SkCodec::kIncompleteInput); |
- // Count the rows that we decoded, and also did not skip. |
- const int trueRowsDecoded = (rowsDecoded + sampleY - 1) / sampleY; |
+ SkASSERT(rowsDecoded <= info.height()); |
this->codec()->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized, |
- info.height(), trueRowsDecoded); |
+ info.height(), rowsDecoded); |
return SkCodec::kIncompleteInput; |
} else if (startResult != SkCodec::kUnimplemented) { |
return startResult; |