From a6b52198b9e73a4b7f80103116feeace74433246 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Fri, 27 Feb 2015 17:43:02 -0800 Subject: Glop drawBitmaps, drawPatches Change-Id: I3f1cd3f47f97d2e0c9b9d153732e26ee0b1c58c2 --- libs/hwui/utils/Macros.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libs/hwui/utils') diff --git a/libs/hwui/utils/Macros.h b/libs/hwui/utils/Macros.h index 2ed605e..9f7ac1c 100644 --- a/libs/hwui/utils/Macros.h +++ b/libs/hwui/utils/Macros.h @@ -36,9 +36,21 @@ #Type " must have standard layout") #define MAKE_FLAGS_ENUM(enumType) \ + inline int operator|=(int lhs, enumType rhs) { \ + return lhs | static_cast(rhs); \ + } \ + inline int operator|(int lhs, enumType rhs) { \ + return lhs | static_cast(rhs); \ + } \ + inline int operator|(enumType lhs, int rhs) { \ + return static_cast(lhs) | rhs; \ + } \ inline int operator|(enumType lhs, enumType rhs) { \ return static_cast(lhs) | static_cast(rhs); \ } \ + inline int operator&=(int lhs, enumType rhs) { \ + return lhs & static_cast(rhs); \ + } \ inline int operator&(int lhs, enumType rhs) { \ return lhs & static_cast(rhs); \ } \ -- cgit v1.1