| Flutter Impeller |

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_PIPELINE_MTL_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_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 PipelineMTL final
16 : public Pipeline<PipelineDescriptor>,
17 public BackendCast<PipelineMTL, Pipeline<PipelineDescriptor>> {
18 public:
19 // |Pipeline|
20 ~PipelineMTL() override;
21
22 id<MTLRenderPipelineState> GetMTLRenderPipelineState() const;
23
24 id<MTLDepthStencilState> GetMTLDepthStencilState() const;
25
26 private:
27 friend class PipelineLibraryMTL;
28
29 id<MTLRenderPipelineState> pipeline_state_;
30 id<MTLDepthStencilState> depth_stencil_state_;
31 bool is_valid_ = false;
32
33 PipelineMTL(std::weak_ptr<PipelineLibrary> library,
34 const PipelineDescriptor& desc,
35 id<MTLRenderPipelineState> state,
36 id<MTLDepthStencilState> depth_stencil_state);
37
38 // |Pipeline|
39 bool IsValid() const override;
40
41 PipelineMTL(const PipelineMTL&) = delete;
42
43 PipelineMTL& operator=(const PipelineMTL&) = delete;
44 };
45
46 } // namespace impeller
47
48 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_PIPELINE_MTL_H_
impeller::PipelineDescriptor
Definition: pipeline_descriptor.h:24
impeller::Pipeline
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition: compute_pipeline_descriptor.h:18
pipeline.h
impeller::PipelineMTL::GetMTLRenderPipelineState
id< MTLRenderPipelineState > GetMTLRenderPipelineState() const
Definition: pipeline_mtl.mm:28
impeller::PipelineMTL
Definition: pipeline_mtl.h:15
impeller::PipelineMTL::~PipelineMTL
~PipelineMTL() override
impeller::PipelineMTL::GetMTLDepthStencilState
id< MTLDepthStencilState > GetMTLDepthStencilState() const
Definition: pipeline_mtl.mm:32
backend_cast.h
impeller::BackendCast
Definition: backend_cast.h:11
impeller::PipelineLibraryMTL
Definition: pipeline_library_mtl.h:16
impeller
Definition: aiks_blend_unittests.cc:18