Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Macros
SkMacros.h File Reference

Go to the source code of this file.

Macros

#define SK_MACRO_CONCAT(X, Y)   SK_MACRO_CONCAT_IMPL_PRIV(X, Y)
 
#define SK_MACRO_CONCAT_IMPL_PRIV(X, Y)   X ## Y
 
#define SK_MACRO_APPEND_LINE(name)   SK_MACRO_CONCAT(name, __LINE__)
 
#define SK_MACRO_APPEND_COUNTER(name)   SK_MACRO_CONCAT(name, __COUNTER__)
 
#define SK_BEGIN_REQUIRE_DENSE
 
#define SK_END_REQUIRE_DENSE
 
#define SK_INTENTIONALLY_LEAKED(X)   ((void)0)
 
#define SK_INIT_TO_AVOID_WARNING   = 0
 
#define SK_MAKE_BITFIELD_OPS(X)
 
#define SK_DECL_BITFIELD_OPS_FRIENDS(X)
 

Macro Definition Documentation

◆ SK_BEGIN_REQUIRE_DENSE

#define SK_BEGIN_REQUIRE_DENSE

Definition at line 37 of file SkMacros.h.

◆ SK_DECL_BITFIELD_OPS_FRIENDS

#define SK_DECL_BITFIELD_OPS_FRIENDS (   X)
Value:
friend X operator ~(X a); \
friend X operator |(X a, X b); \
friend X& operator |=(X& a, X b); \
\
friend X operator &(X a, X b); \
friend X& operator &=(X& a, X b);
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E & > constexpr operator&=(E &l, E r)
Definition: SkBitmaskEnum.h:39
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E > constexpr operator~(E e)
Definition: SkBitmaskEnum.h:55
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E > constexpr operator|(E l, E r)
Definition: SkBitmaskEnum.h:22
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E & > constexpr operator|=(E &l, E r)
Definition: SkBitmaskEnum.h:28
static const SkScalar X
Definition: StrokeBench.cpp:54
static bool b
struct MyStruct a[10]
constexpr Mask< EnumType > operator&(const EnumType &lhs, const EnumType &rhs)
Definition: mask.h:139

Definition at line 86 of file SkMacros.h.

◆ SK_END_REQUIRE_DENSE

#define SK_END_REQUIRE_DENSE

Definition at line 38 of file SkMacros.h.

◆ SK_INIT_TO_AVOID_WARNING

#define SK_INIT_TO_AVOID_WARNING   = 0

Definition at line 58 of file SkMacros.h.

◆ SK_INTENTIONALLY_LEAKED

#define SK_INTENTIONALLY_LEAKED (   X)    ((void)0)

Definition at line 55 of file SkMacros.h.

◆ SK_MACRO_APPEND_COUNTER

#define SK_MACRO_APPEND_COUNTER (   name)    SK_MACRO_CONCAT(name, __COUNTER__)

Definition at line 27 of file SkMacros.h.

◆ SK_MACRO_APPEND_LINE

#define SK_MACRO_APPEND_LINE (   name)    SK_MACRO_CONCAT(name, __LINE__)

Definition at line 25 of file SkMacros.h.

◆ SK_MACRO_CONCAT

#define SK_MACRO_CONCAT (   X,
  Y 
)    SK_MACRO_CONCAT_IMPL_PRIV(X, Y)

Definition at line 16 of file SkMacros.h.

◆ SK_MACRO_CONCAT_IMPL_PRIV

#define SK_MACRO_CONCAT_IMPL_PRIV (   X,
  Y 
)    X ## Y

Definition at line 17 of file SkMacros.h.

◆ SK_MAKE_BITFIELD_OPS

#define SK_MAKE_BITFIELD_OPS (   X)
Value:
inline X operator ~(X a) { \
using U = std::underlying_type_t<X>; \
return (X) (~static_cast<U>(a)); \
} \
inline X operator |(X a, X b) { \
using U = std::underlying_type_t<X>; \
return (X) (static_cast<U>(a) | static_cast<U>(b)); \
} \
inline X& operator |=(X& a, X b) { \
return (a = a | b); \
} \
inline X operator &(X a, X b) { \
using U = std::underlying_type_t<X>; \
return (X) (static_cast<U>(a) & static_cast<U>(b)); \
} \
inline X& operator &=(X& a, X b) { \
return (a = a & b); \
}

Defines overloaded bitwise operators to make it easier to use an enum as a bitfield.

Definition at line 66 of file SkMacros.h.