aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/skcms
diff options
context:
space:
mode:
authorGravatar skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>2018-04-25 16:17:32 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-25 16:40:47 +0000
commitdc3aa7d3cecefa5fda6e3adc910b88ff865029b9 (patch)
tree1a77b603fdbc02e6715d7a2aa69a08a219a4b69f /third_party/skcms
parente8b6ddabb2aa577f212016c67009810eaf589cb9 (diff)
Roll skia/third_party/skcms 40a5028..f3a576b (1 commits)
https://skia.googlesource.com/skcms.git/+log/40a5028..f3a576b 2018-04-25 mtklein@chromium.org SKCMS_API 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: Ie0a8bc53904ae098ce5ca5909d3e39dd62e437c6 Reviewed-on: https://skia-review.googlesource.com/123649 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')
-rw-r--r--third_party/skcms/skcms.h51
-rwxr-xr-xthird_party/skcms/version.sha12
2 files changed, 31 insertions, 22 deletions
diff --git a/third_party/skcms/skcms.h b/third_party/skcms/skcms.h
index af0801afa4..c84da0ab49 100644
--- a/third_party/skcms/skcms.h
+++ b/third_party/skcms/skcms.h
@@ -9,6 +9,12 @@
// skcms.h contains the entire public API for skcms.
+#if defined(__GNUC__) || defined(__clang__)
+ #define SKCMS_API __attribute__((visibility("default")))
+#else
+ #define SKCMS_API
+#endif
+
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@@ -109,26 +115,28 @@ typedef struct skcms_ICCProfile {
} skcms_ICCProfile;
// The sRGB color profile is so commonly used that we offer a canonical skcms_ICCProfile for it.
-extern const skcms_ICCProfile skcms_sRGB_profile;
+SKCMS_API extern const skcms_ICCProfile skcms_sRGB_profile;
// Ditto for XYZD50, the most common profile connection space.
-extern const skcms_ICCProfile skcms_XYZD50_profile;
+SKCMS_API extern const skcms_ICCProfile skcms_XYZD50_profile;
// 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?".
-bool skcms_ApproximatelyEqualProfiles(const skcms_ICCProfile* A, const skcms_ICCProfile* B);
+SKCMS_API bool skcms_ApproximatelyEqualProfiles(const skcms_ICCProfile* A,
+ const skcms_ICCProfile* B);
// 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.
-bool skcms_Parse(const void*, size_t, skcms_ICCProfile*);
+SKCMS_API bool skcms_Parse(const void*, size_t, skcms_ICCProfile*);
// skcms_Parse() creates a profile that directs skcms_Transform() to favor accuracy.
// If you want to trade a little accuracy for a big speedup, call skcms_OptimizeForSpeed().
-void skcms_OptimizeForSpeed(skcms_ICCProfile*);
+SKCMS_API void skcms_OptimizeForSpeed(skcms_ICCProfile*);
-bool skcms_ApproximateCurve(const skcms_Curve* curve, skcms_TransferFunction* approx,
- float* max_error);
+SKCMS_API bool skcms_ApproximateCurve(const skcms_Curve* curve,
+ skcms_TransferFunction* approx,
+ float* max_error);
typedef struct skcms_ICCTag {
uint32_t signature;
@@ -137,8 +145,8 @@ typedef struct skcms_ICCTag {
const uint8_t* buf;
} skcms_ICCTag;
-void skcms_GetTagByIndex (const skcms_ICCProfile*, uint32_t idx, skcms_ICCTag*);
-bool skcms_GetTagBySignature(const skcms_ICCProfile*, uint32_t sig, skcms_ICCTag*);
+SKCMS_API void skcms_GetTagByIndex (const skcms_ICCProfile*, uint32_t idx, skcms_ICCTag*);
+SKCMS_API bool skcms_GetTagBySignature(const skcms_ICCProfile*, uint32_t sig, skcms_ICCTag*);
typedef enum skcms_PixelFormat {
skcms_PixelFormat_RGB_565,
@@ -193,26 +201,27 @@ typedef enum skcms_AlphaFormat {
// Convert npixels pixels from src format and color profile to dst format and color profile
// and return true, otherwise return false. It is safe to alias dst == src if dstFmt == srcFmt.
-bool skcms_Transform(const void* src,
- skcms_PixelFormat srcFmt,
- skcms_AlphaFormat srcAlpha,
- const skcms_ICCProfile* srcProfile,
- void* dst,
- skcms_PixelFormat dstFmt,
- skcms_AlphaFormat dstAlpha,
- const skcms_ICCProfile* dstProfile,
- size_t npixels);
+SKCMS_API bool skcms_Transform(const void* src,
+ skcms_PixelFormat srcFmt,
+ skcms_AlphaFormat srcAlpha,
+ const skcms_ICCProfile* srcProfile,
+ void* dst,
+ skcms_PixelFormat dstFmt,
+ skcms_AlphaFormat dstAlpha,
+ const skcms_ICCProfile* dstProfile,
+ size_t npixels);
// If profile cannot be used as a destination profile in skcms_Transform(),
// rewrite it with approximations where reasonable or by pulling from fallback
// (e.g. skcms_sRGB_profile) where not.
-void skcms_EnsureUsableAsDestination(skcms_ICCProfile* profile, const skcms_ICCProfile* fallback);
+SKCMS_API void skcms_EnsureUsableAsDestination(skcms_ICCProfile* profile,
+ const skcms_ICCProfile* fallback);
// If profile cannot be used as a destination profile with a single parametric transfer function,
// (ie for rasterization), rewrite it with approximations where reasonable or by pulling from
// fallback (e.g. skcms_sRGB_profile) where not.
-void skcms_EnsureUsableAsDestinationWithSingleCurve(skcms_ICCProfile* profile,
- const skcms_ICCProfile* fallback);
+SKCMS_API void skcms_EnsureUsableAsDestinationWithSingleCurve(skcms_ICCProfile* profile,
+ const skcms_ICCProfile* fallback);
#ifdef __cplusplus
}
diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1
index 4ca3a3e03c..d9b63702b6 100755
--- a/third_party/skcms/version.sha1
+++ b/third_party/skcms/version.sha1
@@ -1 +1 @@
-40a5028c0d104328818ddf889f2015a49c0f81c8 \ No newline at end of file
+f3a576b6e8d430f515b6e6ff485b4f848fc6925f \ No newline at end of file