Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: include/core/SkPostConfig.h

Issue 2474073002: Revert of Try to use only std::aligned_storage. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkLinearBitmapPipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPostConfig.h
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h
index c34397cde64c13c64e3d3839c616f82b98501611..1b1cb3e751e7273d984ef48212ce266159b85136 100644
--- a/include/core/SkPostConfig.h
+++ b/include/core/SkPostConfig.h
@@ -75,6 +75,15 @@
# else
# define SK_ATTRIBUTE(attr)
# endif
+#endif
+
+// As usual, there are two ways to increase alignment... the MSVC way and the everyone-else way.
+#ifndef SK_STRUCT_ALIGN
+ #ifdef _MSC_VER
+ #define SK_STRUCT_ALIGN(N) __declspec(align(N))
+ #else
+ #define SK_STRUCT_ALIGN(N) __attribute__((aligned(N)))
+ #endif
#endif
#if defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
« no previous file with comments | « no previous file | src/core/SkLinearBitmapPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698