Flutter Engine
The Flutter Engine
compute_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
9ComputePipelineMTL::ComputePipelineMTL(std::weak_ptr<PipelineLibrary> library,
10 const ComputePipelineDescriptor& desc,
11 id<MTLComputePipelineState> state)
12 : Pipeline(std::move(library), desc), pipeline_state_(state) {
13 if (!pipeline_state_) {
14 return;
15 }
16 is_valid_ = true;
17}
18
19ComputePipelineMTL::~ComputePipelineMTL() = default;
20
21bool ComputePipelineMTL::IsValid() const {
22 return is_valid_;
23}
24
25id<MTLComputePipelineState> ComputePipelineMTL::GetMTLComputePipelineState()
26 const {
27 return pipeline_state_;
28}
29
30} // namespace impeller
AtkStateType state
Definition: ref_ptr.h:256