Roll skia/third_party/skcms 47820316fcec..d7c7dd8b955e (1 commits)
https://skia.googlesource.com/skcms.git/+log/47820316fcec..d7c7dd8b955e
git log 47820316fcec..d7c7dd8b955e --date=short --no-merges --format='%ad %ae %s'
2019-08-23 mtklein@google.com more careful isfinite_() checks in skcms_TF_invert()
Created with:
gclient setdep -r skia/third_party/skcms@d7c7dd8b955e
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
Bug: None
Change-Id: Ibee3bbd319680fad9f943af45d8e95c507733652
TBR=egdaniel@google.com,mtklein@google.com
TBR=egdaniel@google.com,mtklein@google.com
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236861
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/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc
index 3051b67..b26e4d5 100644
--- a/third_party/skcms/skcms.cc
+++ b/third_party/skcms/skcms.cc
@@ -1487,6 +1487,12 @@
inv.b = -inv.a * inv.d;
}
+ // That should usually make tf_is_valid(&inv) true, but there are a couple situations
+ // where we might still fail here, like non-finite parameter values.
+ if (!tf_is_valid(&inv)) {
+ return false;
+ }
+
assert (inv.a >= 0);
assert (inv.a * inv.d + inv.b >= 0);
@@ -1494,6 +1500,10 @@
// But to preserve the valuable invariant inv(src(1.0f)) == 1.0f, we'll tweak
// e or f of the inverse, depending on which segment contains src(1.0f).
float s = skcms_TransferFunction_eval(src, 1.0f);
+ if (!isfinitef_(s)) {
+ return false;
+ }
+
float sign = s < 0 ? -1.0f : 1.0f;
s *= sign;
if (s < inv.d) {
diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1
index 61fc64b..74d2ff4 100755
--- a/third_party/skcms/version.sha1
+++ b/third_party/skcms/version.sha1
@@ -1 +1 @@
-47820316fcec0c698356770e660be96981448d1a
\ No newline at end of file
+d7c7dd8b955e9633da5ba763bb707854709d3033
\ No newline at end of file