| Index: include/gpu/GrBlend.h
|
| diff --git a/include/gpu/GrBlend.h b/include/gpu/GrBlend.h
|
| index 52a0300ee4862f3f302c48549fc9e1126105b98b..51c19f97219d2174f1e77c897fc8e945fbf67cb3 100644
|
| --- a/include/gpu/GrBlend.h
|
| +++ b/include/gpu/GrBlend.h
|
| @@ -75,10 +75,10 @@ static const int kGrBlendCoeffCnt = kLast_GrBlendCoeff + 1;
|
|
|
|
|
| template<GrBlendCoeff Coeff>
|
| -struct GrTBlendCoeffRefsSrc : SkTBool<kSC_GrBlendCoeff == Coeff ||
|
| - kISC_GrBlendCoeff == Coeff ||
|
| - kSA_GrBlendCoeff == Coeff ||
|
| - kISA_GrBlendCoeff == Coeff> {};
|
| +struct GrTBlendCoeffRefsSrc : skstd::bool_constant<kSC_GrBlendCoeff == Coeff ||
|
| + kISC_GrBlendCoeff == Coeff ||
|
| + kSA_GrBlendCoeff == Coeff ||
|
| + kISA_GrBlendCoeff == Coeff> {};
|
|
|
| #define GR_BLEND_COEFF_REFS_SRC(COEFF) \
|
| GrTBlendCoeffRefsSrc<COEFF>::value
|
| @@ -97,10 +97,10 @@ inline bool GrBlendCoeffRefsSrc(GrBlendCoeff coeff) {
|
|
|
|
|
| template<GrBlendCoeff Coeff>
|
| -struct GrTBlendCoeffRefsDst : SkTBool<kDC_GrBlendCoeff == Coeff ||
|
| - kIDC_GrBlendCoeff == Coeff ||
|
| - kDA_GrBlendCoeff == Coeff ||
|
| - kIDA_GrBlendCoeff == Coeff> {};
|
| +struct GrTBlendCoeffRefsDst : skstd::bool_constant<kDC_GrBlendCoeff == Coeff ||
|
| + kIDC_GrBlendCoeff == Coeff ||
|
| + kDA_GrBlendCoeff == Coeff ||
|
| + kIDA_GrBlendCoeff == Coeff> {};
|
|
|
| #define GR_BLEND_COEFF_REFS_DST(COEFF) \
|
| GrTBlendCoeffRefsDst<COEFF>::value
|
| @@ -119,10 +119,10 @@ inline bool GrBlendCoeffRefsDst(GrBlendCoeff coeff) {
|
|
|
|
|
| template<GrBlendCoeff Coeff>
|
| -struct GrTBlendCoeffRefsSrc2 : SkTBool<kS2C_GrBlendCoeff == Coeff ||
|
| - kIS2C_GrBlendCoeff == Coeff ||
|
| - kS2A_GrBlendCoeff == Coeff ||
|
| - kIS2A_GrBlendCoeff == Coeff> {};
|
| +struct GrTBlendCoeffRefsSrc2 : skstd::bool_constant<kS2C_GrBlendCoeff == Coeff ||
|
| + kIS2C_GrBlendCoeff == Coeff ||
|
| + kS2A_GrBlendCoeff == Coeff ||
|
| + kIS2A_GrBlendCoeff == Coeff> {};
|
|
|
| #define GR_BLEND_COEFF_REFS_SRC2(COEFF) \
|
| GrTBlendCoeffRefsSrc2<COEFF>::value
|
| @@ -141,23 +141,23 @@ inline bool GrBlendCoeffRefsSrc2(GrBlendCoeff coeff) {
|
|
|
|
|
| template<GrBlendCoeff SrcCoeff, GrBlendCoeff DstCoeff>
|
| -struct GrTBlendCoeffsUseSrcColor : SkTBool<kZero_GrBlendCoeff != SrcCoeff ||
|
| - GR_BLEND_COEFF_REFS_SRC(DstCoeff)> {};
|
| +struct GrTBlendCoeffsUseSrcColor : skstd::bool_constant<kZero_GrBlendCoeff != SrcCoeff ||
|
| + GR_BLEND_COEFF_REFS_SRC(DstCoeff)> {};
|
|
|
| #define GR_BLEND_COEFFS_USE_SRC_COLOR(SRC_COEFF, DST_COEFF) \
|
| GrTBlendCoeffsUseSrcColor<SRC_COEFF, DST_COEFF>::value
|
|
|
|
|
| template<GrBlendCoeff SrcCoeff, GrBlendCoeff DstCoeff>
|
| -struct GrTBlendCoeffsUseDstColor : SkTBool<GR_BLEND_COEFF_REFS_DST(SrcCoeff) ||
|
| - kZero_GrBlendCoeff != DstCoeff> {};
|
| +struct GrTBlendCoeffsUseDstColor : skstd::bool_constant<GR_BLEND_COEFF_REFS_DST(SrcCoeff) ||
|
| + kZero_GrBlendCoeff != DstCoeff> {};
|
|
|
| #define GR_BLEND_COEFFS_USE_DST_COLOR(SRC_COEFF, DST_COEFF) \
|
| GrTBlendCoeffsUseDstColor<SRC_COEFF, DST_COEFF>::value
|
|
|
|
|
| template<GrBlendEquation Equation>
|
| -struct GrTBlendEquationIsAdvanced : SkTBool<Equation >= kFirstAdvancedGrBlendEquation> {};
|
| +struct GrTBlendEquationIsAdvanced : skstd::bool_constant<Equation >= kFirstAdvancedGrBlendEquation> {};
|
|
|
| #define GR_BLEND_EQUATION_IS_ADVANCED(EQUATION) \
|
| GrTBlendEquationIsAdvanced<EQUATION>::value
|
| @@ -168,10 +168,10 @@ inline bool GrBlendEquationIsAdvanced(GrBlendEquation equation) {
|
|
|
|
|
| template<GrBlendEquation BlendEquation, GrBlendCoeff SrcCoeff, GrBlendCoeff DstCoeff>
|
| -struct GrTBlendModifiesDst : SkTBool<(kAdd_GrBlendEquation != BlendEquation &&
|
| - kReverseSubtract_GrBlendEquation != BlendEquation) ||
|
| - kZero_GrBlendCoeff != SrcCoeff ||
|
| - kOne_GrBlendCoeff != DstCoeff> {};
|
| +struct GrTBlendModifiesDst : skstd::bool_constant<
|
| + (kAdd_GrBlendEquation != BlendEquation && kReverseSubtract_GrBlendEquation != BlendEquation) ||
|
| + kZero_GrBlendCoeff != SrcCoeff ||
|
| + kOne_GrBlendCoeff != DstCoeff> {};
|
|
|
| #define GR_BLEND_MODIFIES_DST(EQUATION, SRC_COEFF, DST_COEFF) \
|
| GrTBlendModifiesDst<EQUATION, SRC_COEFF, DST_COEFF>::value
|
| @@ -202,13 +202,13 @@ struct GrTBlendModifiesDst : SkTBool<(kAdd_GrBlendEquation != BlendEquation &&
|
| * dstCoeff references S.
|
| */
|
| template<GrBlendEquation Equation, GrBlendCoeff SrcCoeff, GrBlendCoeff DstCoeff>
|
| -struct GrTBlendCanTweakAlphaForCoverage : SkTBool<GR_BLEND_EQUATION_IS_ADVANCED(Equation) ||
|
| - ((kAdd_GrBlendEquation == Equation ||
|
| - kReverseSubtract_GrBlendEquation == Equation) &&
|
| - !GR_BLEND_COEFF_REFS_SRC(SrcCoeff) &&
|
| - (kOne_GrBlendCoeff == DstCoeff ||
|
| - kISC_GrBlendCoeff == DstCoeff ||
|
| - kISA_GrBlendCoeff == DstCoeff))> {};
|
| +struct GrTBlendCanTweakAlphaForCoverage : skstd::bool_constant<
|
| + GR_BLEND_EQUATION_IS_ADVANCED(Equation) ||
|
| + ((kAdd_GrBlendEquation == Equation || kReverseSubtract_GrBlendEquation == Equation) &&
|
| + !GR_BLEND_COEFF_REFS_SRC(SrcCoeff) &&
|
| + (kOne_GrBlendCoeff == DstCoeff ||
|
| + kISC_GrBlendCoeff == DstCoeff ||
|
| + kISA_GrBlendCoeff == DstCoeff))> {};
|
|
|
| #define GR_BLEND_CAN_TWEAK_ALPHA_FOR_COVERAGE(EQUATION, SRC_COEFF, DST_COEFF) \
|
| GrTBlendCanTweakAlphaForCoverage<EQUATION, SRC_COEFF, DST_COEFF>::value
|
|
|