Flutter Engine
The Flutter Engine
GrVkDirectContext.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 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#ifndef GrVkDirectContext_DEFINED
9#define GrVkDirectContext_DEFINED
10
13
14class GrDirectContext;
15struct GrContextOptions;
16namespace skgpu {
17struct VulkanBackendContext;
18}
19
20namespace GrDirectContexts {
21/**
22 * The Vulkan context (VkQueue, VkDevice, VkInstance) must be kept alive until the returned
23 * GrDirectContext is destroyed. This also means that any objects created with this
24 * GrDirectContext (e.g. SkSurfaces, SkImages, etc.) must also be released as they may hold
25 * refs on the GrDirectContext. Once all these objects and the GrDirectContext are released,
26 * then it is safe to delete the vulkan objects.
27 */
29 const GrContextOptions&);
31}
32
33#endif
#define SK_API
Definition: SkAPI.h:35
SK_API sk_sp< GrDirectContext > MakeVulkan(const skgpu::VulkanBackendContext &, const GrContextOptions &)
Definition: GpuTools.h:21