Skip to content

Commit 300b619

Browse files
skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.comSkia Commit-Bot
authored andcommitted
Roll skia/third_party/skcms 54b6cee88c40..52df767ea52b (1 commits)
https://skia.googlesource.com/skcms.git/+log/54b6cee88c40..52df767ea52b 2018-09-07 [email protected] 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 [email protected] Change-Id: I8268153c7c2cf15bdbf5832d459e26c33c12fb39 Reviewed-on: https://skia-review.googlesource.com/152603 Reviewed-by: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com> Commit-Queue: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
1 parent c471151 commit 300b619

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

third_party/skcms/skcms.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,8 +1750,6 @@ bool skcms_ApproximateCurve(const skcms_Curve* curve,
17501750
// ~~~~ Impl. of skcms_Transform() ~~~~
17511751

17521752
typedef enum {
1753-
Op_noop,
1754-
17551753
Op_load_a8,
17561754
Op_load_g8,
17571755
Op_load_4444,
@@ -1976,9 +1974,11 @@ static OpAndArg select_curve_op(const skcms_Curve* curve, int channel) {
19761974
{ Op_tf_a, Op_table_8_a, Op_table_16_a },
19771975
};
19781976

1977+
const OpAndArg noop = { Op_load_a8/*doesn't matter*/, nullptr };
1978+
19791979
if (curve->table_entries == 0) {
19801980
return is_identity_tf(&curve->parametric)
1981-
? OpAndArg{ Op_noop, nullptr }
1981+
? noop
19821982
: OpAndArg{ ops[channel].parametric, &curve->parametric };
19831983
} else if (curve->table_8) {
19841984
return OpAndArg{ ops[channel].table_8, curve };
@@ -1987,7 +1987,7 @@ static OpAndArg select_curve_op(const skcms_Curve* curve, int channel) {
19871987
}
19881988

19891989
assert(false);
1990-
return OpAndArg{Op_noop,nullptr};
1990+
return noop;
19911991
}
19921992

19931993
static size_t bytes_per_pixel(skcms_PixelFormat fmt) {
@@ -2121,7 +2121,7 @@ bool skcms_Transform(const void* src,
21212121
if (srcProfile->A2B.input_channels) {
21222122
for (int i = 0; i < (int)srcProfile->A2B.input_channels; i++) {
21232123
OpAndArg oa = select_curve_op(&srcProfile->A2B.input_curves[i], i);
2124-
if (oa.op != Op_noop) {
2124+
if (oa.arg) {
21252125
*ops++ = oa.op;
21262126
*args++ = oa.arg;
21272127
}
@@ -2139,7 +2139,7 @@ bool skcms_Transform(const void* src,
21392139
if (srcProfile->A2B.matrix_channels == 3) {
21402140
for (int i = 0; i < 3; i++) {
21412141
OpAndArg oa = select_curve_op(&srcProfile->A2B.matrix_curves[i], i);
2142-
if (oa.op != Op_noop) {
2142+
if (oa.arg) {
21432143
*ops++ = oa.op;
21442144
*args++ = oa.arg;
21452145
}
@@ -2159,7 +2159,7 @@ bool skcms_Transform(const void* src,
21592159
if (srcProfile->A2B.output_channels == 3) {
21602160
for (int i = 0; i < 3; i++) {
21612161
OpAndArg oa = select_curve_op(&srcProfile->A2B.output_curves[i], i);
2162-
if (oa.op != Op_noop) {
2162+
if (oa.arg) {
21632163
*ops++ = oa.op;
21642164
*args++ = oa.arg;
21652165
}
@@ -2173,7 +2173,7 @@ bool skcms_Transform(const void* src,
21732173
} else if (srcProfile->has_trc && srcProfile->has_toXYZD50) {
21742174
for (int i = 0; i < 3; i++) {
21752175
OpAndArg oa = select_curve_op(&srcProfile->trc[i], i);
2176-
if (oa.op != Op_noop) {
2176+
if (oa.arg) {
21772177
*ops++ = oa.op;
21782178
*args++ = oa.arg;
21792179
}

third_party/skcms/src/Transform_inl.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,6 @@ static void exec_ops(const Op* ops, const void** args,
590590
F r = F0, g = F0, b = F0, a = F1;
591591
while (true) {
592592
switch (*ops++) {
593-
case Op_noop: break;
594-
595593
case Op_load_a8:{
596594
a = F_from_U8(load<U8>(src + 1*i));
597595
} break;

third_party/skcms/version.sha1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
54b6cee88c4044a086e44906e9925583cebf63c4
1+
52df767ea52b9fc983511bd4d275271cb2d9e42b

0 commit comments

Comments
 (0)