• 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 
GetRequiredDeviceExtensions() const38 std::vector<std::string> Recipe::GetRequiredDeviceExtensions() const {
39   return impl_ ? impl_->GetRequiredDeviceExtensions()
40                : std::vector<std::string>();
41 }
42 
GetRequiredInstanceExtensions() const43 std::vector<std::string> Recipe::GetRequiredInstanceExtensions() const {
44   return impl_ ? impl_->GetRequiredInstanceExtensions()
45                : std::vector<std::string>();
46 }
47 
SetFenceTimeout(uint32_t timeout_ms)48 void Recipe::SetFenceTimeout(uint32_t timeout_ms) {
49   if (impl_)
50     impl_->SetFenceTimeout(timeout_ms);
51 }
52 
53 }  // namespace amber
54