Support decoding Gray to A8 in PNG.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 18 Jul 2013 20:03:15 +0000 (20:03 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 18 Jul 2013 20:03:15 +0000 (20:03 +0000)
commitc70a3aa39bd3bf8e34906feecce5ae87f668e7d8
treee8527b75b9cb327028ef6418d170959d34b66bd8
parenteed6f1b76b6690796e3d40993b1504ba1eca2df5
Support decoding Gray to A8 in PNG.

Move the code which sets the filler and forces gray to rgb after
we get the config, so we can skip them if the caller wants A8.

Call set_gray_to_rgb consistently for both normal decode and subset
decode.

In PNG, prevent subset decodes from alternating configs, which
would otherwise fail.

Use SK_RESTRICT for pointers in getBitmapConfig.

Ref the SkStream input to buildTileIndex, so it will not be destroyed
before calling decodeSubset.

Convert some fields to match Skia style.

Builds on https://codereview.chromium.org/18083026/, which has not yet been checked in.

R=reed@google.com

Review URL: https://codereview.chromium.org/19185006

git-svn-id: http://skia.googlecode.com/svn/trunk@10162 2bbb7eff-a529-9590-31e7-b0007b416f81
src/images/SkImageDecoder_libpng.cpp