61 }
else if (g ==
max) {
100 switch ((
unsigned)(
w)) {
101 case 0: r = v_byte; g = t;
b =
p;
break;
102 case 1: r = q; g = v_byte;
b =
p;
break;
103 case 2: r =
p; g = v_byte;
b = t;
break;
104 case 3: r =
p; g = q;
b = v_byte;
break;
105 case 4: r = t; g =
p;
b = v_byte;
break;
106 default: r = v_byte; g =
p;
b = q;
break;
121SkColor SkColor4f::toSkColor()
const {
126uint32_t SkColor4f::toBytes_RGBA()
const {
131SkColor4f SkColor4f::FromBytes_RGBA(uint32_t c) {
static const uint32_t bgra[kNumPixels]
static const uint32_t rgba[kNumPixels]
static SkPMColor SkPremultiplyARGBInline(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
static SkScalar ByteDivToScalar(int numer, U8CPU denom)
void SkRGBToHSV(U8CPU r, U8CPU g, U8CPU b, SkScalar hsv[3])
SkColor SkHSVToColor(U8CPU a, const SkScalar hsv[3])
SkPMColor SkPreMultiplyARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
SkPMColor SkPreMultiplyColor(SkColor c)
static SkScalar ByteToScalar(U8CPU x)
#define SkColorGetR(color)
#define SkColorGetG(color)
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
#define SkColorGetA(color)
#define SkColorGetB(color)
#define SkScalarFloorToScalar(x)
static bool SkScalarNearlyZero(SkScalar x, SkScalar tolerance=SK_ScalarNearlyZero)
#define SkScalarRoundToInt(x)
static skvx::float4 swizzle_rb_if_bgra(const skvx::float4 &x)
static skvx::float4 Sk4f_fromL32(uint32_t px)
static uint32_t Sk4f_toL32(const skvx::float4 &px)
static skvx::float4 swizzle_rb(const skvx::float4 &x)
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
static float max(float r, float g, float b)
static float min(float r, float g, float b)
const float * vec() const
static SkRGBA4f FromBytes_RGBA(uint32_t color)
uint32_t toBytes_RGBA() const
static SkRGBA4f FromPMColor(SkPMColor)
static SKVX_ALWAYS_INLINE Vec Load(const void *ptr)
SKVX_ALWAYS_INLINE void store(void *ptr) const