8#ifndef SKSL_CODEGENERATOR
9#define SKSL_CODEGENERATOR
47#if defined(SK_USE_LEGACY_MIPMAP_LOD_BIAS)
73 , fOldOutput(codeGen->outputStream()) {
79 , fOldOutput(codeGen->outputStream())
80 , fIndentationPtr(indentationPtr)
81 , fOldIndentation(indentationPtr ? *indentationPtr : 0) {
87 if (fIndentationPtr) {
88 *fIndentationPtr = fOldIndentation;
95 int *fIndentationPtr =
nullptr;
96 int fOldIndentation = 0;
AutoOutputStream(CodeGenerator *codeGen, OutputStream *newOutput, int *indentationPtr)
AutoOutputStream(CodeGenerator *codeGen, OutputStream *newOutput)
void setOutputStream(OutputStream *output)
virtual ~CodeGenerator()=default
OutputStream * outputStream()
static constexpr float kSharpenTexturesBias
CodeGenerator(const Context *context, const ShaderCaps *caps, const Program *program, OutputStream *stream)
virtual bool generateCode()=0
SymbolTable * fSymbolTable
std::shared_ptr< Context > fContext
std::unique_ptr< SymbolTable > fSymbols
std::unique_ptr< ProgramConfig > fConfig