| 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 "flutter/fml/macros.h"
11 #include "impeller/base/backend_cast.h"
12 #include "impeller/renderer/pipeline.h"
13
14 namespace impeller {
15
16 class PipelineMTL final
17 : public Pipeline<PipelineDescriptor>,
18 public BackendCast<PipelineMTL, Pipeline<PipelineDescriptor>> {
19 public:
20 // |Pipeline|
21 ~PipelineMTL() override;
22
23 id<MTLRenderPipelineState> GetMTLRenderPipelineState() const;
24
25 id<MTLDepthStencilState> GetMTLDepthStencilState() const;
26
27 private:
28 friend class PipelineLibraryMTL;
29
30 id<MTLRenderPipelineState> pipeline_state_;
31 id<MTLDepthStencilState> depth_stencil_state_;
32 bool is_valid_ = false;
33
34 PipelineMTL(std::weak_ptr<PipelineLibrary> library,
35 const PipelineDescriptor& desc,
36 id<MTLRenderPipelineState> state,
37 id<MTLDepthStencilState> depth_stencil_state);
38
39 // |Pipeline|
40 bool IsValid() const override;
41
42 PipelineMTL(const PipelineMTL&) = delete;
43
44 PipelineMTL& operator=(const PipelineMTL&) = delete;
45 };
46
47 } // namespace impeller
48
49 #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:28
pipeline.h
impeller::PipelineMTL::GetMTLRenderPipelineState
id< MTLRenderPipelineState > GetMTLRenderPipelineState() const
Definition: pipeline_mtl.mm:28
impeller::PipelineMTL
Definition: pipeline_mtl.h:16
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:17
impeller
Definition: aiks_blur_unittests.cc:20