Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsgsoftwareadaptation.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 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
"qsgsoftwareadaptation_p.h"
6
#
include
"qsgsoftwarecontext_p.h"
7
#
include
"qsgsoftwarerenderloop_p.h"
8
#
include
"qsgsoftwarethreadedrenderloop_p.h"
9
10
#
include
<
private
/
qguiapplication_p
.
h
>
11
#
include
<
qpa
/
qplatformintegration
.
h
>
12
13
QT_BEGIN_NAMESPACE
14
15
QSGSoftwareAdaptation
::
QSGSoftwareAdaptation
(
QObject
*
parent
)
16
:
QSGContextPlugin
(
parent
)
17
{
18
}
19
20
QStringList QSGSoftwareAdaptation::keys()
const
21
{
22
return
QStringList() << QLatin1String(
"software"
) << QLatin1String(
"softwarecontext"
);
23
}
24
25
QSGContext *
QSGSoftwareAdaptation
::
create
(
const
QString &)
const
26
{
27
if
(!instance)
28
instance =
new
QSGSoftwareContext
();
29
return
instance;
30
}
31
32
QSGContextFactoryInterface
::
Flags
QSGSoftwareAdaptation
::
flags
(
const
QString &)
const
33
{
34
// Claim we support adaptable shader effects, then return null for the
35
// shader effect node. The result is shader effects not being rendered,
36
// with the application working fine in all other respects.
37
return
QSGContextFactoryInterface::SupportsShaderEffectNode;
38
}
39
40
QSGRenderLoop *
QSGSoftwareAdaptation
::
createWindowManager
()
41
{
42
#
if
QT_CONFIG
(
thread
)
43
static
bool
threaded =
false
;
44
static
bool
envChecked =
false
;
45
if
(!envChecked) {
46
envChecked =
true
;
47
threaded = qgetenv(
"QSG_RENDER_LOOP"
) ==
"threaded"
;
48
}
49
50
if
(threaded)
51
return
new
QSGSoftwareThreadedRenderLoop;
52
#
endif
53
54
return
new
QSGSoftwareRenderLoop
();
55
}
56
57
QSGSoftwareContext
*
QSGSoftwareAdaptation
::instance =
nullptr
;
58
59
QT_END_NAMESPACE
QObjectData::parent
QObject * parent
Definition
qobject.h:74
QObject
\inmodule QtCore
Definition
qobject.h:106
QSGSoftwareAdaptation
Definition
qsgsoftwareadaptation_p.h:28
QSGSoftwareAdaptation::create
QSGContext * create(const QString &key) const override
Definition
qsgsoftwareadaptation.cpp:25
QSGSoftwareAdaptation::flags
QSGContextFactoryInterface::Flags flags(const QString &key) const override
Definition
qsgsoftwareadaptation.cpp:32
QSGSoftwareAdaptation::createWindowManager
QSGRenderLoop * createWindowManager() override
Definition
qsgsoftwareadaptation.cpp:40
QSGSoftwareContext
Definition
qsgsoftwarecontext_p.h:42
QSGSoftwareRenderLoop
Definition
qsgsoftwarerenderloop_p.h:26
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
qtdeclarative
src
quick
scenegraph
adaptations
software
qsgsoftwareadaptation.cpp
Generated on
for Qt by
1.16.1