| Flutter Impeller |

render_pass_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_RENDER_PASS_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_RENDER_PASS_VK_H_
7
8 #include "flutter/fml/macros.h"
9 #include "impeller/renderer/backend/vulkan/context_vk.h"
10 #include "impeller/renderer/backend/vulkan/pass_bindings_cache.h"
11 #include "impeller/renderer/backend/vulkan/shared_object_vk.h"
12 #include "impeller/renderer/render_pass.h"
13 #include "impeller/renderer/render_target.h"
14
15 namespace impeller {
16
17 class CommandBufferVK;
18
19 class RenderPassVK final : public RenderPass {
20 public:
21 // |RenderPass|
22 ~RenderPassVK() override;
23
24 private:
25 friend class CommandBufferVK;
26
27 std::weak_ptr<CommandBufferVK> command_buffer_;
28 std::string debug_label_;
29 bool is_valid_ = false;
30 mutable PassBindingsCache pass_bindings_cache_;
31
32 RenderPassVK(const std::shared_ptr<const Context>& context,
33 const RenderTarget& target,
34 std::weak_ptr<CommandBufferVK> command_buffer);
35
36 // |RenderPass|
37 bool IsValid() const override;
38
39 // |RenderPass|
40 void OnSetLabel(std::string label) override;
41
42 // |RenderPass|
43 bool OnEncodeCommands(const Context& context) const override;
44
45 SharedHandleVK<vk::RenderPass> CreateVKRenderPass(
46 const ContextVK& context,
47 const std::shared_ptr<CommandBufferVK>& command_buffer,
48 bool has_subpass_dependency) const;
49
50 SharedHandleVK<vk::Framebuffer> CreateVKFramebuffer(
51 const ContextVK& context,
52 const vk::RenderPass& pass) const;
53
54 RenderPassVK(const RenderPassVK&) = delete;
55
56 RenderPassVK& operator=(const RenderPassVK&) = delete;
57 };
58
59 } // namespace impeller
60
61 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_RENDER_PASS_VK_H_
shared_object_vk.h
render_pass.h
pass_bindings_cache.h
impeller::PassBindingsCache
Ensures that bindings on the pass are not redundantly set or updated. Avoids making the driver do add...
Definition: render_pass_mtl.mm:195
impeller::RenderTarget
Definition: render_target.h:49
impeller::CommandBufferVK
Definition: command_buffer_vk.h:19
impeller::ContextVK
Definition: context_vk.h:40
impeller::RenderPass
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:29
impeller::Context
To do anything rendering related with Impeller, you need a context.
Definition: context.h:47
impeller::RenderPassVK
Definition: render_pass_vk.h:19
impeller::SharedHandleVK
std::shared_ptr< SharedObjectVKT< T > > SharedHandleVK
Definition: shared_object_vk.h:52
impeller::RenderPassVK::~RenderPassVK
~RenderPassVK() override
render_target.h
context_vk.h
impeller
Definition: aiks_context.cc:10