Flutter Engine
The Flutter Engine
command_buffer_mtl.h
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
5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMMAND_BUFFER_MTL_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMMAND_BUFFER_MTL_H_
7
8#include <Metal/Metal.h>
9
12
13namespace impeller {
14
15class CommandBufferMTL final : public CommandBuffer {
16 public:
17 // |CommandBuffer|
19
20 private:
21 friend class ContextMTL;
22
23 id<MTLCommandBuffer> buffer_ = nullptr;
24
25 CommandBufferMTL(const std::weak_ptr<const Context>& context,
26 id<MTLCommandQueue> queue);
27
28 // |CommandBuffer|
29 void SetLabel(const std::string& label) const override;
30
31 // |CommandBuffer|
32 bool IsValid() const override;
33
34 // |CommandBuffer|
35 bool OnSubmitCommands(CompletionCallback callback) override;
36
37 // |CommandBuffer|
38 void OnWaitUntilScheduled() override;
39
40 // |CommandBuffer|
41 std::shared_ptr<RenderPass> OnCreateRenderPass(RenderTarget target) override;
42
43 // |CommandBuffer|
44 std::shared_ptr<BlitPass> OnCreateBlitPass() override;
45
46 // |CommandBuffer|
47 std::shared_ptr<ComputePass> OnCreateComputePass() override;
48
49 CommandBufferMTL(const CommandBufferMTL&) = delete;
50
51 CommandBufferMTL& operator=(const CommandBufferMTL&) = delete;
52};
53
54} // namespace impeller
55
56#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMMAND_BUFFER_MTL_H_
A collection of encoded commands to be submitted to the GPU for execution. A command buffer is obtain...
std::function< void(Status)> CompletionCallback
VkQueue queue
Definition: main.cc:55
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
uint32_t * target