 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_RENDERER_RENDER_PASS_H_
6 #define FLUTTER_IMPELLER_RENDERER_RENDER_PASS_H_
10 #include "fml/status.h"
37 const std::shared_ptr<const Context>&
GetContext()
const;
45 virtual bool IsValid()
const = 0;
111 virtual fml::Status
Draw();
124 const std::shared_ptr<const ShaderMetadata>& metadata,
133 std::shared_ptr<const Texture> texture,
134 const std::unique_ptr<const Sampler>& sampler)
override;
194 RenderPass(std::shared_ptr<const Context> context,
197 virtual void OnSetLabel(std::string label) = 0;
211 #endif // FLUTTER_IMPELLER_RENDERER_RENDER_PASS_H_
An object used to specify work to the GPU along with references to resources the GPU will used when d...
const RenderTarget & GetRenderTarget() const
RenderPass(std::shared_ptr< const Context > context, const RenderTarget &target)
virtual bool SetVertexBuffer(VertexBuffer buffer)
Specify the vertex and index buffer to use for this command.
const bool has_depth_attachment_
virtual const std::vector< Command > & GetCommands() const
Accessor for the current Commands.
virtual void SetCommandLabel(std::string_view label)
The debugging label to use for the command.
const Matrix & GetOrthographicTransform() const
const PixelFormat pixel_format_
virtual bool BindResource(ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view) override
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
virtual fml::Status Draw()
Record the currently pending command.
virtual void SetInstanceCount(size_t count)
bool EncodeCommands() const
Encode the recorded commands to the underlying command buffer.
ISize GetRenderTargetSize() const
virtual void SetViewport(Viewport viewport)
An interface for binding resources. This is implemented by |Command| and |ComputeCommand| to make GPU...
virtual bool OnEncodeCommands(const Context &context) const =0
Metadata required to bind a combined texture and sampler.
SampleCount GetSampleCount() const
The sample count of the attached render target.
bool HasDepthAttachment() const
Whether the render target has a depth attachment.
const RenderTarget render_target_
virtual void SetStencilReference(uint32_t value)
virtual void SetScissor(IRect scissor)
std::vector< Command > commands_
const ISize render_target_size_
Render passes encode render commands directed as one specific render target into an underlying comman...
virtual void ReserveCommands(size_t command_count)
Reserve [command_count] commands in the HAL command buffer.
void SetLabel(std::string label)
To do anything rendering related with Impeller, you need a context.
bool HasStencilAttachment() const
Whether the render target has an stencil attachment.
virtual void OnSetLabel(std::string label)=0
const std::shared_ptr< const Context > context_
virtual void SetPipeline(const std::shared_ptr< Pipeline< PipelineDescriptor >> &pipeline)
The pipeline to use for this command.
const bool has_stencil_attachment_
virtual bool IsValid() const =0
const Matrix orthographic_
bool AddCommand(Command &&command)
Record a command for subsequent encoding to the underlying command buffer. No work is encoded into th...
const std::shared_ptr< const Context > & GetContext() const
virtual void SetBaseVertex(uint64_t value)
A 4x4 matrix using column-major storage.
PixelFormat GetRenderTargetPixelFormat() const
The pixel format of the attached render target.
const SampleCount sample_count_