From f2a4cc1a7b61a4a30b50aa4d3f7ce47e141b22a4 Mon Sep 17 00:00:00 2001 From: skia-autoroll Date: Mon, 14 Jan 2019 15:42:07 +0000 Subject: [PATCH] Roll skia/third_party/skcms ca80251f9aca..cd2260c9f528 (1 commits) https://skia.googlesource.com/skcms.git/+log/ca80251f9aca..cd2260c9f528 2019-01-14 mtklein@google.com clean up SKCMS_LEGACY_TF_INVERT The AutoRoll server is located here: https://autoroll.skia.org/r/skcms-skia-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary. CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux-blink-rel TBR=halcanary@google.com Change-Id: I3c5d242258fdd59b63703e467ec69168f03b0077 Reviewed-on: https://skia-review.googlesource.com/c/183785 Reviewed-by: skia-autoroll Commit-Queue: skia-autoroll --- third_party/skcms/skcms.cc | 10 ---------- third_party/skcms/version.sha1 | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc index 3e8154654b..f41376eda5 100644 --- a/third_party/skcms/skcms.cc +++ b/third_party/skcms/skcms.cc @@ -1105,11 +1105,7 @@ const skcms_TransferFunction* skcms_sRGB_TransferFunction() { const skcms_TransferFunction* skcms_sRGB_Inverse_TransferFunction() { static const skcms_TransferFunction sRGB_inv = -#ifndef SKCMS_LEGACY_TF_INVERT {0.416666657f, 1.137283325f, -0.0f, 12.920000076f, 0.003130805f, -0.054969788f, -0.0f}; -#else - { (float)(1/2.4), 1.137119f, 0, 12.92f, 0.0031308f, -0.055f, 0 }; -#endif return &sRGB_inv; } @@ -1453,24 +1449,18 @@ bool skcms_TransferFunction_invert(const skcms_TransferFunction* src, skcms_Tran // (1/a)( y - e)^1/g - b/a = x // (ky - ke)^1/g - b/a = x -#ifndef SKCMS_LEGACY_TF_INVERT float k = powf_(src->a, -src->g); // (1/a)^g == a^-g -#else - float k = powf_(1.0f / src->a, src->g); -#endif inv.g = 1.0f / src->g; inv.a = k; inv.b = -k * src->e; inv.e = -src->b / src->a; -#ifndef SKCMS_LEGACY_TF_INVERT // Now in principle we're done. // But to preserve the valuable invariant inv(src(1.0f)) == 1.0f, // we'll tweak e. These two values should be close to each other, // just down to numerical precision issues, especially from powf_. float s = powf_(src->a + src->b, src->g) + src->e; inv.e = 1.0f - powf_(inv.a * s + inv.b, inv.g); -#endif *dst = inv; return tf_is_valid(dst); diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1 index 83db860ef1..2e80ce1f43 100755 --- a/third_party/skcms/version.sha1 +++ b/third_party/skcms/version.sha1 @@ -1 +1 @@ -ca80251f9aca2a4cb2cf98cca200025040f4c9bc \ No newline at end of file +cd2260c9f5289b05d6b23797a291e54508026823 \ No newline at end of file