A variety of SkPngCodec clean-ups
authormsarett <msarett@google.com>
Mon, 1 Feb 2016 16:03:29 +0000 (08:03 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 1 Feb 2016 16:03:29 +0000 (08:03 -0800)
commit13a912354875a747aefb1f00de50eb3ec454ab1f
tree9d3bc000cdc8398805591ad4dbd0424540f0dfba
parent23526963135bd15737505bd560d41b0d5a41439e
A variety of SkPngCodec clean-ups

(1) Remove #ifdefs that extend support to > 1.2.
Using nullptr everywhere should work on all versions.

(2) Use png_get_valid(tRNS) to check for transparency
It does the same thing we were doing previously in less
work.

(3) Remove image size check
Clients allocate their own memory, and they have the option
to perform scaled and partial decodes.  So we don't need
to arbitrarily fail on large images.

(4) Remove FIXME for subsitute trans color
libpng is already doing this for us.

(5) Remove #ifdef PNG_READ_PACK_SUPPORTED
We don't have a fallback, so we'll fail to compile if this
isn't supported.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643623004
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1643623004
src/codec/SkPngCodec.cpp