 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_RENDERER_COMMAND_BUFFER_H_
6 #define FLUTTER_IMPELLER_RENDERER_COMMAND_BUFFER_H_
11 #include "flutter/fml/macros.h"
23 class CommandBufferMock;
59 virtual bool IsValid()
const = 0;
61 virtual void SetLabel(
const std::string& label)
const = 0;
85 const std::shared_ptr<RenderPass>& render_pass);
96 const std::shared_ptr<BlitPass>& blit_pass,
97 const std::shared_ptr<Allocator>& allocator);
132 explicit CommandBuffer(std::weak_ptr<const Context> context);
153 #endif // FLUTTER_IMPELLER_RENDERER_COMMAND_BUFFER_H_
virtual bool OnSubmitCommands(CompletionCallback callback)=0
std::shared_ptr< RenderPass > CreateRenderPass(const RenderTarget &render_target)
Create a render pass to record render commands into.
virtual std::shared_ptr< RenderPass > OnCreateRenderPass(RenderTarget render_target)=0
virtual std::shared_ptr< ComputePass > OnCreateComputePass()=0
std::function< void(Status)> CompletionCallback
std::shared_ptr< ComputePass > CreateComputePass()
Create a compute pass to record compute commands into.
void WaitUntilScheduled()
Force execution of pending GPU commands.
std::weak_ptr< const Context > context_
virtual bool IsValid() const =0
virtual void SetLabel(const std::string &label) const =0
virtual std::shared_ptr< BlitPass > OnCreateBlitPass()=0
virtual void OnWaitUntilScheduled()=0
std::shared_ptr< BlitPass > CreateBlitPass()
Create a blit pass to record blit commands into.
friend class testing::CommandBufferMock
virtual bool EncodeAndSubmit(const std::shared_ptr< RenderPass > &render_pass)
Schedule the command encoded by render passes within this command buffer on the GPU....
CommandBuffer(std::weak_ptr< const Context > context)
A collection of encoded commands to be submitted to the GPU for execution. A command buffer is obtain...