Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: src/codec/SkSampledCodec.cpp

Issue 2407543002: Simplify rowsDecoded returned by incrementalDecode (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/codec/SkPngCodec.cpp ('K') | « src/codec/SkPngCodec.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
msarett 2016/10/10 17:19:58 Yes, yes, very glad to see this line of code get d
+ 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;
« src/codec/SkPngCodec.cpp ('K') | « src/codec/SkPngCodec.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698