8#ifndef GrGLSLFragmentShaderBuilder_DEFINED
9#define GrGLSLFragmentShaderBuilder_DEFINED
36 kInsidePerPrimitiveBranch = (1 << 0),
38 kInsidePerPixelBranch = (1 << 1),
40 kInsideLoop = (1 << 2)
56 char fPadding[4] = {};
100 void enableSecondaryOutput();
101 const char* getPrimaryColorOutputName()
const;
102 const char* getSecondaryColorOutputName()
const;
103 bool primaryColorOutputIsInOut()
const;
108 bool fHasReadDstColorThisStage_DebugOnly =
false;
110 void debugOnly_resetPerStageVerification() {
111 fHasReadDstColorThisStage_DebugOnly =
false;
115 static const char* DeclaredColorOutputName() {
return "sk_FragColor"; }
116 static const char* DeclaredSecondaryColorOutputName() {
return "fsSecondaryColorOut"; }
120 void onFinalize()
override;
122 inline static constexpr const char kDstColorName[] =
"_dstColor";
124 bool fPrimaryColorIsInOut =
false;
125 bool fSetupFragPosition =
false;
126 bool fHasSecondaryOutput =
false;
127 bool fHasModifiedSampleMask =
false;
128 bool fForceHighPrecision =
false;
#define GR_MAKE_BITFIELD_CLASS_OPS(X)
GrGLSLFPFragmentBuilder()
virtual const char * dstColor()=0
virtual void forceHighPrecision()=0
void enableAdvancedBlendEquationIfNeeded(skgpu::BlendEquation) override
bool hasSecondaryOutput() const override
const char * dstColor() override
GrGLSLFragmentShaderBuilder(GrGLSLProgramBuilder *program)
void forceHighPrecision() override
virtual bool hasSecondaryOutput() const =0
GrGLSLXPFragmentBuilder()
virtual const char * dstColor()=0
virtual void enableAdvancedBlendEquationIfNeeded(skgpu::BlendEquation)=0