Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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 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 label)
 
virtual void ReserveCommands (size_t command_count)
 Reserve [command_count] commands in the HAL command buffer.
 
virtual 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 (IRect scissor)
 
virtual void SetInstanceCount (size_t count)
 
virtual bool SetVertexBuffer (VertexBuffer buffer)
 Specify the vertex and index buffer to use for this command.
 
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 ShaderUniformSlot &slot, const std::shared_ptr< const ShaderMetadata > &metadata, BufferView view)
 
virtual bool BindResource (ShaderStage stage, DescriptorType type, const SampledImageSlot &slot, const ShaderMetadata &metadata, std::shared_ptr< const Texture > texture, const std::unique_ptr< const Sampler > &sampler) override
 
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 label)=0
 
virtual bool OnEncodeCommands (const Context &context) const =0
 
- 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_
 
const Matrix orthographic_
 

Detailed Description

Definition at line 94 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 96 of file mocks.h.

98 : 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 label)  ,
(override)   
)

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