aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--infra/bots/assets/skimage/VERSION2
-rw-r--r--src/codec/SkSampledCodec.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/infra/bots/assets/skimage/VERSION b/infra/bots/assets/skimage/VERSION
index c7930257df..301160a930 100644
--- a/infra/bots/assets/skimage/VERSION
+++ b/infra/bots/assets/skimage/VERSION
@@ -1 +1 @@
-7 \ No newline at end of file
+8 \ No newline at end of file
diff --git a/src/codec/SkSampledCodec.cpp b/src/codec/SkSampledCodec.cpp
index 403b42f710..cca26000d6 100644
--- a/src/codec/SkSampledCodec.cpp
+++ b/src/codec/SkSampledCodec.cpp
@@ -257,10 +257,11 @@ SkCodec::Result SkSampledCodec::sampledDecode(const SkImageInfo& info, void* pix
return SkCodec::kSuccess;
}
SkASSERT(incResult == SkCodec::kIncompleteInput);
- const int lastRowInOutput = (rowsDecoded - startY) / sampleY;
- // FIXME: Should this be info or nativeInfo? Does it make a difference?
+
+ // Count the rows that we decoded, and also did not skip.
+ const int trueRowsDecoded = (rowsDecoded + sampleY - 1) / sampleY;
this->codec()->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized,
- info.height(), lastRowInOutput);
+ info.height(), trueRowsDecoded);
return SkCodec::kIncompleteInput;
} else if (startResult != SkCodec::kUnimplemented) {
return startResult;