aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/c
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-07-28 09:45:14 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-28 09:45:15 -0700
commitfa84d94bb0b226f81b7eaa411aabbbaec3d180cb (patch)
tree10ebfcb2d467ad5d3df92834d1b27cd480f91e9b /include/c
parentba59595ea3b5c4a632ba5a67e47d7ac96d93ee39 (diff)
Make both SK_API definition points identical and order independent.
Diffstat (limited to 'include/c')
-rw-r--r--include/c/sk_types.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/c/sk_types.h b/include/c/sk_types.h
index 41dd2715b0..dcbc6f7d9e 100644
--- a/include/c/sk_types.h
+++ b/include/c/sk_types.h
@@ -23,8 +23,20 @@
#define SK_C_PLUS_PLUS_END_GUARD
#endif
-#ifndef SK_API
-#define SK_API
+#if !defined(SK_API)
+ #if defined(SKIA_DLL)
+ #if defined(SK_BUILD_FOR_WIN32)
+ #if SKIA_IMPLEMENTATION
+ #define SK_API __declspec(dllexport)
+ #else
+ #define SK_API __declspec(dllimport)
+ #endif
+ #else
+ #define SK_API __attribute__((visibility("default")))
+ #endif
+ #else
+ #define SK_API
+ #endif
#endif
///////////////////////////////////////////////////////////////////////////////////////