From 0519c810a56bded1284fcb2ae40f438878c6585f Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Wed, 11 Feb 2015 13:17:06 -0800 Subject: Glop Bitmap and RoundRect clipping support Change-Id: I4577546a5d2e5f084cc03f39a89db9231b8111ee --- libs/hwui/utils/Macros.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libs/hwui/utils/Macros.h') 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::value, \ + #Type " must have standard layout") + #endif /* MACROS_H */ -- cgit v1.1