An immutable collection of shaders loaded from a shader bundle asset. More...
#include <shader.h>
Classes | |
| struct | TextureBinding |
| struct | UniformBinding |
Static Public Member Functions | |
| static fml::RefPtr< Shader > | Make (std::string library_id, std::string entrypoint, impeller::ShaderStage stage, std::shared_ptr< fml::Mapping > code_mapping, std::vector< impeller::ShaderStageIOSlot > inputs, std::vector< impeller::ShaderStageBufferLayout > layouts, std::unordered_map< std::string, UniformBinding > uniform_structs, std::unordered_map< std::string, TextureBinding > uniform_textures, std::vector< impeller::DescriptorSetLayout > descriptor_set_layouts) |
Additional Inherited Members | |
Public Types inherited from tonic::DartWrappable | |
| enum | DartNativeFields { kPeerIndex , kNumberOfNativeFields } |
Protected Member Functions inherited from fml::RefCountedThreadSafe< T > | |
| RefCountedThreadSafe () | |
| ~RefCountedThreadSafe () | |
Protected Member Functions inherited from fml::internal::RefCountedThreadSafeBase | |
| RefCountedThreadSafeBase () | |
| ~RefCountedThreadSafeBase () | |
| bool | Release () const |
| void | Adopt () |
Protected Member Functions inherited from tonic::DartWrappable | |
| virtual | ~DartWrappable () |
Static Protected Member Functions inherited from tonic::DartWrappable | |
| static Dart_PersistentHandle | GetTypeForWrapper (tonic::DartState *dart_state, const tonic::DartWrapperInfo &wrapper_info) |
An immutable collection of shaders loaded from a shader bundle asset.
|
overridedefault |
| std::shared_ptr< impeller::VertexDescriptor > flutter::gpu::Shader::CreateVertexDescriptor | ( | ) | const |
Definition at line 151 of file shader.cc.
Referenced by InternalFlutterGpu_RenderPipeline_Initialize().
| const std::vector< impeller::DescriptorSetLayout > & flutter::gpu::Shader::GetDescriptorSetLayouts | ( | ) | const |
Definition at line 172 of file shader.cc.
Referenced by flutter::gpu::RenderPipeline::RenderPipeline().
| std::shared_ptr< const impeller::ShaderFunction > flutter::gpu::Shader::GetFunctionFromLibrary | ( | impeller::ShaderLibrary & | library | ) |
Definition at line 69 of file shader.cc.
References impeller::ShaderLibrary::GetFunction().
Referenced by flutter::gpu::RenderPipeline::BindToPipelineDescriptor(), and IsRegistered().
| impeller::ShaderStage flutter::gpu::Shader::GetShaderStage | ( | ) | const |
Definition at line 167 of file shader.cc.
Referenced by BindUniform(), and InternalFlutterGpu_RenderPass_BindTexture().
| const std::vector< impeller::ShaderStageBufferLayout > & flutter::gpu::Shader::GetStageBufferLayouts | ( | ) | const |
| const std::vector< impeller::ShaderStageIOSlot > & flutter::gpu::Shader::GetStageInputs | ( | ) | const |
| const Shader::UniformBinding * flutter::gpu::Shader::GetUniformStruct | ( | const std::string & | name | ) | const |
Definition at line 176 of file shader.cc.
References flutter::name.
Referenced by BindUniform(), InternalFlutterGpu_Shader_GetUniformMemberOffset(), and InternalFlutterGpu_Shader_GetUniformStructSize().
| const Shader::TextureBinding * flutter::gpu::Shader::GetUniformTexture | ( | const std::string & | name | ) | const |
Definition at line 185 of file shader.cc.
References flutter::name.
Referenced by InternalFlutterGpu_RenderPass_BindTexture().
| bool flutter::gpu::Shader::IsDirty | ( | ) | const |
Whether this shader needs to be re-registered with the impeller shader library on next use. Fresh shaders start dirty. Set back to false by RegisterSync after registration completes, and back to true by ResetFrom when the underlying asset is reloaded.
Definition at line 79 of file shader.cc.
Referenced by InternalFlutterGpu_Shader_DebugIsDirty().
| bool flutter::gpu::Shader::IsRegistered | ( | Context & | context | ) |
Definition at line 74 of file shader.cc.
References context, and GetFunctionFromLibrary().
|
static |
Definition at line 41 of file shader.cc.
Referenced by flutter::gpu::ParseShaderBundle().
| bool flutter::gpu::Shader::RegisterSync | ( | Context & | context | ) |
Definition at line 118 of file shader.cc.
References context, and fml::MakeCopyable().
Referenced by InternalFlutterGpu_RenderPipeline_Initialize().
| void flutter::gpu::Shader::ResetFrom | ( | Shader & | other | ) |
Replaces this shader's payload (code, layouts, uniforms) with the data from other, preserving the library_id / entrypoint registry key and marking this shader dirty. Used by ShaderLibrary to reload a shader bundle in place without breaking existing Dart wrappers.
Definition at line 87 of file shader.cc.
| void flutter::gpu::Shader::SetClean | ( | ) |