| Flutter Impeller |

compute_pipeline_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_COMPUTE_PIPELINE_MTL_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMPUTE_PIPELINE_MTL_H_
7
8 #include <Metal/Metal.h>
9
10 #include "impeller/base/backend_cast.h"
11 #include "impeller/renderer/pipeline.h"
12
13 namespace impeller {
14
15 class ComputePipelineMTL final
16 : public Pipeline<ComputePipelineDescriptor>,
17 public BackendCast<ComputePipelineMTL,
18 Pipeline<ComputePipelineDescriptor>> {
19 public:
20 // |Pipeline|
21 ~ComputePipelineMTL() override;
22
23 id<MTLComputePipelineState> GetMTLComputePipelineState() const;
24
25 private:
26 friend class PipelineLibraryMTL;
27
28 id<MTLComputePipelineState> pipeline_state_;
29 bool is_valid_ = false;
30
31 ComputePipelineMTL(std::weak_ptr<PipelineLibrary> library,
32 const ComputePipelineDescriptor& desc,
33 id<MTLComputePipelineState> state);
34
35 // |Pipeline|
36 bool IsValid() const override;
37
38 ComputePipelineMTL(const ComputePipelineMTL&) = delete;
39
40 ComputePipelineMTL& operator=(const ComputePipelineMTL&) = delete;
41 };
42
43 } // namespace impeller
44
45 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMPUTE_PIPELINE_MTL_H_
impeller::Pipeline
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition: compute_pipeline_descriptor.h:18
impeller::ComputePipelineDescriptor
Definition: compute_pipeline_descriptor.h:20
impeller::ComputePipelineMTL
Definition: compute_pipeline_mtl.h:15
pipeline.h
impeller::ComputePipelineMTL::GetMTLComputePipelineState
id< MTLComputePipelineState > GetMTLComputePipelineState() const
Definition: compute_pipeline_mtl.mm:25
backend_cast.h
impeller::ComputePipelineMTL::~ComputePipelineMTL
~ComputePipelineMTL() override
impeller::BackendCast
Definition: backend_cast.h:11
impeller::PipelineLibraryMTL
Definition: pipeline_library_mtl.h:16
impeller
Definition: allocation.cc:12