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-09 19:43:08 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-09 20:26:51 +0000 |
commit | 30a067cbe6bede24a1b0fd0b4400004926ef2802 (patch) | |
tree | ac16f0d00076e2be9a74bb03e28909c8c312c7ff /third_party | |
parent | 729715298c8af1d2ecc4cbe887eeeb9a1c17c595 (diff) |
Roll skia/third_party/skcms 78ee9e8..5b9549a (1 commits)
https://skia.googlesource.com/skcms.git/+log/78ee9e8..5b9549a
2018-05-09 brianosman@google.com Add utilities for programmatically making 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.
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
TBR=egdaniel@google.com
Change-Id: I35b0a56b6a4e478cdf3442104ffda22131bc4d8d
Reviewed-on: https://skia-review.googlesource.com/127112
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>
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/skcms/skcms.h | 23 | ||||
-rwxr-xr-x | third_party/skcms/version.sha1 | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/third_party/skcms/skcms.h b/third_party/skcms/skcms.h index 79d0abf5cd..0451a582e3 100644 --- a/third_party/skcms/skcms.h +++ b/third_party/skcms/skcms.h @@ -16,6 +16,7 @@ #include <stdbool.h> #include <stddef.h> #include <stdint.h> +#include <string.h> #ifdef __cplusplus extern "C" { @@ -238,6 +239,28 @@ SKCMS_API bool skcms_PrimariesToXYZD50(float rx, float ry, float wx, float wy, skcms_Matrix3x3* toXYZD50); +// Utilities for programmatically constructing profiles +static inline void skcms_Init(skcms_ICCProfile* p) { + memset(p, 0, sizeof(*p)); + p->data_color_space = skcms_Signature_RGB; + p->pcs = skcms_Signature_XYZ; +} + +static inline void skcms_SetTransferFunction(skcms_ICCProfile* p, + const skcms_TransferFunction* tf) { + p->has_trc = true; + for (int i = 0; i < 3; ++i) { + p->trc[i].table_entries = 0; + p->trc[i].parametric = *tf; + p->has_poly_tf[i] = false; + } +} + +static inline void skcms_SetXYZD50(skcms_ICCProfile* p, const skcms_Matrix3x3* m) { + p->has_toXYZD50 = true; + p->toXYZD50 = *m; +} + #ifdef __cplusplus } #endif diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1 index c733dd87f7..6a74e30c81 100755 --- a/third_party/skcms/version.sha1 +++ b/third_party/skcms/version.sha1 @@ -1 +1 @@ -78ee9e8913e0ab2ddb5208b7844b24f1301ce37e
\ No newline at end of file +5b9549acaa26e3e2cae8919a0ee0e4cdeb59e1e8
\ No newline at end of file |