Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::gpu::RenderPipeline Class Reference

#include <render_pipeline.h>

Inheritance diagram for flutter::gpu::RenderPipeline:
flutter::RefCountedDartWrappable< RenderPipeline > fml::RefCountedThreadSafe< T > tonic::DartWrappable fml::internal::RefCountedThreadSafeBase

Public Member Functions

 RenderPipeline (fml::RefPtr< flutter::gpu::Shader > vertex_shader, fml::RefPtr< flutter::gpu::Shader > fragment_shader, std::shared_ptr< impeller::VertexDescriptor > vertex_descriptor)
 
 ~RenderPipeline () override
 
void BindToPipelineDescriptor (impeller::ShaderLibrary &library, impeller::PipelineDescriptor &desc)
 
- Public Member Functions inherited from flutter::RefCountedDartWrappable< RenderPipeline >
virtual void RetainDartWrappableReference () const override
 
virtual void ReleaseDartWrappableReference () const override
 
- Public Member Functions inherited from fml::RefCountedThreadSafe< T >
void Release () const
 
- Public Member Functions inherited from fml::internal::RefCountedThreadSafeBase
void AddRef () const
 
bool HasOneRef () const
 
void AssertHasOneRef () const
 
- Public Member Functions inherited from tonic::DartWrappable
 DartWrappable ()
 
virtual const DartWrapperInfoGetDartWrapperInfo () const =0
 
Dart_Handle CreateDartWrapper (DartState *dart_state)
 
void AssociateWithDartWrapper (Dart_Handle wrappable)
 
void ClearDartWrapper ()
 
Dart_WeakPersistentHandle dart_wrapper () const
 

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)
 

Detailed Description

Definition at line 20 of file render_pipeline.h.

Constructor & Destructor Documentation

◆ RenderPipeline()

flutter::gpu::RenderPipeline::RenderPipeline ( fml::RefPtr< flutter::gpu::Shader vertex_shader,
fml::RefPtr< flutter::gpu::Shader fragment_shader,
std::shared_ptr< impeller::VertexDescriptor vertex_descriptor 
)

Definition at line 27 of file render_pipeline.cc.

31 : vertex_shader_(std::move(vertex_shader)),
32 fragment_shader_(std::move(fragment_shader)),
33 vertex_descriptor_(std::move(vertex_descriptor)) {
34 // Register the descriptor set layouts contributed by each shader exactly
35 // once, here at construction. Doing this in BindToPipelineDescriptor (as
36 // earlier revisions did) would append the same layouts on every bind
37 // since `RegisterDescriptorSetLayouts` accumulates rather than replaces.
38 vertex_descriptor_->RegisterDescriptorSetLayouts(
39 vertex_shader_->GetDescriptorSetLayouts().data(),
40 vertex_shader_->GetDescriptorSetLayouts().size());
41 vertex_descriptor_->RegisterDescriptorSetLayouts(
42 fragment_shader_->GetDescriptorSetLayouts().data(),
43 fragment_shader_->GetDescriptorSetLayouts().size());
44}
const std::vector< impeller::DescriptorSetLayout > & GetDescriptorSetLayouts() const
Definition shader.cc:118

References flutter::gpu::Shader::GetDescriptorSetLayouts().

◆ ~RenderPipeline()

flutter::gpu::RenderPipeline::~RenderPipeline ( )
overridedefault

Member Function Documentation

◆ BindToPipelineDescriptor()

void flutter::gpu::RenderPipeline::BindToPipelineDescriptor ( impeller::ShaderLibrary library,
impeller::PipelineDescriptor desc 
)

Definition at line 46 of file render_pipeline.cc.

48 {
49 desc.SetVertexDescriptor(vertex_descriptor_);
50
51 desc.AddStageEntrypoint(vertex_shader_->GetFunctionFromLibrary(library));
52 desc.AddStageEntrypoint(fragment_shader_->GetFunctionFromLibrary(library));
53}
std::shared_ptr< const impeller::ShaderFunction > GetFunctionFromLibrary(impeller::ShaderLibrary &library)
Definition shader.cc:67
PipelineDescriptor & SetVertexDescriptor(std::shared_ptr< VertexDescriptor > vertex_descriptor)
PipelineDescriptor & AddStageEntrypoint(std::shared_ptr< const ShaderFunction > function)

References impeller::PipelineDescriptor::AddStageEntrypoint(), flutter::gpu::Shader::GetFunctionFromLibrary(), and impeller::PipelineDescriptor::SetVertexDescriptor().


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