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
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
QObjectData::parent
QObject * parent
Definition
qobject.h:73
QObject
\inmodule QtCore
Definition
qobject.h:103
QSGSoftwareAdaptation
Definition
qsgsoftwareadaptation_p.h:27
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::createWindowManager
QSGRenderLoop * createWindowManager() override
Definition
qsgsoftwareadaptation.cpp:39
QSGSoftwareContext
Definition
qsgsoftwarecontext_p.h:41
QSGSoftwareRenderLoop
Definition
qsgsoftwarerenderloop_p.h:25
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
qtdeclarative
src
quick
scenegraph
adaptations
software
qsgsoftwareadaptation.cpp
Generated on Thu Nov 14 2024 00:49:18 for Qt by
1.12.0