Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
skgpu::graphite::ShaderSnippet Struct Reference

#include <ShaderCodeDictionary.h>

Classes

struct  Args
 

Public Types

using GeneratePreambleForSnippetFn = std::string(*)(const ShaderInfo &shaderInfo, const ShaderNode *)
 
using GenerateExpressionForSnippetFn = std::string(*)(const ShaderInfo &shaderInfo, const ShaderNode *, const Args &args)
 

Public Member Functions

 ShaderSnippet ()=default
 
 ShaderSnippet (const char *name, SkSpan< const Uniform > uniforms, SkEnumBitMask< SnippetRequirementFlags > snippetRequirementFlags, SkSpan< const TextureAndSampler > texturesAndSamplers, const char *functionName, GenerateExpressionForSnippetFn expressionGenerator, GeneratePreambleForSnippetFn preambleGenerator, int numChildren)
 
bool needsLocalCoords () const
 
bool needsPriorStageOutput () const
 
bool needsBlenderDstColor () const
 
bool storesData () const
 

Public Attributes

const char * fName = nullptr
 
SkSpan< const UniformfUniforms
 
SkEnumBitMask< SnippetRequirementFlagsfSnippetRequirementFlags {SnippetRequirementFlags::kNone}
 
SkSpan< const TextureAndSamplerfTexturesAndSamplers
 
const char * fStaticFunctionName = nullptr
 
GenerateExpressionForSnippetFn fExpressionGenerator = nullptr
 
GeneratePreambleForSnippetFn fPreambleGenerator = nullptr
 
int fNumChildren = 0
 

Detailed Description

Definition at line 76 of file ShaderCodeDictionary.h.

Member Typedef Documentation

◆ GenerateExpressionForSnippetFn

using skgpu::graphite::ShaderSnippet::GenerateExpressionForSnippetFn = std::string (*)(const ShaderInfo& shaderInfo, const ShaderNode*, const Args& args)

Definition at line 84 of file ShaderCodeDictionary.h.

◆ GeneratePreambleForSnippetFn

using skgpu::graphite::ShaderSnippet::GeneratePreambleForSnippetFn = std::string (*)(const ShaderInfo& shaderInfo, const ShaderNode*)

Definition at line 77 of file ShaderCodeDictionary.h.

Constructor & Destructor Documentation

◆ ShaderSnippet() [1/2]

skgpu::graphite::ShaderSnippet::ShaderSnippet ( )
default

◆ ShaderSnippet() [2/2]

skgpu::graphite::ShaderSnippet::ShaderSnippet ( const char *  name,
SkSpan< const Uniform uniforms,
SkEnumBitMask< SnippetRequirementFlags snippetRequirementFlags,
SkSpan< const TextureAndSampler texturesAndSamplers,
const char *  functionName,
GenerateExpressionForSnippetFn  expressionGenerator,
GeneratePreambleForSnippetFn  preambleGenerator,
int  numChildren 
)
inline

Definition at line 90 of file ShaderCodeDictionary.h.

98 : fName(name)
99 , fUniforms(uniforms)
100 , fSnippetRequirementFlags(snippetRequirementFlags)
101 , fTexturesAndSamplers(texturesAndSamplers)
102 , fStaticFunctionName(functionName)
103 , fExpressionGenerator(expressionGenerator)
104 , fPreambleGenerator(preambleGenerator)
105 , fNumChildren(numChildren) {}
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
SkEnumBitMask< SnippetRequirementFlags > fSnippetRequirementFlags
GeneratePreambleForSnippetFn fPreambleGenerator
SkSpan< const Uniform > fUniforms
GenerateExpressionForSnippetFn fExpressionGenerator
SkSpan< const TextureAndSampler > fTexturesAndSamplers

Member Function Documentation

◆ needsBlenderDstColor()

bool skgpu::graphite::ShaderSnippet::needsBlenderDstColor ( ) const
inline

Definition at line 113 of file ShaderCodeDictionary.h.

113 {
115 }
static constexpr bool SkToBool(const T &x)
Definition: SkTo.h:35

◆ needsLocalCoords()

bool skgpu::graphite::ShaderSnippet::needsLocalCoords ( ) const
inline

◆ needsPriorStageOutput()

bool skgpu::graphite::ShaderSnippet::needsPriorStageOutput ( ) const
inline

◆ storesData()

bool skgpu::graphite::ShaderSnippet::storesData ( ) const
inline

Member Data Documentation

◆ fExpressionGenerator

GenerateExpressionForSnippetFn skgpu::graphite::ShaderSnippet::fExpressionGenerator = nullptr

Definition at line 125 of file ShaderCodeDictionary.h.

◆ fName

const char* skgpu::graphite::ShaderSnippet::fName = nullptr

Definition at line 120 of file ShaderCodeDictionary.h.

◆ fNumChildren

int skgpu::graphite::ShaderSnippet::fNumChildren = 0

Definition at line 127 of file ShaderCodeDictionary.h.

◆ fPreambleGenerator

GeneratePreambleForSnippetFn skgpu::graphite::ShaderSnippet::fPreambleGenerator = nullptr

Definition at line 126 of file ShaderCodeDictionary.h.

◆ fSnippetRequirementFlags

SkEnumBitMask<SnippetRequirementFlags> skgpu::graphite::ShaderSnippet::fSnippetRequirementFlags {SnippetRequirementFlags::kNone}

Definition at line 122 of file ShaderCodeDictionary.h.

◆ fStaticFunctionName

const char* skgpu::graphite::ShaderSnippet::fStaticFunctionName = nullptr

Definition at line 124 of file ShaderCodeDictionary.h.

◆ fTexturesAndSamplers

SkSpan<const TextureAndSampler> skgpu::graphite::ShaderSnippet::fTexturesAndSamplers

Definition at line 123 of file ShaderCodeDictionary.h.

◆ fUniforms

SkSpan<const Uniform> skgpu::graphite::ShaderSnippet::fUniforms

Definition at line 121 of file ShaderCodeDictionary.h.


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