Reland "Switch SkCodec to use skcms" plus fixes

This reverts commit 33d5394d08f645a9f612ba96115acb0e8408a97c,
relanding 81886e8f9461c7049751c6a2c194a1df632dd362 as well as
"Fix CMYK handling in JPEG codec" (commit

Add a test based on the CTS test that failed in the original commit.
purple-displayprofile.png is the image used in the CTS test, with the
Android license.

This also adds a fix for SkAndroidCodec, ensuring that we continue to
use a wide gamut SkColorSpace for images that do not have a numerical
transfer function and have a wide gamut. This includes a test, with
wide-gamut.png, which was created with Photoshop and the profile
"sRGB_Calibrated_Homogeneous.icc" from the skcms tree.

Bug: skia:6839
Bug: skia:8052
Bug: skia:8278
As with the original, no API change

Change-Id: I4e5bba6a3151f9dc6491e8eda73d4de0535bd692
Commit-Queue: Leon Scroggins <>
Reviewed-by: Brian Osman <>
Reviewed-by: Leon Scroggins <>
3 files changed