Qt
6.x
The Qt SDK
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
4
#include "
qsgsoftwareadaptation_p.h
"
5
#include "
qsgsoftwarecontext_p.h
"
6
#include "
qsgsoftwarerenderloop_p.h
"
7
#include "
qsgsoftwarethreadedrenderloop_p.h
"
8
9
#include <private/qguiapplication_p.h>
10
#include <qpa/qplatformintegration.h>
11
12
QT_BEGIN_NAMESPACE
13
14
QSGSoftwareAdaptation::QSGSoftwareAdaptation
(
QObject
*
parent
)
15
:
QSGContextPlugin
(
parent
)
16
{
17
}
18
19
QStringList
QSGSoftwareAdaptation::keys
()
const
20
{
21
return
QStringList
() <<
QLatin1String
(
"software"
) <<
QLatin1String
(
"softwarecontext"
);
22
}
23
24
QSGContext
*
QSGSoftwareAdaptation::create
(
const
QString
&)
const
25
{
26
if
(!instance)
27
instance =
new
QSGSoftwareContext
();
28
return
instance;
29
}
30
31
QSGContextFactoryInterface::Flags
QSGSoftwareAdaptation::flags
(
const
QString
&)
const
32
{
33
// Claim we support adaptable shader effects, then return null for the
34
// shader effect node. The result is shader effects not being rendered,
35
// with the application working fine in all other respects.
36
return
QSGContextFactoryInterface::SupportsShaderEffectNode
;
37
}
38
39
QSGRenderLoop
*
QSGSoftwareAdaptation::createWindowManager
()
40
{
41
#if QT_CONFIG(thread)
42
static
bool
threaded =
false
;
43
static
bool
envChecked =
false
;
44
if
(!envChecked) {
45
envChecked =
true
;
46
threaded =
qgetenv
(
"QSG_RENDER_LOOP"
) ==
"threaded"
;
47
}
48
49
if
(threaded)
50
return
new
QSGSoftwareThreadedRenderLoop
;
51
#endif
52
53
return
new
QSGSoftwareRenderLoop
();
54
}
55
56
QSGSoftwareContext
*QSGSoftwareAdaptation::instance =
nullptr
;
57
58
QT_END_NAMESPACE
QObject
\inmodule QtCore
Definition
qobject.h:90
QSGContextPlugin
Definition
qsgcontextplugin_p.h:50
QSGContext
The QSGContext holds the scene graph entry points for one QML engine.
Definition
qsgcontext_p.h:74
QSGRenderLoop
Definition
qsgrenderloop_p.h:34
QSGSoftwareAdaptation::keys
QStringList keys() const override
Definition
qsgsoftwareadaptation.cpp:19
QSGSoftwareAdaptation::create
QSGContext * create(const QString &key) const override
Definition
qsgsoftwareadaptation.cpp:24
QSGSoftwareAdaptation::flags
QSGContextFactoryInterface::Flags flags(const QString &key) const override
Definition
qsgsoftwareadaptation.cpp:31
QSGSoftwareAdaptation::QSGSoftwareAdaptation
QSGSoftwareAdaptation(QObject *parent=nullptr)
Definition
qsgsoftwareadaptation.cpp:14
QSGSoftwareAdaptation::createWindowManager
QSGRenderLoop * createWindowManager() override
Definition
qsgsoftwareadaptation.cpp:39
QSGSoftwareContext
Definition
qsgsoftwarecontext_p.h:49
QSGSoftwareRenderLoop
Definition
qsgsoftwarerenderloop_p.h:25
QSGSoftwareThreadedRenderLoop
Definition
qsgsoftwarethreadedrenderloop_p.h:26
QStringList
\inmodule QtCore
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:127
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
qsgsoftwareadaptation_p.h
qsgsoftwarecontext_p.h
qsgsoftwarerenderloop_p.h
qsgsoftwarethreadedrenderloop_p.h
QLatin1String
QLatin1StringView QLatin1String
Definition
qstringfwd.h:31
qgetenv
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
QSGContextFactoryInterface::SupportsShaderEffectNode
@ SupportsShaderEffectNode
Definition
qsgcontextplugin_p.h:32
parent
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
Definition
uiaclientinterfaces_p.h:209
qtdeclarative
src
quick
scenegraph
adaptations
software
qsgsoftwareadaptation.cpp
Generated by
1.9.7