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 <>
diff --git a/images/mandrill_cmyk.jpg b/images/mandrill_cmyk.jpg
new file mode 100644
index 0000000..0a7f29b
--- /dev/null
+++ b/images/mandrill_cmyk.jpg
Binary files differ
diff --git a/images/purple-displayprofile.png b/images/purple-displayprofile.png
new file mode 100644
index 0000000..6448991
--- /dev/null
+++ b/images/purple-displayprofile.png
Binary files differ
diff --git a/images/wide-gamut.png b/images/wide-gamut.png
new file mode 100644
index 0000000..c688255
--- /dev/null
+++ b/images/wide-gamut.png
Binary files differ