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