| Flutter Impeller |

render_pass_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_RENDER_PASS_MTL_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_RENDER_PASS_MTL_H_
7
8 #include <Metal/Metal.h>
9
10 #include "flutter/fml/macros.h"
11 #include "impeller/renderer/render_pass.h"
12 #include "impeller/renderer/render_target.h"
13
14 namespace impeller {
15
16 class RenderPassMTL final : public RenderPass {
17 public:
18 // |RenderPass|
19 ~RenderPassMTL() override;
20
21 private:
22 friend class CommandBufferMTL;
23
24 id<MTLCommandBuffer> buffer_ = nil;
25 MTLRenderPassDescriptor* desc_ = nil;
26 std::string label_;
27 bool is_valid_ = false;
28
29 RenderPassMTL(std::weak_ptr<const Context> context,
30 const RenderTarget& target,
31 id<MTLCommandBuffer> buffer);
32
33 // |RenderPass|
34 bool IsValid() const override;
35
36 // |RenderPass|
37 void OnSetLabel(std::string label) override;
38
39 // |RenderPass|
40 bool OnEncodeCommands(const Context& context) const override;
41
42 bool EncodeCommands(const std::shared_ptr<Allocator>& transients_allocator,
43 id<MTLRenderCommandEncoder> pass) const;
44
45 RenderPassMTL(const RenderPassMTL&) = delete;
46
47 RenderPassMTL& operator=(const RenderPassMTL&) = delete;
48 };
49
50 } // namespace impeller
51
52 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_RENDER_PASS_MTL_H_
impeller::RenderPass::EncodeCommands
bool EncodeCommands() const
Encode the recorded commands to the underlying command buffer.
Definition: render_pass.cc:93
render_pass.h
impeller::RenderPassMTL::~RenderPassMTL
~RenderPassMTL() override
impeller::CommandBufferMTL
Definition: command_buffer_mtl.h:16
impeller::RenderTarget
Definition: render_target.h:49
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
render_target.h
impeller::RenderPassMTL
Definition: render_pass_mtl.h:16
impeller
Definition: aiks_context.cc:10