Skip to content

Commit

Permalink
Roll skia/third_party/skcms 54b6cee88c40..52df767ea52b (1 commits)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com authored and Skia Commit-Bot committed Sep 7, 2018
1 parent c471151 commit 300b619
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
16 changes: 8 additions & 8 deletions third_party/skcms/skcms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 };
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down
2 changes: 0 additions & 2 deletions third_party/skcms/src/Transform_inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion third_party/skcms/version.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
54b6cee88c4044a086e44906e9925583cebf63c4
52df767ea52b9fc983511bd4d275271cb2d9e42b

0 comments on commit 300b619

Please sign in to comment.