Flutter Engine
The Flutter Engine
vulkan_skia_proc_table.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 "flutter/vulkan/vulkan_skia_proc_table.h"
6
7namespace vulkan {
8
10 if (!vk || !vk->IsValid()) {
11 return nullptr;
12 }
13
14 return [vk](const char* proc_name, VkInstance instance, VkDevice device) {
15 if (device != VK_NULL_HANDLE) {
16 auto result =
17 vk->AcquireProc(proc_name, VulkanHandle<VkDevice>{device, nullptr});
18 if (result != nullptr) {
19 return result;
20 }
21 }
22
23 return vk->AcquireProc(proc_name,
25 };
26}
27
28} // namespace vulkan
skgpu::VulkanGetProc GrVkGetProc
Definition: GrVkTypes.h:61
VkDevice device
Definition: main.cc:53
VkInstance instance
Definition: main.cc:48
GAsyncResult * result
vk
Definition: malisc.py:42
GrVkGetProc CreateSkiaGetProc(const fml::RefPtr< vulkan::VulkanProcTable > &vk)
#define VK_NULL_HANDLE
Definition: vulkan_core.h:46