From 300b6197e344706f543b570bfcfa8f46da1dd2e3 Mon Sep 17 00:00:00 2001 From: "skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com" Date: Fri, 7 Sep 2018 15:26:38 +0000 Subject: [PATCH] Roll skia/third_party/skcms 54b6cee88c40..52df767ea52b (1 commits) https://skia.googlesource.com/skcms.git/+log/54b6cee88c40..52df767ea52b 2018-09-07 mtklein@google.com Op_noop is pointless 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=master.tryserver.blink:linux_trusty_blink_rel TBR=jvanverth@google.com Change-Id: I8268153c7c2cf15bdbf5832d459e26c33c12fb39 Reviewed-on: https://skia-review.googlesource.com/152603 Reviewed-by: skcms-skia-autoroll Commit-Queue: skcms-skia-autoroll --- third_party/skcms/skcms.cc | 16 ++++++++-------- third_party/skcms/src/Transform_inl.h | 2 -- third_party/skcms/version.sha1 | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc index b7aaee4c4599e..84da16fe5a86f 100644 --- a/third_party/skcms/skcms.cc +++ b/third_party/skcms/skcms.cc @@ -1750,8 +1750,6 @@ bool skcms_ApproximateCurve(const skcms_Curve* curve, // ~~~~ Impl. of skcms_Transform() ~~~~ typedef enum { - Op_noop, - Op_load_a8, Op_load_g8, Op_load_4444, @@ -1976,9 +1974,11 @@ static OpAndArg select_curve_op(const skcms_Curve* curve, int channel) { { Op_tf_a, Op_table_8_a, Op_table_16_a }, }; + const OpAndArg noop = { Op_load_a8/*doesn't matter*/, nullptr }; + if (curve->table_entries == 0) { return is_identity_tf(&curve->parametric) - ? OpAndArg{ Op_noop, nullptr } + ? noop : OpAndArg{ ops[channel].parametric, &curve->parametric }; } else if (curve->table_8) { return OpAndArg{ ops[channel].table_8, curve }; @@ -1987,7 +1987,7 @@ static OpAndArg select_curve_op(const skcms_Curve* curve, int channel) { } assert(false); - return OpAndArg{Op_noop,nullptr}; + return noop; } static size_t bytes_per_pixel(skcms_PixelFormat fmt) { @@ -2121,7 +2121,7 @@ bool skcms_Transform(const void* src, if (srcProfile->A2B.input_channels) { for (int i = 0; i < (int)srcProfile->A2B.input_channels; i++) { OpAndArg oa = select_curve_op(&srcProfile->A2B.input_curves[i], i); - if (oa.op != Op_noop) { + if (oa.arg) { *ops++ = oa.op; *args++ = oa.arg; } @@ -2139,7 +2139,7 @@ bool skcms_Transform(const void* src, if (srcProfile->A2B.matrix_channels == 3) { for (int i = 0; i < 3; i++) { OpAndArg oa = select_curve_op(&srcProfile->A2B.matrix_curves[i], i); - if (oa.op != Op_noop) { + if (oa.arg) { *ops++ = oa.op; *args++ = oa.arg; } @@ -2159,7 +2159,7 @@ bool skcms_Transform(const void* src, if (srcProfile->A2B.output_channels == 3) { for (int i = 0; i < 3; i++) { OpAndArg oa = select_curve_op(&srcProfile->A2B.output_curves[i], i); - if (oa.op != Op_noop) { + if (oa.arg) { *ops++ = oa.op; *args++ = oa.arg; } @@ -2173,7 +2173,7 @@ bool skcms_Transform(const void* src, } else if (srcProfile->has_trc && srcProfile->has_toXYZD50) { for (int i = 0; i < 3; i++) { OpAndArg oa = select_curve_op(&srcProfile->trc[i], i); - if (oa.op != Op_noop) { + if (oa.arg) { *ops++ = oa.op; *args++ = oa.arg; } diff --git a/third_party/skcms/src/Transform_inl.h b/third_party/skcms/src/Transform_inl.h index f89c3120d9418..24c725be18d49 100644 --- a/third_party/skcms/src/Transform_inl.h +++ b/third_party/skcms/src/Transform_inl.h @@ -590,8 +590,6 @@ static void exec_ops(const Op* ops, const void** args, F r = F0, g = F0, b = F0, a = F1; while (true) { switch (*ops++) { - case Op_noop: break; - case Op_load_a8:{ a = F_from_U8(load(src + 1*i)); } break; diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1 index 38f48b5312aa7..2ccc401613789 100755 --- a/third_party/skcms/version.sha1 +++ b/third_party/skcms/version.sha1 @@ -1 +1 @@ -54b6cee88c4044a086e44906e9925583cebf63c4 \ No newline at end of file +52df767ea52b9fc983511bd4d275271cb2d9e42b \ No newline at end of file