Roll skcms from c8a56c57ab7c to 411e27776f5c (1 revision)

https://skia.googlesource.com/skcms.git/+log/c8a56c57ab7c..411e27776f5c

2021-04-01 mtklein@google.com fix fuzzer bug

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skcms-skia-autoroll
Please CC mtklein@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Tbr: mtklein@google.com
Change-Id: I2d0c3ad72746561bb5329e9ede53688be0b7882f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391817
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This commit is contained in:
skia-autoroll 2021-04-01 14:58:12 +00:00 committed by Skia Commit-Bot
parent 87fc657101
commit c16efbd66e
2 changed files with 17 additions and 19 deletions

View File

@ -606,18 +606,9 @@ static bool read_mft_common(const mft_CommonLayout* mftTag, skcms_A2B* a2b) {
// matrix in skcms_A2B is applied later in the pipe, so supporting this would require another
// field/flag.
a2b->matrix_channels = 0;
a2b-> input_channels = mftTag-> input_channels[0];
a2b->output_channels = mftTag->output_channels[0];
for (uint32_t i = 0; i < a2b->input_channels; ++i) {
a2b->grid_points[i] = mftTag->grid_points[0];
}
// The grid only makes sense with at least two points along each axis
if (a2b->grid_points[0] < 2) {
return false;
}
// We require exactly three (ie XYZ/Lab/RGB) output channels
if (a2b->output_channels != ARRAY_COUNT(a2b->output_curves)) {
return false;
@ -627,25 +618,25 @@ static bool read_mft_common(const mft_CommonLayout* mftTag, skcms_A2B* a2b) {
return false;
}
for (uint32_t i = 0; i < a2b->input_channels; ++i) {
a2b->grid_points[i] = mftTag->grid_points[0];
}
// The grid only makes sense with at least two points along each axis
if (a2b->grid_points[0] < 2) {
return false;
}
return true;
}
// All as the A2B version above, except where noted.
static bool read_mft_common(const mft_CommonLayout* mftTag, skcms_B2A* b2a) {
// All the same as A2B until the next comment...
// Same as A2B.
b2a->matrix_channels = 0;
b2a-> input_channels = mftTag-> input_channels[0];
b2a->output_channels = mftTag->output_channels[0];
for (uint32_t i = 0; i < b2a->input_channels; ++i) {
b2a->grid_points[i] = mftTag->grid_points[0];
}
if (b2a->grid_points[0] < 2) {
return false;
}
// ...for B2A, exactly 3 *input* channels and 1-4 *output* channels.
// For B2A, exactly 3 *input* channels and 1-4 *output* channels.
if (b2a->input_channels != ARRAY_COUNT(b2a->input_curves)) {
return false;
}
@ -653,6 +644,13 @@ static bool read_mft_common(const mft_CommonLayout* mftTag, skcms_B2A* b2a) {
return false;
}
// Same as A2B.
for (uint32_t i = 0; i < b2a->input_channels; ++i) {
b2a->grid_points[i] = mftTag->grid_points[0];
}
if (b2a->grid_points[0] < 2) {
return false;
}
return true;
}

View File

@ -1 +1 @@
c8a56c57ab7c5547ad29e2112ccf02e8dd91ce91
411e27776f5c0ec8359508f0e2cabb1538375e53