Make swizzler optional for SkPngCodec, refactor xforms

I think is a good redesign that will allow us to handle more png
xforms more efficiently.  And I also think it reduces a bit of
complexity.

PNGs can be RGBA, RGB, Gray, GrayAlpha, Index8.

The swizzler handles all of those input formats and all Skia
output formats.  Swizzler also provides sampling/subsetting.

Color xforms currently only handles RGBA.  So we use the
swizzler to convert to RGBA first.  I've started thinking
about adding RGB, Gray, etc. support for color xforms.
In this case (and the RGBA case), we should skip the
swizzling step.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2279313003

Review-Url: https://codereview.chromium.org/2279313003
2 files changed