Flutter Engine
The Flutter Engine
pipeline_mtl.mm
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
6
7namespace impeller {
8
9PipelineMTL::PipelineMTL(std::weak_ptr<PipelineLibrary> library,
10 const PipelineDescriptor& desc,
11 id<MTLRenderPipelineState> state,
12 id<MTLDepthStencilState> depth_stencil_state)
13 : Pipeline(std::move(library), desc),
14 pipeline_state_(state),
15 depth_stencil_state_(depth_stencil_state) {
16 if (!pipeline_state_) {
17 return;
18 }
19 is_valid_ = true;
20}
21
22PipelineMTL::~PipelineMTL() = default;
23
24bool PipelineMTL::IsValid() const {
25 return is_valid_;
26}
27
28id<MTLRenderPipelineState> PipelineMTL::GetMTLRenderPipelineState() const {
29 return pipeline_state_;
30}
31
32id<MTLDepthStencilState> PipelineMTL::GetMTLDepthStencilState() const {
33 return depth_stencil_state_;
34}
35
36} // namespace impeller
AtkStateType state
Definition: ref_ptr.h:256