#include "include/private/base/SkAttributes.h"
#include <cstring>
#include <type_traits>
Go to the source code of this file.
◆ SK_FP_SAFE_ABI
◆ sk_bit_cast()
template<typename Dst , typename Src >
Definition at line 68 of file SkUtils.h.
68 {
69 static_assert(sizeof(Dst) == sizeof(Src));
72 return sk_unaligned_load<Dst>(&
src);
73}
◆ sk_unaligned_load()
template<typename
T , typename P >
Definition at line 46 of file SkUtils.h.
46 {
47 static_assert(std::is_trivially_copyable_v<P> || std::is_void_v<P>);
48 static_assert(std::is_trivially_copyable_v<T>);
50
51
52
53
54
55
56 memcpy(&val, static_cast<const void*>(ptr), sizeof(val));
57 return val;
58}
◆ sk_unaligned_store()
template<typename
T , typename P >
Definition at line 61 of file SkUtils.h.
61 {
63 memcpy(ptr, &val, sizeof(val));
64}