diff options
author | skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com> | 2018-05-17 18:42:40 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-17 19:22:43 +0000 |
commit | 8c29c14f54984e7848fc860571a7521889e6f012 (patch) | |
tree | de63c80088958a6e7192b9b98d2e4cfca80699c1 /third_party/skcms/skcms.h | |
parent | 12997b051e70920bda63713bcd115ebda25b4ac6 (diff) |
Roll skia/third_party/skcms 3f444c5..3e527c6 (1 commits)
https://skia.googlesource.com/skcms.git/+log/3f444c5..3e527c6
2018-05-17 brianosman@google.com Added skcms_AreApproximateInverses(Curve, TransferFunction)
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=herb@google.com
Change-Id: Ia10c2fe8dc17972b8e5570819ff6ac197f4d77f8
Reviewed-on: https://skia-review.googlesource.com/128984
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/skcms.h')
-rw-r--r-- | third_party/skcms/skcms.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/third_party/skcms/skcms.h b/third_party/skcms/skcms.h index ece944c56b..97728c4c8f 100644 --- a/third_party/skcms/skcms.h +++ b/third_party/skcms/skcms.h @@ -56,12 +56,6 @@ typedef union skcms_Curve { }; } skcms_Curve; -// Practical equality test for two skcms_Curves. -// The implementation is subject to change, but it will always try to answer -// "can I substitute A for B?" and "can I skip transforming from A to B?". -SKCMS_API bool skcms_ApproximatelyEqualCurves(const skcms_Curve* A, - const skcms_Curve* B); - typedef struct skcms_A2B { // Optional: N 1D curves, followed by an N-dimensional CLUT. // If input_channels == 0, these curves and CLUT are skipped, @@ -115,12 +109,28 @@ SKCMS_API const skcms_ICCProfile* skcms_sRGB_profile(void); // Ditto for XYZD50, the most common profile connection space. SKCMS_API const skcms_ICCProfile* skcms_XYZD50_profile(void); +SKCMS_API const skcms_TransferFunction* skcms_sRGB_TransferFunction(void); +SKCMS_API const skcms_TransferFunction* skcms_sRGB_Inverse_TransferFunction(void); +SKCMS_API const skcms_TransferFunction* skcms_Identity_TransferFunction(void); + // Practical equality test for two skcms_ICCProfiles. // The implementation is subject to change, but it will always try to answer // "can I substitute A for B?" and "can I skip transforming from A to B?". SKCMS_API bool skcms_ApproximatelyEqualProfiles(const skcms_ICCProfile* A, const skcms_ICCProfile* B); +// Practical test that answers: Is curve roughly the inverse of inv_tf? Typically used by passing +// the inverse of a known parametric transfer function (like sRGB), to determine if a particular +// curve is very close to sRGB. +SKCMS_API bool skcms_AreApproximateInverses(const skcms_Curve* curve, + const skcms_TransferFunction* inv_tf); + +// Similar to above, answering the question for all three TRC curves of the given profile. Again, +// passing skcms_sRGB_InverseTransferFunction as inv_tf will answer the question: +// "Does this profile have a transfer function that is very close to sRGB?" +SKCMS_API bool skcms_TRCs_AreApproximateInverse(const skcms_ICCProfile* profile, + const skcms_TransferFunction* inv_tf); + // Parse an ICC profile and return true if possible, otherwise return false. // The buffer is not copied, it must remain valid as long as the skcms_ICCProfile // will be used. |