Simplify rowsDecoded returned by incrementalDecode
authorscroggo <scroggo@chromium.org>
Mon, 10 Oct 2016 18:35:01 +0000 (11:35 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 10 Oct 2016 18:35:01 +0000 (11:35 -0700)
commitff9f7bbef6fdbd2ae7965ff18981aa8df33abd96
tree4bca9d23a8c3c01adc2b9051d8c5ded18202bda8
parent76bcd4f189b43e0235e496c0eddf7b3e9f4167f5
Simplify rowsDecoded returned by incrementalDecode

When sampling, we previously had to figure out the number of rows that
were written to the output based on the value reported by
incrementalDecode. (We also messed up the first time - see the fix in
crrev.com/2343153003.)

Instead, make incrementalDecode report the actual number of rows
written to. This can be provided directly to fill.

Make SkPngCodec report the correct number of rows, by incrementing its
count when it actually writes to the destination.

This also will simplify my in progress GIF change.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2407543002

Review-Url: https://codereview.chromium.org/2407543002
src/codec/SkPngCodec.cpp
src/codec/SkSampledCodec.cpp