skia2/include/codec
Leon Scroggins III c6e6a5f45e Simplify SkCodecs' call to SkColorSpaceXform::apply
Most SkCodec subclasses did the following to apply their
SkColorSpaceXform:
  dstFormat = select_xform_format(dstInfo.colorType());
  srcFormat = select_xform_format(<something that doesn't change>);
  xformAlphaType = select_xform_alpha(dstInfo.alphaType(),
                                      this->getInfo().alphaType());
  this->colorXform()->apply(dstFormat, dst, srcFormat, src, width,
                            xformAlphaType);

Consolidate the computation of these parameters into SkCodec and add a
new method to SkCodec that calls apply() with those parameters.

Add a SkColorSpaceXform::ColorFormat to SkCodec. This allows the new
method SkCodec::applyColorXform to supply the ColorFormat.

TBR=reed@google.com
(No change to public API.)

Change-Id: I8ea7ba4c0024be827a9f9359796c778744330f6e
Reviewed-on: https://skia-review.googlesource.com/18523
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-06-05 20:14:57 +00:00
..
SkAndroidCodec.h Allow BF and BRD clients to request an output color space 2017-04-11 14:27:28 +00:00
SkCodec.h Simplify SkCodecs' call to SkColorSpaceXform::apply 2017-06-05 20:14:57 +00:00
SkEncodedInfo.h Remove unnecessary getColorSpace() API from SkCodec 2016-07-21 11:57:49 -07:00