Flutter Engine
vulkan_provider.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 "vulkan_provider.h"
6 
7 namespace vulkan {
8 
10  const VkFenceCreateInfo create_info = {
11  .sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
12  .pNext = nullptr,
13  .flags = 0,
14  };
15  VkFence fence;
16  if (VK_CALL_LOG_ERROR(vk().CreateFence(vk_device(), &create_info, nullptr,
17  &fence)) != VK_SUCCESS)
19 
20  return {fence, [this](VkFence fence) {
21  vk().DestroyFence(vk_device(), fence, nullptr);
22  }};
23 }
24 
25 } // namespace vulkan
vulkan::VulkanHandle< VkFence > CreateFence()
virtual const vulkan::VulkanHandle< VkDevice > & vk_device()=0
#define VK_CALL_LOG_ERROR(expression)
virtual const vulkan::VulkanProcTable & vk()=0