9#ifndef GrUserStencilSettings_DEFINED
10#define GrUserStencilSettings_DEFINED
115 template<GrUserStencilTest, GrUserStencilOp PassOp, GrUserStencilOp FailOp>
struct Attrs;
121 template<uint16_t CWRef, uint16_t CCWRef,
123 uint16_t CWTestMask, uint16_t CCWTestMask,
134 template<uint16_t CWRef, uint16_t CCWRef,
136 uint16_t CWTestMask, uint16_t CCWTestMask,
139 uint16_t CWWriteMask, uint16_t CCWWriteMask>
140 constexpr static InitSeparate<CWRef, CCWRef, CWTest, CCWTest, CWTestMask, CCWTestMask,
141 CWPassOp, CCWPassOp, CWFailOp, CCWFailOp, CWWriteMask,
143 return InitSeparate<CWRef, CCWRef, CWTest, CCWTest, CWTestMask, CCWTestMask,
144 CWPassOp, CCWPassOp, CWFailOp, CCWFailOp, CWWriteMask, CCWWriteMask>();
151 typename Attrs = Attrs<Test, PassOp, FailOp> >
156 ,
fCWFace{
Ref, Test,
Attrs::EffectiveTestMask(TestMask), PassOp, FailOp,
157 Attrs::EffectiveWriteMask(WriteMask)}
161 Attrs::EffectiveWriteMask(WriteMask)} {
164 template<uint16_t CWRef, uint16_t CCWRef,
166 uint16_t CWTestMask, uint16_t CCWTestMask,
169 uint16_t CWWriteMask, uint16_t CCWWriteMask,
170 typename CWAttrs = Attrs<CWTest, CWPassOp, CWFailOp>,
171 typename CCWAttrs = Attrs<CCWTest, CCWPassOp, CCWFailOp> >
173 const InitSeparate<CWRef, CCWRef, CWTest, CCWTest, CWTestMask, CCWTestMask,
174 CWPassOp, CCWPassOp, CWFailOp, CCWFailOp, CWWriteMask,
177 ,
fCWFace{CWRef, CWTest, CWAttrs::EffectiveTestMask(CWTestMask), CWPassOp, CWFailOp,
178 CWAttrs::EffectiveWriteMask(CWWriteMask)}
180 ,
fCCWFace{CCWRef, CCWTest, CCWAttrs::EffectiveTestMask(CCWTestMask), CCWPassOp, CCWFailOp,
181 CCWAttrs::EffectiveWriteMask(CCWWriteMask)} {}
187 uint16_t
flags(
bool hasStencilClip)
const {
213template<GrUserStencilTest Test, GrUserStencilOp PassOp, GrUserStencilOp FailOp>
241 constexpr static uint16_t
Flags(
bool hasStencilClip) {
@ kSetClipAndReplaceUserBits
static constexpr GrUserStencilOp kLastUserOnlyStencilOp
@ kTestAlwaysPasses_StencilFlag
@ kSingleSided_StencilFlag
@ kNoModifyStencil_StencilFlag
static constexpr GrUserStencilOp kLastClipOnlyStencilOp
static constexpr GrUserStencilTest kLastClippedStencilTest
static constexpr int kGrUserStencilOpCount
static constexpr int kGrUserStencilTestCount
static constexpr uint16_t EffectiveWriteMask(uint16_t writeMask)
static constexpr bool TestIgnoresRef()
static constexpr uint16_t Flags(bool hasStencilClip)
static constexpr uint16_t EffectiveTestMask(uint16_t testMask)
static constexpr bool DoesNotModifyStencil(bool hasStencilClip)
static constexpr bool UsesWrapOps()
static constexpr bool TestAlwaysPasses(bool hasStencilClip)
static constexpr bool IsDisabled(bool hasStencilClip)
static constexpr Init< Ref, Test, TestMask, PassOp, FailOp, WriteMask > StaticInit()
GrTStencilFaceSettings< GrUserStencilTest, GrUserStencilOp > Face
GrUserStencilSettings(const GrUserStencilSettings &)=delete
uint16_t flags(bool hasStencilClip) const
bool isDisabled(bool hasStencilClip) const
bool isTwoSided(bool hasStencilClip) const
static constexpr InitSeparate< CWRef, CCWRef, CWTest, CCWTest, CWTestMask, CCWTestMask, CWPassOp, CCWPassOp, CWFailOp, CCWFailOp, CWWriteMask, CCWWriteMask > StaticInitSeparate()
bool usesWrapOp(bool hasStencilClip) const
const uint16_t fCWFlags[2]
GrUserStencilSettings()=delete
constexpr GrUserStencilSettings(const InitSeparate< CWRef, CCWRef, CWTest, CCWTest, CWTestMask, CCWTestMask, CWPassOp, CCWPassOp, CWFailOp, CCWFailOp, CWWriteMask, CCWWriteMask > &)
bool testAlwaysPasses(bool hasStencilClip) const
constexpr GrUserStencilSettings(const Init< Ref, Test, TestMask, PassOp, FailOp, WriteMask > &)
static const GrUserStencilSettings & kUnused
const uint16_t fCCWFlags[2]