Roll skia/third_party/skcms b118cb0ef477..e51ca8b81987 (1 commits)

https://skia.googlesource.com/skcms.git/+log/b118cb0ef477..e51ca8b81987

git log b118cb0ef477..e51ca8b81987 --date=short --no-merges --format='%ad %ae %s'
2019-11-11 brianosman@google.com Add CHAD and WTPT functions to public API

Created with:
  gclient setdep -r skia/third_party/skcms@e51ca8b81987

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skcms-skia-autoroll
Please CC halcanary@google.com,mtklein@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux-blink-rel

Bug: None
Change-Id: I68b587e2ecb88a60c3eb68b0dd8231d262b7a263
TBR=halcanary@google.com,mtklein@google.com
TBR=halcanary@google.com,mtklein@google.com
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253902
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
diff --git a/include/third_party/skcms/skcms.h b/include/third_party/skcms/skcms.h
index f458784..789f975 100644
--- a/include/third_party/skcms/skcms.h
+++ b/include/third_party/skcms/skcms.h
@@ -186,6 +186,9 @@
 SKCMS_API void skcms_GetTagByIndex    (const skcms_ICCProfile*, uint32_t idx, skcms_ICCTag*);
 SKCMS_API bool skcms_GetTagBySignature(const skcms_ICCProfile*, uint32_t sig, skcms_ICCTag*);
 
+SKCMS_API bool skcms_GetCHAD(const skcms_ICCProfile*, skcms_Matrix3x3*);
+SKCMS_API bool skcms_GetWTPT(const skcms_ICCProfile*, float xyz[3]);
+
 // These are common ICC signature values
 enum {
     // data_color_space
diff --git a/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc
index 99b2d87..1b24afc 100644
--- a/third_party/skcms/skcms.cc
+++ b/third_party/skcms/skcms.cc
@@ -266,6 +266,7 @@
     skcms_Signature_mAB  = 0x6D414220,
 
     skcms_Signature_CHAD = 0x63686164,
+    skcms_Signature_WTPT = 0x77747074,
 
     // Type signatures
     skcms_Signature_curv = 0x63757276,
@@ -391,6 +392,12 @@
     return true;
 }
 
+bool skcms_GetWTPT(const skcms_ICCProfile* profile, float xyz[3]) {
+    skcms_ICCTag tag;
+    return skcms_GetTagBySignature(profile, skcms_Signature_WTPT, &tag) &&
+           read_tag_xyz(&tag, &xyz[0], &xyz[1], &xyz[2]);
+}
+
 static bool read_to_XYZD50(const skcms_ICCTag* rXYZ, const skcms_ICCTag* gXYZ,
                            const skcms_ICCTag* bXYZ, skcms_Matrix3x3* toXYZ) {
     return read_tag_xyz(rXYZ, &toXYZ->vals[0][0], &toXYZ->vals[1][0], &toXYZ->vals[2][0]) &&
diff --git a/third_party/skcms/skcms_internal.h b/third_party/skcms/skcms_internal.h
index 551128a..3a82ec7 100644
--- a/third_party/skcms/skcms_internal.h
+++ b/third_party/skcms/skcms_internal.h
@@ -21,9 +21,6 @@
 // ~~~~ General Helper Macros ~~~~
     #define ARRAY_COUNT(arr) (int)(sizeof((arr)) / sizeof(*(arr)))
 
-// ~~~~ skcms_ICCProfile ~~~~
-    bool skcms_GetCHAD(const skcms_ICCProfile* profile, skcms_Matrix3x3* m);
-
     // 252 of a random shuffle of all possible bytes.
     // 252 is evenly divisible by 3 and 4.  Only 192, 10, 241, and 43 are missing.
     // Used for ICC profile equivalence testing.
diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1
index 87e9385..316cfbd 100755
--- a/third_party/skcms/version.sha1
+++ b/third_party/skcms/version.sha1
@@ -1 +1 @@
-b118cb0ef4778abb15ab39f654da83f562e44520
\ No newline at end of file
+e51ca8b819875c4d3ce30118db013cc707dd30e0
\ No newline at end of file