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 <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>
This commit is contained in:
skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com 2018-09-07 15:26:38 +00:00 committed by Skia Commit-Bot
parent c471151721
commit 300b6197e3
3 changed files with 9 additions and 11 deletions

View File

@ -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;
}

View File

@ -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<U8>(src + 1*i));
} break;

View File

@ -1 +1 @@
54b6cee88c4044a086e44906e9925583cebf63c4
52df767ea52b9fc983511bd4d275271cb2d9e42b