#ifndef SkColorPriv_DEFINED
#define SkColorPriv_DEFINED
#include "include/core/SkColor.h"
#include "include/private/base/SkMath.h"
#include "include/private/base/SkTPin.h"
#include "include/private/base/SkTo.h"
#include <algorithm>
static inline unsigned SkAlpha255To256(U8CPU alpha) { … }
#define SkAlphaMul(value, alpha256) …
static inline U8CPU SkUnitScalarClampToByte(SkScalar x) { … }
#define SK_A32_BITS …
#define SK_R32_BITS …
#define SK_G32_BITS …
#define SK_B32_BITS …
#define SK_A32_MASK …
#define SK_R32_MASK …
#define SK_G32_MASK …
#define SK_B32_MASK …
#define SK_RGBA_R32_SHIFT …
#define SK_RGBA_G32_SHIFT …
#define SK_RGBA_B32_SHIFT …
#define SK_RGBA_A32_SHIFT …
#define SK_BGRA_B32_SHIFT …
#define SK_BGRA_G32_SHIFT …
#define SK_BGRA_R32_SHIFT …
#define SK_BGRA_A32_SHIFT …
#if defined(SK_PMCOLOR_IS_RGBA) || defined(SK_PMCOLOR_IS_BGRA)
#error "Configure PMCOLOR by setting SK_R32_SHIFT."
#endif
#if (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \
SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \
SK_G32_SHIFT == SK_RGBA_G32_SHIFT && \
SK_B32_SHIFT == SK_RGBA_B32_SHIFT)
#define SK_PMCOLOR_IS_RGBA
#elif (SK_A32_SHIFT == SK_BGRA_A32_SHIFT && \
SK_R32_SHIFT == SK_BGRA_R32_SHIFT && \
SK_G32_SHIFT == SK_BGRA_G32_SHIFT && \
SK_B32_SHIFT == SK_BGRA_B32_SHIFT)
#define SK_PMCOLOR_IS_BGRA
#else
#error "need 32bit packing to be either RGBA or BGRA"
#endif
#define SkGetPackedA32(packed) …
#define SkGetPackedR32(packed) …
#define SkGetPackedG32(packed) …
#define SkGetPackedB32(packed) …
#define SkA32Assert(a) …
#define SkR32Assert(r) …
#define SkG32Assert(g) …
#define SkB32Assert(b) …
static inline SkPMColor SkPackARGB32(U8CPU a, U8CPU r, U8CPU g, U8CPU b) { … }
static inline SkPMColor SkPackARGB32NoCheck(U8CPU a, U8CPU r, U8CPU g, U8CPU b) { … }
static inline
SkPMColor SkPremultiplyARGBInline(U8CPU a, U8CPU r, U8CPU g, U8CPU b) { … }
static SK_ALWAYS_INLINE uint32_t SkAlphaMulQ(uint32_t c, unsigned scale) { … }
static inline SkPMColor SkPMSrcOver(SkPMColor src, SkPMColor dst) { … }
#endif