#ifndef SkEndian_DEFINED
#define SkEndian_DEFINED
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkFeatures.h"
#include <cstdint>
#if defined(SK_CPU_LENDIAN) && defined(SK_CPU_BENDIAN)
#error "can't have both LENDIAN and BENDIAN defined"
#endif
#if !defined(SK_CPU_LENDIAN) && !defined(SK_CPU_BENDIAN)
#error "need either LENDIAN or BENDIAN defined"
#endif
static inline uint16_t SkEndianSwap16(uint16_t value) { … }
template<uint16_t N> struct SkTEndianSwap16 { … };
static inline void SkEndianSwap16s(uint16_t array[], int count) { … }
static constexpr uint32_t SkEndianSwap32(uint32_t value) { … }
template<uint32_t N> struct SkTEndianSwap32 { … };
static inline void SkEndianSwap32s(uint32_t array[], int count) { … }
static inline uint64_t SkEndianSwap64(uint64_t value) { … }
template<uint64_t N> struct SkTEndianSwap64 { … };
static inline void SkEndianSwap64s(uint64_t array[], int count) { … }
#ifdef SK_CPU_LENDIAN
#define SkEndian_SwapBE16(n) …
#define SkEndian_SwapBE32(n) …
#define SkEndian_SwapBE64(n) …
#define SkEndian_SwapLE16(n) …
#define SkEndian_SwapLE32(n) …
#define SkEndian_SwapLE64(n) …
#define SkTEndian_SwapBE16(n) …
#define SkTEndian_SwapBE32(n) …
#define SkTEndian_SwapBE64(n) …
#define SkTEndian_SwapLE16(n) …
#define SkTEndian_SwapLE32(n) …
#define SkTEndian_SwapLE64(n) …
#else
#define SkEndian_SwapBE16 …
#define SkEndian_SwapBE32 …
#define SkEndian_SwapBE64 …
#define SkEndian_SwapLE16 …
#define SkEndian_SwapLE32 …
#define SkEndian_SwapLE64 …
#define SkTEndian_SwapBE16 …
#define SkTEndian_SwapBE32 …
#define SkTEndian_SwapBE64 …
#define SkTEndian_SwapLE16 …
#define SkTEndian_SwapLE32 …
#define SkTEndian_SwapLE64 …
#endif
#ifdef SK_CPU_LENDIAN
#define SkEndian_Byte0Shift …
#define SkEndian_Byte1Shift …
#define SkEndian_Byte2Shift …
#define SkEndian_Byte3Shift …
#else
#define SkEndian_Byte0Shift …
#define SkEndian_Byte1Shift …
#define SkEndian_Byte2Shift …
#define SkEndian_Byte3Shift …
#endif
#if defined(SK_UINT8_BITFIELD_LENDIAN) && defined(SK_UINT8_BITFIELD_BENDIAN)
#error "can't have both bitfield LENDIAN and BENDIAN defined"
#endif
#if !defined(SK_UINT8_BITFIELD_LENDIAN) && !defined(SK_UINT8_BITFIELD_BENDIAN)
#ifdef SK_CPU_LENDIAN
#define SK_UINT8_BITFIELD_LENDIAN
#else
#define SK_UINT8_BITFIELD_BENDIAN
#endif
#endif
#ifdef SK_UINT8_BITFIELD_LENDIAN
#define SK_UINT8_BITFIELD(f0, f1, f2, f3, f4, f5, f6, f7) …
#else
#define SK_UINT8_BITFIELD …
#endif
#endif