Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
impeller::testing::CommandBufferMock Class Reference

#include <context_mock.h>

Inheritance diagram for impeller::testing::CommandBufferMock:
impeller::CommandBuffer

Public Member Functions

 CommandBufferMock (std::weak_ptr< const Context > context)
 
 MOCK_METHOD (bool, IsValid,(),(const, override))
 
 MOCK_METHOD (void, SetLabel,(const std::string &label),(const, override))
 
 MOCK_METHOD (std::shared_ptr< RenderPass >, OnCreateRenderPass,(RenderTarget render_target),(override))
 
 MOCK_METHOD (std::shared_ptr< BlitPass >, OnCreateBlitPass,(),(override))
 
 MOCK_METHOD (bool, OnSubmitCommands,(CompletionCallback callback),(override))
 
 MOCK_METHOD (void, OnWaitUntilScheduled,(),(override))
 
 MOCK_METHOD (std::shared_ptr< ComputePass >, OnCreateComputePass,(),(override))
 
- Public Member Functions inherited from impeller::CommandBuffer
virtual ~CommandBuffer ()
 
virtual bool IsValid () const =0
 
virtual void SetLabel (const std::string &label) const =0
 
void WaitUntilScheduled ()
 Force execution of pending GPU commands. More...
 
std::shared_ptr< RenderPassCreateRenderPass (const RenderTarget &render_target)
 Create a render pass to record render commands into. More...
 
std::shared_ptr< BlitPassCreateBlitPass ()
 Create a blit pass to record blit commands into. More...
 
std::shared_ptr< ComputePassCreateComputePass ()
 Create a compute pass to record compute commands into. More...
 

Static Public Member Functions

static std::shared_ptr< RenderPassForwardOnCreateRenderPass (CommandBuffer *command_buffer, const RenderTarget &render_target)
 
static std::shared_ptr< BlitPassForwardOnCreateBlitPass (CommandBuffer *command_buffer)
 
static bool ForwardOnSubmitCommands (CommandBuffer *command_buffer, CompletionCallback callback)
 
static void ForwardOnWaitUntilScheduled (CommandBuffer *command_buffer)
 
static std::shared_ptr< ComputePassForwardOnCreateComputePass (CommandBuffer *command_buffer)
 

Additional Inherited Members

- Public Types inherited from impeller::CommandBuffer
enum class  Status { kPending , kError , kCompleted }
 
using CompletionCallback = std::function< void(Status)>
 
- Protected Member Functions inherited from impeller::CommandBuffer
 CommandBuffer (std::weak_ptr< const Context > context)
 
virtual std::shared_ptr< RenderPassOnCreateRenderPass (RenderTarget render_target)=0
 
virtual std::shared_ptr< BlitPassOnCreateBlitPass ()=0
 
virtual bool OnSubmitCommands (CompletionCallback callback)=0
 
virtual void OnWaitUntilScheduled ()=0
 
virtual std::shared_ptr< ComputePassOnCreateComputePass ()=0
 
- Protected Attributes inherited from impeller::CommandBuffer
std::weak_ptr< const Contextcontext_
 

Detailed Description

Definition at line 21 of file context_mock.h.

Constructor & Destructor Documentation

◆ CommandBufferMock()

impeller::testing::CommandBufferMock::CommandBufferMock ( std::weak_ptr< const Context context)
inlineexplicit

Definition at line 23 of file context_mock.h.

24 : CommandBuffer(std::move(context)) {}
CommandBuffer(std::weak_ptr< const Context > context)

Member Function Documentation

◆ ForwardOnCreateBlitPass()

static std::shared_ptr< BlitPass > impeller::testing::CommandBufferMock::ForwardOnCreateBlitPass ( CommandBuffer command_buffer)
inlinestatic

Definition at line 42 of file context_mock.h.

43 {
44 return command_buffer->OnCreateBlitPass();
45 }

◆ ForwardOnCreateComputePass()

static std::shared_ptr< ComputePass > impeller::testing::CommandBufferMock::ForwardOnCreateComputePass ( CommandBuffer command_buffer)
inlinestatic

Definition at line 65 of file context_mock.h.

66 {
67 return command_buffer->OnCreateComputePass();
68 }

◆ ForwardOnCreateRenderPass()

static std::shared_ptr< RenderPass > impeller::testing::CommandBufferMock::ForwardOnCreateRenderPass ( CommandBuffer command_buffer,
const RenderTarget render_target 
)
inlinestatic

Definition at line 35 of file context_mock.h.

37 {
38 return command_buffer->OnCreateRenderPass(render_target);
39 }

◆ ForwardOnSubmitCommands()

static bool impeller::testing::CommandBufferMock::ForwardOnSubmitCommands ( CommandBuffer command_buffer,
CompletionCallback  callback 
)
inlinestatic

Definition at line 51 of file context_mock.h.

52 {
53 return command_buffer->OnSubmitCommands(std::move(callback));
54 }
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback

◆ ForwardOnWaitUntilScheduled()

static void impeller::testing::CommandBufferMock::ForwardOnWaitUntilScheduled ( CommandBuffer command_buffer)
inlinestatic

Definition at line 57 of file context_mock.h.

57 {
58 return command_buffer->OnWaitUntilScheduled();
59 }

◆ MOCK_METHOD() [1/7]

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

◆ MOCK_METHOD() [2/7]

impeller::testing::CommandBufferMock::MOCK_METHOD ( bool  ,
OnSubmitCommands  ,
(CompletionCallback callback ,
(override)   
)

◆ MOCK_METHOD() [3/7]

impeller::testing::CommandBufferMock::MOCK_METHOD ( std::shared_ptr< BlitPass ,
OnCreateBlitPass  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [4/7]

impeller::testing::CommandBufferMock::MOCK_METHOD ( std::shared_ptr< ComputePass ,
OnCreateComputePass  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [5/7]

impeller::testing::CommandBufferMock::MOCK_METHOD ( std::shared_ptr< RenderPass ,
OnCreateRenderPass  ,
(RenderTarget render_target)  ,
(override)   
)

◆ MOCK_METHOD() [6/7]

impeller::testing::CommandBufferMock::MOCK_METHOD ( void  ,
OnWaitUntilScheduled  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [7/7]

impeller::testing::CommandBufferMock::MOCK_METHOD ( void  ,
SetLabel  ,
(const std::string &label)  ,
(const, override)   
)

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