summaryrefslogtreecommitdiffstats
path: root/libs/hwui/utils/Macros.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-02-11 13:17:06 -0800
committerChris Craik <ccraik@google.com>2015-02-12 12:30:59 -0800
commit0519c810a56bded1284fcb2ae40f438878c6585f (patch)
treed5e0a81ea08b9f3fc9d5e8d78b770a8c77aa4535 /libs/hwui/utils/Macros.h
parent08fa43fdeb646f56edcd8b33d06ee7d79b203426 (diff)
downloadframeworks_base-0519c810a56bded1284fcb2ae40f438878c6585f.zip
frameworks_base-0519c810a56bded1284fcb2ae40f438878c6585f.tar.gz
frameworks_base-0519c810a56bded1284fcb2ae40f438878c6585f.tar.bz2
Glop Bitmap and RoundRect clipping support
Change-Id: I4577546a5d2e5f084cc03f39a89db9231b8111ee
Diffstat (limited to 'libs/hwui/utils/Macros.h')
-rw-r--r--libs/hwui/utils/Macros.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/utils/Macros.h b/libs/hwui/utils/Macros.h
index fe43fdb..eae73a9 100644
--- a/libs/hwui/utils/Macros.h
+++ b/libs/hwui/utils/Macros.h
@@ -29,4 +29,8 @@
friend inline int compare_type(const Type& lhs, const Type& rhs) { return lhs.compare(rhs); } \
friend inline hash_t hash_type(const Type& entry) { return entry.hash(); }
+#define REQUIRE_COMPATIBLE_LAYOUT(Type) \
+ static_assert(std::is_standard_layout<Type>::value, \
+ #Type " must have standard layout")
+
#endif /* MACROS_H */