Index: include/core/SkPostConfig.h |
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h |
index 022757554cc1739245f6aa8b8580a93478be984f..07c1217f4f0ea09846fbd07ee6233202f54398ec 100644 |
--- a/include/core/SkPostConfig.h |
+++ b/include/core/SkPostConfig.h |
@@ -63,6 +63,14 @@ |
#endif |
#endif |
+#if !defined(SK_ATTRIBUTE) |
+ #if defined(__clang__) || defined(__GNUC__) |
+ #define SK_ATTRIBUTE(attr) __attribute__((attr)) |
+ #else |
+ #define SK_ATTRIBUTE(attr) |
+ #endif |
+#endif |
+ |
#if !defined(SK_SUPPORT_GPU) |
#define SK_SUPPORT_GPU 1 |
#endif |
@@ -354,6 +362,12 @@ |
////////////////////////////////////////////////////////////////////// |
+#if !defined(SK_UNUSED) |
+ #define SK_UNUSED SK_ATTRIBUTE(unused) |
+#endif |
+ |
+////////////////////////////////////////////////////////////////////// |
+ |
#ifndef SK_PRINTF_LIKE |
#if defined(__clang__) || defined(__GNUC__) |
#define SK_PRINTF_LIKE(A, B) __attribute__((format(printf, (A), (B)))) |