8#ifndef skgpu_BlendFormula_DEFINED
9#define skgpu_BlendFormula_DEFINED
109 kModifiesDst_Property = 1 << 0,
110 kUnaffectedByDst_Property = 1 << 1,
111 kUnaffectedByDstIfOpaque_Property = 1 << 2,
112 kUsesInputColor_Property = 1 << 3,
113 kCanTweakAlphaForCoverage_Property = 1 << 4,
115 kLast_Property = kCanTweakAlphaForCoverage_Property
122 constexpr BlendFormula::Properties GetProperties(
OutputType PrimaryOut,
137 static_cast<Properties
>(
139 ? kModifiesDst_Property
142 ? kUnaffectedByDst_Property
145 ? kUnaffectedByDstIfOpaque_Property
151 ? kUsesInputColor_Property
156 ? kCanTweakAlphaForCoverage_Property
168 Properties
fProps : 32 - (4 + 4 + 6 + 6 + 6);
174 static_assert(kLast_Property < (1 << 6));
177static_assert(4 ==
sizeof(BlendFormula));
#define SK_MAKE_BITFIELD_OPS(X)
#define SK_DECL_BITFIELD_OPS_FRIENDS(X)
static constexpr bool SkToBool(const T &x)
static constexpr bool BlendCoeffsUseSrcColor(BlendCoeff srcCoeff, BlendCoeff dstCoeff)
static constexpr bool BlendAllowsCoverageAsAlpha(BlendEquation equation, BlendCoeff srcCoeff, BlendCoeff dstCoeff)
BlendFormula GetBlendFormula(bool isOpaque, bool hasCoverage, SkBlendMode xfermode)
static constexpr bool BlendCoeffsUseDstColor(BlendCoeff srcCoeff, BlendCoeff dstCoeff, bool srcColorIsOpaque)
BlendFormula GetLCDBlendFormula(SkBlendMode xfermode)
static constexpr bool BlendModifiesDst(BlendEquation equation, BlendCoeff srcCoeff, BlendCoeff dstCoeff)
static constexpr bool BlendCoeffRefsSrc2(const BlendCoeff coeff)