Lines Matching refs:srcCoeff
92 static constexpr bool GrBlendCoeffsUseSrcColor(GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff) {
93 return kZero_GrBlendCoeff != srcCoeff || GrBlendCoeffRefsSrc(dstCoeff);
96 static constexpr bool GrBlendCoeffsUseDstColor(GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff,
98 return GrBlendCoeffRefsDst(srcCoeff) ||
107 static constexpr bool GrBlendModifiesDst(GrBlendEquation equation, GrBlendCoeff srcCoeff,
110 kZero_GrBlendCoeff != srcCoeff || kOne_GrBlendCoeff != dstCoeff;
117 static constexpr bool GrBlendShouldDisable(GrBlendEquation equation, GrBlendCoeff srcCoeff,
120 kOne_GrBlendCoeff == srcCoeff && kZero_GrBlendCoeff == dstCoeff;
128 * D' = f * (S * srcCoeff + D * dstCoeff) + (1-f) * D
129 * = f * S * srcCoeff + D * (f * dstCoeff + (1 - f))
131 * (Let srcCoeff be negative for reverse subtract.) We can tweak alpha for coverage when the
134 * (f*S) * srcCoeff' + D * dstCoeff' == f * S * srcCoeff + D * (f * dstCoeff + (1 - f))
136 * (Where srcCoeff' and dstCoeff' have any reference to S pre-multiplied by f.)
138 * It's easy to see this works for the src term as long as srcCoeff' == srcCoeff (meaning srcCoeff
151 GrBlendCoeff srcCoeff,
154 !GrBlendModifiesDst(equation, srcCoeff, dstCoeff) ||
156 !GrBlendCoeffRefsSrc(srcCoeff) &&