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