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