 |
Flutter Impeller
|
|
Go to the documentation of this file.
7 #include "flutter/fml/trace_event.h"
15 : context_(
std::move(context)) {}
20 TRACE_EVENT0(
"impeller",
"CommandBuffer::SubmitCommands");
40 std::shared_ptr<RenderPass>
43 TRACE_EVENT0(
"impeller",
"CommandBuffer::SubmitCommandsAsync");
44 if (!render_pass->IsValid() || !
IsValid()) {
47 if (!render_pass->EncodeCommands()) {
57 if (pass && pass->IsValid()) {
58 pass->SetLabel(
"RenderPass");
66 if (pass && pass->IsValid()) {
67 pass->SetLabel(
"BlitPass");
78 if (pass && pass->IsValid()) {
79 pass->SetLabel(
"ComputePass");
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 bool SubmitCommandsAsync(std::shared_ptr< RenderPass > render_pass)
Schedule the command encoded by render passes within this command buffer on the GPU....
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.
virtual bool IsValid() 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.
CommandBuffer(std::weak_ptr< const Context > context)