From 94ed719bf8786c35c95cd0f52a866af9f15884e5 Mon Sep 17 00:00:00 2001 From: "skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com" Date: Thu, 21 Jun 2018 16:29:13 +0000 Subject: Roll skia/third_party/skcms eb7de4255855..78ef7c5c81fb (1 commits) https://skia.googlesource.com/skcms.git/+log/eb7de4255855..78ef7c5c81fb 2018-06-21 brianosman@google.com Treat null profiles as sRGB 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. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel TBR=kjlubick@google.com Change-Id: I02d32a027781e2f4b05e0ca93277d374e53550ce Reviewed-on: https://skia-review.googlesource.com/136544 Reviewed-by: skcms-skia-autoroll Commit-Queue: skcms-skia-autoroll --- third_party/skcms/src/Transform.c | 11 +++++++---- third_party/skcms/version.sha1 | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'third_party') diff --git a/third_party/skcms/src/Transform.c b/third_party/skcms/src/Transform.c index 0de0727241..f07c5e7ba4 100644 --- a/third_party/skcms/src/Transform.c +++ b/third_party/skcms/src/Transform.c @@ -404,9 +404,12 @@ bool skcms_Transform(const void* src, } int n = (int)nz; - // Both profiles can be null if we're just doing format conversion, otherwise both are needed - if (!dstProfile != !srcProfile) { - return false; + // Null profiles default to sRGB. Passing null for both is handy when doing format conversion. + if (!srcProfile) { + srcProfile = skcms_sRGB_profile(); + } + if (!dstProfile) { + dstProfile = skcms_sRGB_profile(); } // We can't transform in place unless the PixelFormats are the same size. @@ -442,7 +445,7 @@ bool skcms_Transform(const void* src, *ops++ = Op_swap_rb; } - if (srcProfile && srcProfile->data_color_space == skcms_Signature_CMYK) { + if (srcProfile->data_color_space == skcms_Signature_CMYK) { // Photoshop creates CMYK images as inverse CMYK. // These happen to be the only ones we've _ever_ seen. *ops++ = Op_invert; diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1 index bb0a7989f9..52ffc8c575 100755 --- a/third_party/skcms/version.sha1 +++ b/third_party/skcms/version.sha1 @@ -1 +1 @@ -eb7de4255855f321ab1ab7a53bc8825c26cbd0e2 \ No newline at end of file +78ef7c5c81fb084fa67c7994501c3edd86aef909 \ No newline at end of file -- cgit v1.2.3