Flutter Engine
The Flutter Engine
|
#include <GrGLSLProgramBuilder.h>
Public Types | |
using | UniformHandle = GrGLSLUniformHandler::UniformHandle |
using | SamplerHandle = GrGLSLUniformHandler::SamplerHandle |
Public Attributes | |
GrGLSLVertexBuilder | fVS |
GrGLSLFragmentShaderBuilder | fFS |
const GrProgramDesc & | fDesc |
const GrProgramInfo & | fProgramInfo |
GrGLSLBuiltinUniformHandles | fUniformHandles |
std::unique_ptr< GrGeometryProcessor::ProgramImpl > | fGPImpl |
std::unique_ptr< GrXferProcessor::ProgramImpl > | fXPImpl |
std::vector< std::unique_ptr< GrFragmentProcessor::ProgramImpl > > | fFPImpls |
SamplerHandle | fDstTextureSamplerHandle |
GrSurfaceOrigin | fDstTextureOrigin |
Static Public Attributes | |
static const int | kVarsPerBlock = 8 |
Protected Member Functions | |
GrGLSLProgramBuilder (const GrProgramDesc &, const GrProgramInfo &) | |
void | addFeature (GrShaderFlags shaders, uint32_t featureBit, const char *extensionName) |
bool | emitAndInstallProcs () |
void | finalizeShaders () |
bool | fragColorIsInOut () const |
Definition at line 39 of file GrGLSLProgramBuilder.h.
using GrGLSLProgramBuilder::SamplerHandle = GrGLSLUniformHandler::SamplerHandle |
Definition at line 42 of file GrGLSLProgramBuilder.h.
Definition at line 41 of file GrGLSLProgramBuilder.h.
|
virtualdefault |
|
explicitprotected |
Definition at line 40 of file GrGLSLProgramBuilder.cpp.
|
protected |
Definition at line 50 of file GrGLSLProgramBuilder.cpp.
void GrGLSLProgramBuilder::addRTFlipUniform | ( | const char * | name | ) |
Definition at line 514 of file GrGLSLProgramBuilder.cpp.
|
inline |
advanceStage is called by program creator between each processor's emit code. It increments the stage index for variable name mangling, and also ensures verification variables in the fragment shader are cleared.
Definition at line 100 of file GrGLSLProgramBuilder.h.
void GrGLSLProgramBuilder::appendUniformDecls | ( | GrShaderFlags | visibility, |
SkString * | out | ||
) | const |
Definition at line 510 of file GrGLSLProgramBuilder.cpp.
|
pure virtual |
Implemented in GrD3DPipelineStateBuilder, GrGLProgramBuilder, and GrVkPipelineStateBuilder.
|
inline |
Definition at line 57 of file GrGLSLProgramBuilder.h.
|
protected |
Definition at line 61 of file GrGLSLProgramBuilder.cpp.
bool GrGLSLProgramBuilder::emitTextureSamplersForFPs | ( | const GrFragmentProcessor & | fp, |
GrFragmentProcessor::ProgramImpl & | impl, | ||
int * | samplerIndex | ||
) |
Emits samplers for TextureEffect fragment processors as needed. fp
can be a TextureEffect, or a tree containing zero or more TextureEffects.
Definition at line 151 of file GrGLSLProgramBuilder.cpp.
|
inlinevirtual |
Reimplemented in GrD3DPipelineStateBuilder, and GrVkPipelineStateBuilder.
Definition at line 130 of file GrGLSLProgramBuilder.h.
|
protected |
Definition at line 533 of file GrGLSLProgramBuilder.cpp.
|
inlineprotected |
Definition at line 159 of file GrGLSLProgramBuilder.h.
bool GrGLSLProgramBuilder::fragmentProcessorHasCoordsParam | ( | const GrFragmentProcessor * | fp | ) | const |
If the FP's coords are unused or all uses have been lifted to interpolated varyings then don't put coords in the FP's function signature or call sites.
Definition at line 527 of file GrGLSLProgramBuilder.cpp.
|
inline |
Definition at line 51 of file GrGLSLProgramBuilder.h.
|
inline |
Definition at line 55 of file GrGLSLProgramBuilder.h.
|
inline |
Definition at line 73 of file GrGLSLProgramBuilder.h.
|
inline |
Definition at line 69 of file GrGLSLProgramBuilder.h.
std::string GrGLSLProgramBuilder::invokeFP | ( | const GrFragmentProcessor & | fp, |
const GrFragmentProcessor::ProgramImpl & | impl, | ||
const char * | inputColor, | ||
const char * | destColor, | ||
const char * | coords | ||
) | const |
Returns a function-call invocation of fp
in string form, passing the appropriate combination of inputColor
, destColor
and fLocalCoordsVar
for the FP.
Definition at line 175 of file GrGLSLProgramBuilder.cpp.
Definition at line 486 of file GrGLSLProgramBuilder.cpp.
|
inline |
Definition at line 49 of file GrGLSLProgramBuilder.h.
|
inline |
Definition at line 50 of file GrGLSLProgramBuilder.h.
|
inline |
Definition at line 65 of file GrGLSLProgramBuilder.h.
|
inline |
Definition at line 61 of file GrGLSLProgramBuilder.h.
|
inline |
Definition at line 47 of file GrGLSLProgramBuilder.h.
|
inline |
Definition at line 52 of file GrGLSLProgramBuilder.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
void GrGLSLProgramBuilder::writeFPFunction | ( | const GrFragmentProcessor & | fp, |
GrFragmentProcessor::ProgramImpl & | impl | ||
) |
Adds the SkSL function that implements an FP assuming its children are already written.
Definition at line 243 of file GrGLSLProgramBuilder.cpp.
const GrProgramDesc& GrGLSLProgramBuilder::fDesc |
Definition at line 138 of file GrGLSLProgramBuilder.h.
GrSurfaceOrigin GrGLSLProgramBuilder::fDstTextureOrigin |
Definition at line 148 of file GrGLSLProgramBuilder.h.
SamplerHandle GrGLSLProgramBuilder::fDstTextureSamplerHandle |
Definition at line 147 of file GrGLSLProgramBuilder.h.
std::vector<std::unique_ptr<GrFragmentProcessor::ProgramImpl> > GrGLSLProgramBuilder::fFPImpls |
Definition at line 145 of file GrGLSLProgramBuilder.h.
GrGLSLFragmentShaderBuilder GrGLSLProgramBuilder::fFS |
Definition at line 136 of file GrGLSLProgramBuilder.h.
std::unique_ptr<GrGeometryProcessor::ProgramImpl> GrGLSLProgramBuilder::fGPImpl |
Definition at line 143 of file GrGLSLProgramBuilder.h.
const GrProgramInfo& GrGLSLProgramBuilder::fProgramInfo |
Definition at line 139 of file GrGLSLProgramBuilder.h.
GrGLSLBuiltinUniformHandles GrGLSLProgramBuilder::fUniformHandles |
Definition at line 141 of file GrGLSLProgramBuilder.h.
GrGLSLVertexBuilder GrGLSLProgramBuilder::fVS |
Definition at line 135 of file GrGLSLProgramBuilder.h.
std::unique_ptr<GrXferProcessor::ProgramImpl> GrGLSLProgramBuilder::fXPImpl |
Definition at line 144 of file GrGLSLProgramBuilder.h.
|
static |
Definition at line 133 of file GrGLSLProgramBuilder.h.