8#ifndef GrGLSLShaderBuilder_DEFINED
9#define GrGLSLShaderBuilder_DEFINED
49 const char* coordName,
58 const char* coordName,
144 const char* mangledName,
151 const char* mangledName,
155 void emitFunction(
const char* declaration,
const char* body);
189 const char* mangledName,
210 bool addFeature(uint32_t featureBit,
const char* extensionName);
#define SK_PRINTF_LIKE(A, B)
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
ShaderBlock(GrGLSLShaderBuilder *builder)
virtual void onFinalize()=0
void emitFunction(SkSLType returnType, const char *mangledName, SkSpan< const GrShaderVar > args, const char *body)
void appendDecls(const VarArray &vars, SkString *out) const
void compileAndAppendLayoutQualifiers()
void addLayoutQualifier(const char *param, InterfaceQualifier)
void defineConstant(const char *type, const char *name, const char *value)
SkTBlockList< GrShaderVar > VarArray
void defineConstantf(const char *type, const char *name, const char *fmt,...) SK_PRINTF_LIKE(4
GrGLSLUniformHandler::SamplerHandle SamplerHandle
void codePrependf(const char format[],...) SK_PRINTF_LIKE(2
void declareGlobal(const GrShaderVar &)
GrGLSLShaderBuilder(GrGLSLProgramBuilder *program)
void defineConstant(const char *name, float value)
friend class GrGLPathProgramBuilder
this code().appendVAList(format
void declAppend(const GrShaderVar &var)
void definitionAppend(const char *str)
friend class GrDawnProgramBuilder
void codeAppend(const char *str, size_t length)
SkString & layoutQualifiers()
bool addFeature(uint32_t featureBit, const char *extensionName)
virtual ~GrGLSLShaderBuilder()
std::string fCompilerString
this code().prependVAList(format
void va_start(args, format)
void finalize(uint32_t visibility)
void codeAppend(const char *str)
void appendColorGamutXform(SkString *out, const char *srcColor, GrGLSLColorSpaceXformHelper *colorXformHelper)
uint32_t fFeaturesAddedMask
@ kLastGLSLPrivateFeature
@ kSampleVariables_GLSLPrivateFeature
@ kBlendFuncExtended_GLSLPrivateFeature
@ kNoPerspectiveInterpolation_GLSLPrivateFeature
@ kBlendEquationAdvanced_GLSLPrivateFeature
@ kFramebufferFetch_GLSLPrivateFeature
@ kFragCoordConventions_GLSLPrivateFeature
this definitions().appendVAList(fmt
skia_private::STArray< kPrealloc, SkString > fShaderStrings
@ kLastInterfaceQualifier
@ kOut_InterfaceQualifier
SkString & precisionQualifier()
void appendTextureLookup(SkString *out, SamplerHandle, const char *coordName) const
SkString getMangledFunctionName(const char *baseName)
void codeAppendf(const char format[],...) SK_PRINTF_LIKE(2
SkString newTmpVarName(const char *suffix)
void appendInputLoad(SamplerHandle)
GrGLSLProgramBuilder * fProgramBuilder
this definitions().append("
void appendFunctionDecl(SkSLType returnType, const char *mangledName, SkSpan< const GrShaderVar > args)
SkSL::StatementArray fDeclarations
skia_private::STArray< 1, SkString > fLayoutParams[kLastInterfaceQualifier+1]
void appendTextureLookupAndBlend(const char *dst, SkBlendMode, SamplerHandle, const char *coordName, GrGLSLColorSpaceXformHelper *colorXformHelper=nullptr)
GrGLSLProgramBuilder * getProgramBuilder()
void defineConstant(const char *name, int value)
void emitFunctionPrototype(SkSLType returnType, const char *mangledName, SkSpan< const GrShaderVar > args)
uint32_t uint32_t * format
DEF_SWITCHES_START aot vmservice shared library name
static SkString fmt(SkColor4f c)