| Flutter Impeller |

pipeline_library.cc
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 #include "impeller/renderer/pipeline_library.h"
6
7 namespace impeller {
8
9 PipelineLibrary::PipelineLibrary() = default;
10
11 PipelineLibrary::~PipelineLibrary() = default;
12
13 PipelineFuture<PipelineDescriptor> PipelineLibrary::GetPipeline(
14 std::optional<PipelineDescriptor> descriptor,
15 bool async) {
16 if (descriptor.has_value()) {
17 return GetPipeline(descriptor.value(), async);
18 }
19 auto promise = std::make_shared<
20 std::promise<std::shared_ptr<Pipeline<PipelineDescriptor>>>>();
21 promise->set_value(nullptr);
22 return {descriptor, promise->get_future()};
23 }
24
25 PipelineFuture<ComputePipelineDescriptor> PipelineLibrary::GetPipeline(
26 std::optional<ComputePipelineDescriptor> descriptor,
27 bool async) {
28 if (descriptor.has_value()) {
29 return GetPipeline(descriptor.value(), async);
30 }
31 auto promise = std::make_shared<
32 std::promise<std::shared_ptr<Pipeline<ComputePipelineDescriptor>>>>();
33 promise->set_value(nullptr);
34 return {descriptor, promise->get_future()};
35 }
36
37 } // namespace impeller
impeller::PipelineLibrary::~PipelineLibrary
virtual ~PipelineLibrary()
impeller::PipelineFuture
Definition: pipeline.h:25
impeller::PipelineLibrary::GetPipeline
PipelineFuture< PipelineDescriptor > GetPipeline(std::optional< PipelineDescriptor > descriptor, bool async=true)
Definition: pipeline_library.cc:13
pipeline_library.h
impeller::PipelineLibrary::PipelineLibrary
PipelineLibrary()
impeller
Definition: aiks_blend_unittests.cc:18