Flutter Engine
The Flutter Engine
command_buffer_vk.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_VULKAN_COMMAND_BUFFER_VK_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMMAND_BUFFER_VK_H_
7
11
12namespace impeller {
13
14class ContextVK;
15class CommandEncoderFactoryVK;
16class CommandEncoderVK;
17
18class CommandBufferVK final
19 : public CommandBuffer,
20 public BackendCast<CommandBufferVK, CommandBuffer>,
21 public std::enable_shared_from_this<CommandBufferVK> {
22 public:
23 // |CommandBuffer|
24 ~CommandBufferVK() override;
25
26 const std::shared_ptr<CommandEncoderVK>& GetEncoder();
27
28 private:
29 friend class ContextVK;
30
31 std::shared_ptr<CommandEncoderVK> encoder_;
32 std::shared_ptr<CommandEncoderFactoryVK> encoder_factory_;
33
34 CommandBufferVK(std::weak_ptr<const Context> context,
35 std::shared_ptr<CommandEncoderFactoryVK> encoder_factory);
36
37 // |CommandBuffer|
38 void SetLabel(const std::string& label) const override;
39
40 // |CommandBuffer|
41 bool IsValid() const override;
42
43 // |CommandBuffer|
44 bool OnSubmitCommands(CompletionCallback callback) override;
45
46 // |CommandBuffer|
47 void OnWaitUntilScheduled() override;
48
49 // |CommandBuffer|
50 std::shared_ptr<RenderPass> OnCreateRenderPass(RenderTarget target) override;
51
52 // |CommandBuffer|
53 std::shared_ptr<BlitPass> OnCreateBlitPass() override;
54
55 // |CommandBuffer|
56 std::shared_ptr<ComputePass> OnCreateComputePass() override;
57
58 CommandBufferVK(const CommandBufferVK&) = delete;
59
60 CommandBufferVK& operator=(const CommandBufferVK&) = delete;
61};
62
63} // namespace impeller
64
65#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMMAND_BUFFER_VK_H_
const std::shared_ptr< CommandEncoderVK > & GetEncoder()
A collection of encoded commands to be submitted to the GPU for execution. A command buffer is obtain...
std::function< void(Status)> CompletionCallback
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
uint32_t * target