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
qsgtexture_mac.mm
Go to the documentation of this file.
1
// Copyright (C) 2020 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
// Qt-Security score:significant reason:default
4
5
#
include
"qsgtexture_p.h"
6
#
include
"qsgtexture_platform.h"
7
#
include
<
private
/
qquickitem_p
.
h
>
8
#
include
<
private
/
qquickwindow_p
.
h
>
9
#
include
<
QtCore
/
private
/
qnativeinterface_p
.
h
>
10
#
include
<
rhi
/
qrhi
.
h
>
11
12
QT_BEGIN_NAMESPACE
13
14
id<MTLTexture> QSGTexturePlatformMetal::nativeTexture()
const
15
{
16
if
(
auto
*tex = m_texture->rhiTexture())
17
return
(id<MTLTexture>) quintptr(tex->nativeTexture().object);
18
return
0;
19
}
20
21
namespace
QNativeInterface {
22
23
QT_DEFINE_NATIVE_INTERFACE
(
QSGMetalTexture
);
24
25
QSGTexture *QSGMetalTexture::fromNative(id<MTLTexture> texture,
26
QQuickWindow *window,
27
const
QSize &size,
28
QQuickWindow::CreateTextureOptions options)
29
{
30
return
QQuickWindowPrivate::get(window)->createTextureFromNativeTexture(quint64(texture), 0, size, options);
31
}
32
33
}
// QNativeInterface
34
35
QT_END_NAMESPACE
QNativeInterface::QT_DEFINE_NATIVE_INTERFACE
QT_DEFINE_NATIVE_INTERFACE(QSGMetalTexture)
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
quick
scenegraph
coreapi
qsgtexture_mac.mm
Generated on
for Qt by
1.18.0