34 if (!dst) { dst = src; }
36 if (src->hash() == dst->hash() && srcAT == dstAT) {
49 src->gamutTransformTo(dst, &src_to_dst);
67 SkASSERT(0 == memcmp(&srcM, &dstM, 9*
sizeof(
float)) &&
"Hash collision");
72 src-> transferFn(&this->
srcTF );
77 !this->flags.gamut_transform &&
79 src->transferFnHash() == dst->transferFnHash())
83 dst->transferFn(&dstTF);
84 for (
int i = 0; i < 7; i++) {
94 !this->flags.linearize &&
95 !this->flags.encode &&
106 auto is_finite = [](
float x) {
return x*0 == 0; };
109 invA = is_finite(invA) ? invA : 0;
121 for (
int i = 0; i < 3; ++i) {
140 if (
flags.
unpremul) { p->append(SkRasterPipelineOp::unpremul); }
144 if (
flags.
premul) { p->append(SkRasterPipelineOp::premul); }
static const uint32_t rgba[kNumPixels]
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
SkColorSpace * sk_srgb_singleton()
static constexpr float sk_ieee_float_divide(float numer, float denom)
bool gammaIsLinear() const
void invTransferFn(skcms_TransferFunction *fn) const
static bool Equals(const SkColorSpace *, const SkColorSpace *)
uint32_t toXYZD50Hash() const
float skcms_TransferFunction_eval(const skcms_TransferFunction *tf, float x)