Flutter Engine
The Flutter Engine
|
Typedefs | |
template<typename T > | |
using | UnpackedType = typename std::conditional< sizeof(T)<=sizeof(void *), T, const T & >::type |
Functions | |
template<typename T > | |
static void * | Pack (const T &ctx, SkArenaAlloc *alloc) |
template<typename T > | |
static UnpackedType< T > | Unpack (const T *ctx) |
using SkRPCtxUtils::UnpackedType = typedef typename std::conditional<sizeof(T) <= sizeof(void*), T, const T&>::type |
Definition at line 20 of file SkRasterPipelineContextUtils.h.
|
static |
SkRPCtxUtils::Pack will check if the passed-in struct is small enough to fit directly in the context field. If so, it will return the data bit-casted into a void pointer. If not, it allocates a copy of the struct inside the alloc and then returns a pointer to the copy.
Definition at line 28 of file SkRasterPipelineContextUtils.h.
|
static |
SkRPCtxUtils::Unpack performs the reverse operation: either un-bitcasting the object back to its original form, or returning the pointer as-is, depending on the size of the type.
Definition at line 42 of file SkRasterPipelineContextUtils.h.