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

Issue 2401133002: Fix an assert statement in SkPngCodec (Closed)

Created:
4 years, 2 months ago by scroggo_chromium
Modified:
4 years, 2 months ago
Reviewers:
msarett
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fix an assert statement in SkPngCodec allRowsCallback was asserting that rowNum - fFirstRow == fLinesDecoded But it was expecting fFirstRow to be 0 (logically, it is, since we are decoding all rows), and it never set it (because it doesn't really need to, except for this assert). This is only a problem if we reuse an SkPngCodec after previously scaling with it. Add a test that triggers the assert, and fix it. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2401133002 Committed: https://skia.googlesource.com/skia/+/c46cdd48eb0d04f54ecad8ecfa7b3158090c3a0a

Patch Set 1 #

Patch Set 2 : Remove printf #

Patch Set 3 : Set fFirstRow and fLastRow #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -1 line) Patch
M src/codec/SkPngCodec.cpp View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M tests/CodecTest.cpp View 1 1 chunk +30 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 10 (5 generated)
scroggo_chromium
4 years, 2 months ago (2016-10-07 20:29:40 UTC) #3
msarett
Should we be reseting this field in onRewind()? lgtm
4 years, 2 months ago (2016-10-10 00:32:18 UTC) #4
scroggo_chromium
On 2016/10/10 00:32:18, msarett wrote: > Should we be reseting this field in onRewind()? I ...
4 years, 2 months ago (2016-10-10 13:21:42 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2401133002/40001
4 years, 2 months ago (2016-10-10 13:21:53 UTC) #8
commit-bot: I haz the power
4 years, 2 months ago (2016-10-10 13:45:35 UTC) #10
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://skia.googlesource.com/skia/+/c46cdd48eb0d04f54ecad8ecfa7b3158090c3a0a

Powered by Google App Engine
This is Rietveld 408576698