diff options
author | 2018-04-23 14:41:01 +0000 | |
---|---|---|
committer | 2018-04-23 15:02:06 +0000 | |
commit | 7230861301380083ae873c83346da605299bad99 (patch) | |
tree | 00bb00a2cbd8a96a3f7928fdbee2e8ffacded90c /third_party/skcms/src/ICCProfile.c | |
parent | 122b38560f2f2a876e009485efba318961491699 (diff) |
Roll skia/third_party/skcms c4941e8..71966da (1 commits)
https://skia.googlesource.com/skcms.git/+log/c4941e8..71966da
2018-04-23 mtklein@chromium.org fail skcms_Parse() for useless profiles
The AutoRoll server is located here: https://skcms-skia-roll.skia.org
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.
TBR=stani@google.com
Change-Id: I8c36fb89675b9b1639a1d494641d8993d3723c93
Reviewed-on: https://skia-review.googlesource.com/122980
Commit-Queue: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Reviewed-by: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Diffstat (limited to 'third_party/skcms/src/ICCProfile.c')
-rw-r--r-- | third_party/skcms/src/ICCProfile.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/third_party/skcms/src/ICCProfile.c b/third_party/skcms/src/ICCProfile.c index c9b7065524..4eed21c64e 100644 --- a/third_party/skcms/src/ICCProfile.c +++ b/third_party/skcms/src/ICCProfile.c @@ -651,6 +651,11 @@ bool skcms_GetTagBySignature(const skcms_ICCProfile* profile, uint32_t sig, skcm return false; } +static bool usable_as_src(const skcms_ICCProfile* profile) { + return profile->has_A2B + || (profile->has_trc && profile->has_toXYZD50); +} + bool skcms_Parse(const void* buf, size_t len, skcms_ICCProfile* profile) { assert(SAFE_SIZEOF(header_Layout) == 132); @@ -773,7 +778,7 @@ bool skcms_Parse(const void* buf, size_t len, skcms_ICCProfile* profile) { } } - return true; + return usable_as_src(profile); } const skcms_ICCProfile skcms_sRGB_profile = { |