7 #include "flutter/fml/trace_event.h"
15 : context_(
std::move(context)) {}
20 TRACE_EVENT0(
"impeller",
"CommandBuffer::SubmitCommands");
40 const std::shared_ptr<RenderPass>& render_pass) {
41 TRACE_EVENT0(
"impeller",
"CommandBuffer::EncodeAndSubmit");
42 if (!render_pass->IsValid() || !
IsValid()) {
45 if (!render_pass->EncodeCommands()) {
53 const std::shared_ptr<BlitPass>& blit_pass,
54 const std::shared_ptr<Allocator>& allocator) {
55 TRACE_EVENT0(
"impeller",
"CommandBuffer::EncodeAndSubmit");
56 if (!blit_pass->IsValid() || !
IsValid()) {
59 if (!blit_pass->EncodeCommands(allocator)) {
69 if (pass && pass->IsValid()) {
70 pass->SetLabel(
"RenderPass");
78 if (pass && pass->IsValid()) {
79 pass->SetLabel(
"BlitPass");
90 if (pass && pass->IsValid()) {
91 pass->SetLabel(
"ComputePass");