5#ifndef FLUTTER_IMPELLER_RENDERER_PIPELINE_DESCRIPTOR_H_
6#define FLUTTER_IMPELLER_RENDERER_PIPELINE_DESCRIPTOR_H_
20class 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_;
PipelineDescriptor & SetStencilPixelFormat(PixelFormat format)
PipelineDescriptor & SetDepthStencilAttachmentDescriptor(std::optional< DepthAttachmentDescriptor > desc)
void ClearStencilAttachments()
std::size_t GetHash() const override
PixelFormat GetDepthPixelFormat() const
CullMode GetCullMode() const
void SetCullMode(CullMode mode)
PipelineDescriptor & SetVertexDescriptor(std::shared_ptr< VertexDescriptor > vertex_descriptor)
void SetPolygonMode(PolygonMode mode)
PrimitiveType GetPrimitiveType() const
PolygonMode GetPolygonMode() const
size_t GetMaxColorAttacmentBindIndex() const
std::optional< DepthAttachmentDescriptor > GetDepthStencilAttachmentDescriptor() const
PipelineDescriptor & AddStageEntrypoint(std::shared_ptr< const ShaderFunction > function)
bool IsEqual(const PipelineDescriptor &other) const override
const std::map< ShaderStage, std::shared_ptr< const ShaderFunction > > & GetStageEntrypoints() const
PixelFormat GetStencilPixelFormat() const
const ColorAttachmentDescriptor * GetLegacyCompatibleColorAttachment() const
void SetSpecializationConstants(std::vector< Scalar > values)
const std::vector< Scalar > & GetSpecializationConstants() const
PipelineDescriptor & SetDepthPixelFormat(PixelFormat format)
PipelineDescriptor & SetStencilAttachmentDescriptors(std::optional< StencilAttachmentDescriptor > front_and_back)
const ColorAttachmentDescriptor * GetColorAttachmentDescriptor(size_t index) const
WindingOrder GetWindingOrder() const
PipelineDescriptor & SetLabel(std::string label)
PipelineDescriptor & SetColorAttachmentDescriptor(size_t index, ColorAttachmentDescriptor desc)
PipelineDescriptor & SetSampleCount(SampleCount samples)
void SetPrimitiveType(PrimitiveType type)
const std::string & GetLabel() const
std::shared_ptr< const ShaderFunction > GetEntrypointForStage(ShaderStage stage) const
const std::map< size_t, ColorAttachmentDescriptor > & GetColorAttachmentDescriptors() const
std::optional< StencilAttachmentDescriptor > GetBackStencilAttachmentDescriptor() const
const std::shared_ptr< VertexDescriptor > & GetVertexDescriptor() const
void ClearDepthAttachment()
std::optional< StencilAttachmentDescriptor > GetFrontStencilAttachmentDescriptor() const
void SetWindingOrder(WindingOrder order)
void ClearColorAttachment(size_t index)
PipelineDescriptor & SetColorAttachmentDescriptors(std::map< size_t, ColorAttachmentDescriptor > descriptors)
bool HasStencilAttachmentDescriptors() const
SampleCount GetSampleCount() const
uint32_t uint32_t * format
Dart_NativeFunction function
PrimitiveType
Decides how backend draws pixels based on input vertices.
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Describe the color attachment that will be used with this pipeline.