13CommandBufferGLES::CommandBufferGLES(std::weak_ptr<const Context> context,
14 std::shared_ptr<ReactorGLES> reactor)
15 : CommandBuffer(
std::move(context)),
16 reactor_(
std::move(reactor)),
17 is_valid_(reactor_ && reactor_->IsValid()) {}
19CommandBufferGLES::~CommandBufferGLES() =
default;
22void CommandBufferGLES::SetLabel(std::string_view label)
const {
27bool CommandBufferGLES::IsValid()
const {
32bool CommandBufferGLES::OnSubmitCommands(
bool block_on_schedule,
34 const auto result = reactor_->React();
36 callback(result ? CommandBuffer::Status::kCompleted
37 : CommandBuffer::Status::kError);
43void CommandBufferGLES::OnWaitUntilCompleted() {
44 reactor_->GetProcTable().Finish();
48void CommandBufferGLES::OnWaitUntilScheduled() {
49 reactor_->GetProcTable().Flush();
53std::shared_ptr<RenderPass> CommandBufferGLES::OnCreateRenderPass(
58 auto context = context_.lock();
62 auto pass = std::shared_ptr<RenderPassGLES>(
63 new RenderPassGLES(context,
target, reactor_));
64 if (!pass->IsValid()) {
71std::shared_ptr<BlitPass> CommandBufferGLES::OnCreateBlitPass() {
75 auto pass = std::shared_ptr<BlitPassGLES>(
new BlitPassGLES(reactor_));
76 if (!pass->IsValid()) {
83std::shared_ptr<ComputePass> CommandBufferGLES::OnCreateComputePass() {
FlutterDesktopBinaryReply callback