Flutter Engine
 
Loading...
Searching...
No Matches
impeller::testing::MockRenderPass Class Reference

#include <mocks.h>

Inheritance diagram for impeller::testing::MockRenderPass:
impeller::RenderPass impeller::ResourceBinder

Public Member Functions

 MockRenderPass (std::shared_ptr< const Context > context, const RenderTarget &target)
 
 MOCK_METHOD (bool, IsValid,(),(const, override))
 
 MOCK_METHOD (bool, OnEncodeCommands,(const Context &context),(const, override))
 
 MOCK_METHOD (void, OnSetLabel,(std::string_view label),(override))
 
- Public Member Functions inherited from impeller::RenderPass
virtual ~RenderPass ()
 
const std::shared_ptr< const Context > & GetContext () const
 
const RenderTargetGetRenderTarget () const
 
ISize GetRenderTargetSize () const
 
const MatrixGetOrthographicTransform () const
 
virtual bool IsValid () const =0
 
void SetLabel (std::string_view label)
 
virtual void SetPipeline (PipelineRef pipeline)
 The pipeline to use for this command.
 
void SetPipeline (const std::shared_ptr< Pipeline< PipelineDescriptor > > &pipeline)
 The pipeline to use for this command.
 
virtual void SetCommandLabel (std::string_view label)
 The debugging label to use for the command.
 
virtual void SetStencilReference (uint32_t value)
 
virtual void SetBaseVertex (uint64_t value)
 
virtual void SetViewport (Viewport viewport)
 
virtual void SetScissor (IRect32 scissor)
 
virtual void SetElementCount (size_t count)
 
virtual void SetInstanceCount (size_t count)
 
virtual bool SetVertexBuffer (VertexBuffer buffer)
 Specify the vertex and index buffer to use for this command.
 
bool SetVertexBuffer (BufferView vertex_buffer)
 Specify a vertex buffer to use for this command.
 
bool SetVertexBuffer (std::vector< BufferView > vertex_buffers)
 Specify a set of vertex buffers to use for this command.
 
virtual bool SetVertexBuffer (BufferView vertex_buffers[], size_t vertex_buffer_count)
 Specify a set of vertex buffers to use for this command.
 
virtual bool SetIndexBuffer (BufferView index_buffer, IndexType index_type)
 Specify an index buffer to use for this command. To unset the index buffer, pass IndexType::kNone to index_type.
 
virtual fml::Status Draw ()
 Record the currently pending command.
 
virtual bool BindResource (ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata *metadata, BufferView view) override
 
virtual bool BindResource (ShaderStage stage, DescriptorType type, const SampledImageSlot &slot, const ShaderMetadata *metadata, std::shared_ptr< const Texture > texture, raw_ptr< const Sampler >) override
 
virtual bool BindDynamicResource (ShaderStage stage, DescriptorType type, const SampledImageSlot &slot, std::unique_ptr< ShaderMetadata > metadata, std::shared_ptr< const Texture > texture, raw_ptr< const Sampler >)
 Bind with dynamically generated shader metadata.
 
virtual bool BindDynamicResource (ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, std::unique_ptr< ShaderMetadata > metadata, BufferView view)
 Bind with dynamically generated shader metadata.
 
bool EncodeCommands () const
 Encode the recorded commands to the underlying command buffer.
 
virtual const std::vector< Command > & GetCommands () const
 Accessor for the current Commands.
 
SampleCount GetSampleCount () const
 The sample count of the attached render target.
 
PixelFormat GetRenderTargetPixelFormat () const
 The pixel format of the attached render target.
 
bool HasDepthAttachment () const
 Whether the render target has a depth attachment.
 
bool HasStencilAttachment () const
 Whether the render target has an stencil attachment.
 
- Public Member Functions inherited from impeller::ResourceBinder
virtual ~ResourceBinder ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from impeller::RenderPass
bool AddCommand (Command &&command)
 Record a command for subsequent encoding to the underlying command buffer. No work is encoded into the command buffer at this time.
 
 RenderPass (std::shared_ptr< const Context > context, const RenderTarget &target)
 
virtual void OnSetLabel (std::string_view label)=0
 
virtual bool OnEncodeCommands (const Context &context) const =0
 
- Static Protected Member Functions inherited from impeller::RenderPass
static bool ValidateVertexBuffers (const BufferView vertex_buffers[], size_t vertex_buffer_count)
 
static bool ValidateIndexBuffer (const BufferView &index_buffer, IndexType index_type)
 
- Protected Attributes inherited from impeller::RenderPass
const std::shared_ptr< const Contextcontext_
 
const SampleCount sample_count_
 
const PixelFormat pixel_format_
 
const bool has_depth_attachment_
 
const bool has_stencil_attachment_
 
const ISize render_target_size_
 
const RenderTarget render_target_
 
std::vector< Commandcommands_
 
std::vector< BufferViewvertex_buffers_
 
std::vector< BufferResourcebound_buffers_
 
std::vector< TextureAndSamplerbound_textures_
 
const Matrix orthographic_
 

Detailed Description

Definition at line 105 of file mocks.h.

Constructor & Destructor Documentation

◆ MockRenderPass()

impeller::testing::MockRenderPass::MockRenderPass ( std::shared_ptr< const Context context,
const RenderTarget target 
)
inline

Definition at line 107 of file mocks.h.

109 : RenderPass(std::move(context), target) {}
RenderPass(std::shared_ptr< const Context > context, const RenderTarget &target)
uint32_t * target

Member Function Documentation

◆ MOCK_METHOD() [1/3]

impeller::testing::MockRenderPass::MOCK_METHOD ( bool  ,
IsValid  ,
()  ,
(const, override)   
)

◆ MOCK_METHOD() [2/3]

impeller::testing::MockRenderPass::MOCK_METHOD ( bool  ,
OnEncodeCommands  ,
(const Context &context)  ,
(const, override)   
)

◆ MOCK_METHOD() [3/3]

impeller::testing::MockRenderPass::MOCK_METHOD ( void  ,
OnSetLabel  ,
(std::string_view label)  ,
(override)   
)

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