| Flutter Impeller |

pipeline_library_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/renderer/pipeline_library.h"
11
12 namespace impeller {
13
14 class ContextMTL;
15
16 class PipelineLibraryMTL final : public PipelineLibrary {
17 public:
18 PipelineLibraryMTL();
19
20 // |PipelineLibrary|
21 ~PipelineLibraryMTL() override;
22
23 private:
24 friend ContextMTL;
25
26 id<MTLDevice> device_ = nullptr;
27 PipelineMap pipelines_;
28 ComputePipelineMap compute_pipelines_;
29
30 PipelineLibraryMTL(id<MTLDevice> device);
31
32 // |PipelineLibrary|
33 bool IsValid() const override;
34
35 // |PipelineLibrary|
36 PipelineFuture<PipelineDescriptor> GetPipeline(
37 PipelineDescriptor descriptor) override;
38
39 // |PipelineLibrary|
40 PipelineFuture<ComputePipelineDescriptor> GetPipeline(
41 ComputePipelineDescriptor descriptor) override;
42
43 // |PipelineLibrary|
44 void RemovePipelinesWithEntryPoint(
45 std::shared_ptr<const ShaderFunction> function) override;
46
47 FML_DISALLOW_COPY_AND_ASSIGN(PipelineLibraryMTL);
48 };
49
50 } // namespace impeller
impeller::PipelineDescriptor
Definition: pipeline_descriptor.h:30
impeller::ComputePipelineDescriptor
Definition: compute_pipeline_descriptor.h:29
impeller::PipelineFuture
Definition: pipeline.h:24
impeller::PipelineLibrary
Definition: pipeline_library.h:29
impeller::PipelineMap
std::unordered_map< PipelineDescriptor, PipelineFuture< PipelineDescriptor >, ComparableHash< PipelineDescriptor >, ComparableEqual< PipelineDescriptor > > PipelineMap
Definition: pipeline_library.h:21
pipeline_library.h
impeller::PipelineLibraryMTL::PipelineLibraryMTL
PipelineLibraryMTL()
impeller::ComputePipelineMap
std::unordered_map< ComputePipelineDescriptor, PipelineFuture< ComputePipelineDescriptor >, ComparableHash< ComputePipelineDescriptor >, ComparableEqual< ComputePipelineDescriptor > > ComputePipelineMap
Definition: pipeline_library.h:27
impeller::PipelineLibraryMTL::~PipelineLibraryMTL
~PipelineLibraryMTL() override
impeller::PipelineLibraryMTL
Definition: pipeline_library_mtl.h:16
impeller::ContextMTL
Definition: context_mtl.h:32
impeller
Definition: aiks_context.cc:10