• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Amber Authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 
14 #include "amber/recipe.h"
15 
16 namespace amber {
17 
18 RecipeImpl::RecipeImpl() = default;
19 
20 RecipeImpl::~RecipeImpl() = default;
21 
Recipe()22 Recipe::Recipe() : impl_(nullptr) {}
23 
~Recipe()24 Recipe::~Recipe() {
25   delete impl_;
26 }
27 
GetShaderInfo() const28 std::vector<ShaderInfo> Recipe::GetShaderInfo() const {
29   if (!impl_)
30     return {};
31   return impl_->GetShaderInfo();
32 }
33 
GetRequiredFeatures() const34 std::vector<std::string> Recipe::GetRequiredFeatures() const {
35   return impl_ ? impl_->GetRequiredFeatures() : std::vector<std::string>();
36 }
37 
GetRequiredProperties() const38 std::vector<std::string> Recipe::GetRequiredProperties() const {
39   return impl_ ? impl_->GetRequiredProperties() : std::vector<std::string>();
40 }
41 
GetRequiredDeviceExtensions() const42 std::vector<std::string> Recipe::GetRequiredDeviceExtensions() const {
43   return impl_ ? impl_->GetRequiredDeviceExtensions()
44                : std::vector<std::string>();
45 }
46 
GetRequiredInstanceExtensions() const47 std::vector<std::string> Recipe::GetRequiredInstanceExtensions() const {
48   return impl_ ? impl_->GetRequiredInstanceExtensions()
49                : std::vector<std::string>();
50 }
51 
SetFenceTimeout(uint32_t timeout_ms)52 void Recipe::SetFenceTimeout(uint32_t timeout_ms) {
53   if (impl_)
54     impl_->SetFenceTimeout(timeout_ms);
55 }
56 
SetPipelineRuntimeLayerEnabled(bool enabled)57 void Recipe::SetPipelineRuntimeLayerEnabled(bool enabled) {
58   if (impl_)
59     impl_->SetPipelineRuntimeLayerEnabled(enabled);
60 }
61 
62 }  // namespace amber
63