Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qohosvulkansurface.h
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
ifndef
QOHOSVULKANSURFACE_H
5
#
define
QOHOSVULKANSURFACE_H
6
7
#
include
<
QtCore
/
qglobal
.
h
>
8
#
include
<
native_window
/
external_window
.
h
>
9
#
include
<
vulkan
/
vulkan
.
h
>
10
#
include
<
vulkan
/
vulkan_ohos
.
h
>
11
#
include
<
optional
>
12
13
QT_BEGIN_NAMESPACE
14
15
class
QOhosVulkanSurface
16
{
17
Q_DISABLE_COPY_MOVE(QOhosVulkanSurface)
18
public
:
19
QOhosVulkanSurface() =
default
;
20
21
void
setNativeWindowSurface(::OHNativeWindow *nativeWindow);
22
VkSurfaceKHR *tryGetOrCreateVulkanWindowSurface(VkInstance instance,
23
PFN_vkCreateSurfaceOHOS createFn,
24
PFN_vkDestroySurfaceKHR destroyFn);
25
26
private
:
27
struct
VulkanSurface {
28
Q_DISABLE_COPY_MOVE(VulkanSurface)
29
VkInstance instance;
30
VkSurfaceKHR surface;
31
PFN_vkDestroySurfaceKHR destroyFunc;
32
VulkanSurface(VkInstance inst, VkSurfaceKHR surf, PFN_vkDestroySurfaceKHR fn)
33
: instance(inst), surface(surf), destroyFunc(fn)
34
{
35
}
36
~VulkanSurface() {
37
if
(destroyFunc)
38
destroyFunc(instance, surface,
nullptr
);
39
}
40
};
41
42
::OHNativeWindow *m_nativeWindow =
nullptr
;
43
::OHNativeWindow *m_surfaceNativeWindow =
nullptr
;
44
std::optional<VulkanSurface> m_vulkanSurface = std::nullopt;
45
};
46
47
QT_END_NAMESPACE
48
49
#
endif
// QOHOSVULKANSURFACE_H
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
plugins
platforms
ohos
render
qohosvulkansurface.h
Generated on
for Qt by
1.18.0