| 1 |
/* |
| 2 |
* Copyright 2026 Google LLC |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "include/android/vk/AndroidVulkanMemoryAllocator.h" |
| 9 |
|
| 10 |
#include "include/gpu/vk/VulkanMemoryAllocator.h" |
| 11 |
#include "src/gpu/GpuTypesPriv.h" |
| 12 |
#include "src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorPriv.h" |
| 13 |
|
| 14 |
#include <optional> |
| 15 |
|
| 16 |
namespace SkiaVMA { |
| 17 |
sk_sp<skgpu::VulkanMemoryAllocator> Make(const skgpu::VulkanBackendContext& ctx, Options opts) { |
| 18 |
skgpu::ThreadSafe threadSafe = |
| 19 |
opts.fThreadSafe ? skgpu::ThreadSafe::kYes : skgpu::ThreadSafe::kNo; |
| 20 |
return skgpu::VulkanMemoryAllocators::Make(ctx, threadSafe); |
| 21 |
} |
| 22 |
} |