Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
command_queue.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
7
8namespace impeller {
9
11
13
15 const std::vector<std::shared_ptr<CommandBuffer>>& buffers,
16 const CompletionCallback& completion_callback) {
17 if (buffers.empty()) {
18 if (completion_callback) {
19 completion_callback(CommandBuffer::Status::kError);
20 }
22 "No command buffers provided.");
23 }
24 for (const std::shared_ptr<CommandBuffer>& buffer : buffers) {
25 if (!buffer->SubmitCommands(completion_callback)) {
27 "Failed to submit command buffer.");
28 }
29 }
30 return fml::Status();
31}
32
33} // namespace impeller
std::function< void(CommandBuffer::Status)> CompletionCallback
virtual fml::Status Submit(const std::vector< std::shared_ptr< CommandBuffer > > &buffers, const CompletionCallback &completion_callback={})
Submit one or more command buffer objects to be encoded and executed on the GPU.
static const uint8_t buffer[]