8#ifndef GrGLSLProgramBuilder_DEFINED
9#define GrGLSLProgramBuilder_DEFINED
115 const char* inputColor,
116 const char* destColor,
117 const char* coords)
const;
143 std::unique_ptr<GrGeometryProcessor::ProgramImpl>
fGPImpl;
144 std::unique_ptr<GrXferProcessor::ProgramImpl>
fXPImpl;
145 std::vector<std::unique_ptr<GrFragmentProcessor::ProgramImpl>>
fFPImpls;
165 void nameExpression(
SkString*,
const char* baseName);
167 bool emitAndInstallPrimProc(
SkString* outputColor,
SkString* outputCoverage);
168 bool emitAndInstallDstTexture();
170 bool emitAndInstallFragProcs(
SkString* colorInOut,
SkString* coverageInOut);
179 bool emitAndInstallXferProc(
const SkString& colorIn,
const SkString& coverageIn);
183 bool checkSamplerCounts();
192 int fNumFragmentSamplers;
202 int fStageIndex = -1;
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
const GrShaderCaps * shaderCaps() const
SkString nameVariable(char prefix, const char *name, bool mangle=true)
virtual GrGLSLUniformHandler * uniformHandler()=0
GrSurfaceOrigin fDstTextureOrigin
const char * samplerVariable(SamplerHandle handle) const
bool fragmentProcessorHasCoordsParam(const GrFragmentProcessor *) const
const GrProgramDesc & fDesc
const GrProgramDesc & desc() const
bool hasPointSize() const
std::vector< std::unique_ptr< GrFragmentProcessor::ProgramImpl > > fFPImpls
virtual const GrCaps * caps() const =0
std::unique_ptr< GrGeometryProcessor::ProgramImpl > fGPImpl
virtual void finalizeFragmentSecondaryColor(GrShaderVar &outputColor)
skgpu::Swizzle samplerSwizzle(SamplerHandle handle) const
const GrShaderCaps * shaderCaps() const
bool fragColorIsInOut() const
SamplerHandle fDstTextureSamplerHandle
void addFeature(GrShaderFlags shaders, uint32_t featureBit, const char *extensionName)
const char * inputSamplerVariable(SamplerHandle handle) const
bool snapVerticesToPixelCenters() const
const GrGeometryProcessor & geometryProcessor() const
GrGLSLUniformHandler::SamplerHandle SamplerHandle
skgpu::Swizzle inputSamplerSwizzle(SamplerHandle handle) const
bool emitTextureSamplersForFPs(const GrFragmentProcessor &fp, GrFragmentProcessor::ProgramImpl &impl, int *samplerIndex)
virtual const GrGLSLUniformHandler * uniformHandler() const =0
void appendUniformDecls(GrShaderFlags visibility, SkString *) const
virtual GrGLSLVaryingHandler * varyingHandler()=0
std::string invokeFP(const GrFragmentProcessor &fp, const GrFragmentProcessor::ProgramImpl &impl, const char *inputColor, const char *destColor, const char *coords) const
std::unique_ptr< GrXferProcessor::ProgramImpl > fXPImpl
virtual ~GrGLSLProgramBuilder()
static const int kVarsPerBlock
GrGLSLBuiltinUniformHandles fUniformHandles
GrSurfaceOrigin origin() const
const GrProgramInfo & fProgramInfo
GrGLSLUniformHandler::UniformHandle UniformHandle
GrGLSLFragmentShaderBuilder fFS
void addRTFlipUniform(const char *name)
GrGLSLProgramBuilder(const GrProgramDesc &, const GrProgramInfo &)
bool emitAndInstallProcs()
void writeFPFunction(const GrFragmentProcessor &fp, GrFragmentProcessor::ProgramImpl &impl)
const GrPipeline & pipeline() const
std::unordered_map< const GrFragmentProcessor *, FPCoords > FPCoordsMap
bool snapVerticesToPixelCenters() const
GrSurfaceOrigin origin() const
GrPrimitiveType primitiveType() const
const GrPipeline & pipeline() const
const GrGeometryProcessor & geomProc() const
DEF_SWITCHES_START aot vmservice shared library name