| 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 #pragma once
6
7 #include <Metal/Metal.h>
8
9 #include "flutter/fml/macros.h"
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 FML_DISALLOW_COPY_AND_ASSIGN(PipelineMTL);
42 };
43
44 } // namespace impeller
impeller::PipelineDescriptor
Definition: pipeline_descriptor.h:30
impeller::Pipeline
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition: compute_pipeline_descriptor.h:27
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:12
impeller::PipelineLibraryMTL
Definition: pipeline_library_mtl.h:16
impeller
Definition: aiks_context.cc:10