 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_RENDERER_PIPELINE_DESCRIPTOR_H_
6 #define FLUTTER_IMPELLER_RENDERER_PIPELINE_DESCRIPTOR_H_
20 class VertexDescriptor;
39 std::shared_ptr<const ShaderFunction>
function);
41 const std::map<ShaderStage, std::shared_ptr<const ShaderFunction>>&
48 std::shared_ptr<VertexDescriptor> vertex_descriptor);
59 std::map<size_t /* index */, ColorAttachmentDescriptor> descriptors);
70 std::optional<DepthAttachmentDescriptor> desc);
76 std::optional<StencilAttachmentDescriptor> front_and_back);
79 std::optional<StencilAttachmentDescriptor> front,
80 std::optional<StencilAttachmentDescriptor> back);
88 std::optional<StencilAttachmentDescriptor>
91 std::optional<StencilAttachmentDescriptor>
105 std::size_t
GetHash()
const override;
137 std::map<ShaderStage, std::shared_ptr<const ShaderFunction>> entrypoints_;
139 color_attachment_descriptors_;
140 std::shared_ptr<VertexDescriptor> vertex_descriptor_;
143 std::optional<DepthAttachmentDescriptor> depth_attachment_descriptor_;
144 std::optional<StencilAttachmentDescriptor>
145 front_stencil_attachment_descriptor_;
146 std::optional<StencilAttachmentDescriptor>
147 back_stencil_attachment_descriptor_;
150 std::vector<Scalar> specialization_constants_;
155 #endif // FLUTTER_IMPELLER_RENDERER_PIPELINE_DESCRIPTOR_H_
const std::vector< Scalar > & GetSpecializationConstants() const
std::optional< StencilAttachmentDescriptor > GetBackStencilAttachmentDescriptor() const
void SetPolygonMode(PolygonMode mode)
CullMode GetCullMode() const
PipelineDescriptor & SetStencilAttachmentDescriptors(std::optional< StencilAttachmentDescriptor > front_and_back)
const std::string & GetLabel() const
PipelineDescriptor & SetColorAttachmentDescriptor(size_t index, ColorAttachmentDescriptor desc)
PipelineDescriptor & SetStencilPixelFormat(PixelFormat format)
const ColorAttachmentDescriptor * GetColorAttachmentDescriptor(size_t index) const
void SetPrimitiveType(PrimitiveType type)
SampleCount GetSampleCount() const
const std::shared_ptr< VertexDescriptor > & GetVertexDescriptor() const
std::shared_ptr< const ShaderFunction > GetEntrypointForStage(ShaderStage stage) const
void SetCullMode(CullMode mode)
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
PipelineDescriptor & SetColorAttachmentDescriptors(std::map< size_t, ColorAttachmentDescriptor > descriptors)
PrimitiveType
Decides how backend draws pixels based on input vertices.
bool HasStencilAttachmentDescriptors() const
size_t GetMaxColorAttacmentBindIndex() const
PrimitiveType GetPrimitiveType() const
WindingOrder GetWindingOrder() const
PixelFormat GetStencilPixelFormat() const
PolygonMode GetPolygonMode() const
void ClearColorAttachment(size_t index)
PipelineDescriptor & SetSampleCount(SampleCount samples)
PipelineDescriptor & AddStageEntrypoint(std::shared_ptr< const ShaderFunction > function)
std::optional< StencilAttachmentDescriptor > GetFrontStencilAttachmentDescriptor() const
void ClearDepthAttachment()
PixelFormat GetDepthPixelFormat() const
const std::map< size_t, ColorAttachmentDescriptor > & GetColorAttachmentDescriptors() const
PipelineDescriptor & SetDepthPixelFormat(PixelFormat format)
bool IsEqual(const PipelineDescriptor &other) const override
std::optional< DepthAttachmentDescriptor > GetDepthStencilAttachmentDescriptor() const
const std::map< ShaderStage, std::shared_ptr< const ShaderFunction > > & GetStageEntrypoints() const
std::size_t GetHash() const override
PipelineDescriptor & SetDepthStencilAttachmentDescriptor(std::optional< DepthAttachmentDescriptor > desc)
void SetSpecializationConstants(std::vector< Scalar > values)
PipelineDescriptor & SetLabel(std::string label)
void SetWindingOrder(WindingOrder order)
const ColorAttachmentDescriptor * GetLegacyCompatibleColorAttachment() const
void ClearStencilAttachments()
PipelineDescriptor & SetVertexDescriptor(std::shared_ptr< VertexDescriptor > vertex_descriptor)
Describe the color attachment that will be used with this pipeline.