Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
SkSL::PipelineStage::PipelineStageCodeGenerator Class Reference

Public Member Functions

 PipelineStageCodeGenerator (const Program &program, const char *sampleCoords, const char *inputColor, const char *destColor, Callbacks *callbacks)
 
void generateCode ()
 

Detailed Description

Definition at line 65 of file SkSLPipelineStageCodeGenerator.cpp.

Constructor & Destructor Documentation

◆ PipelineStageCodeGenerator()

SkSL::PipelineStage::PipelineStageCodeGenerator::PipelineStageCodeGenerator ( const Program program,
const char *  sampleCoords,
const char *  inputColor,
const char *  destColor,
Callbacks callbacks 
)
inline

Definition at line 67 of file SkSLPipelineStageCodeGenerator.cpp.

72 : fProgram(program)
73 , fSampleCoords(sampleCoords)
74 , fInputColor(inputColor)
75 , fDestColor(destColor)
76 , fCallbacks(callbacks) {}

Member Function Documentation

◆ generateCode()

void SkSL::PipelineStage::PipelineStageCodeGenerator::generateCode ( )

Definition at line 792 of file SkSLPipelineStageCodeGenerator.cpp.

792 {
793 // Write all the program elements except for functions; prototype all the functions.
794 for (const ProgramElement* e : fProgram.elements()) {
795 this->writeProgramElementFirstPass(*e);
796 }
797
798 // We always place FunctionDefinition elements last, because the inliner likes to move function
799 // bodies around. After inlining, code can inadvertently move upwards, above ProgramElements
800 // that the code relies on.
801 for (const ProgramElement* e : fProgram.elements()) {
802 this->writeProgramElementSecondPass(*e);
803 }
804}
ElementsCollection elements() const
Definition: SkSLProgram.h:140

The documentation for this class was generated from the following file: