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

Unified Diff: src/codec/SkPngCodec.cpp

Issue 2401133002: Fix an assert statement in SkPngCodec (Closed)
Patch Set: Set fFirstRow and fLastRow 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
« no previous file with comments | « no previous file | tests/CodecTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkPngCodec.cpp
diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp
index 1e633eaaed3b76b5e9aae380e8a1605b498d84cf..0675653b82da9b86cd279f088ccc15e0a581743e 100644
--- a/src/codec/SkPngCodec.cpp
+++ b/src/codec/SkPngCodec.cpp
@@ -561,6 +561,8 @@ private:
fRowBytes = rowBytes;
fLinesDecoded = 0;
+ fFirstRow = 0;
+ fLastRow = height - 1;
this->processData();
@@ -576,7 +578,7 @@ private:
}
void allRowsCallback(png_bytep row, int rowNum) {
- SkASSERT(rowNum - fFirstRow == fLinesDecoded);
+ SkASSERT(rowNum == fLinesDecoded);
fLinesDecoded++;
this->applyXformRow(fDst, row);
fDst = SkTAddOffset<void>(fDst, fRowBytes);
« no previous file with comments | « no previous file | tests/CodecTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698