diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkPostConfig.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h index 88a2bfcb64..325343425a 100644 --- a/include/core/SkPostConfig.h +++ b/include/core/SkPostConfig.h @@ -68,6 +68,16 @@ # endif #endif +/** + * Used to align stack allocated variables/buffers. + * Different compilers have different ways to accomplish this. + */ +#if defined(_MSC_VER) +# define SK_ALIGN(x) __declspec(align(x)) +#else +# define SK_ALIGN(x) __attribute__((aligned(x))) +#endif + #if !defined(SK_SUPPORT_GPU) # define SK_SUPPORT_GPU 1 #endif |