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
qsgsoftwarerenderablenode_p.h
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
#
ifndef
QSGSOFTWARERENDERABLENODE_H
6
#
define
QSGSOFTWARERENDERABLENODE_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtQuick
/
private
/
qtquickglobal_p
.
h
>
20
21
#
include
<
QtGui
/
QRegion
>
22
#
include
<
QtCore
/
QRect
>
23
#
include
<
QtGui
/
QTransform
>
24
#
include
<
QtQuick
/
qsgrectanglenode
.
h
>
25
#
include
<
QtQuick
/
qsgimagenode
.
h
>
26
#
include
<
QtQuick
/
qsgninepatchnode
.
h
>
27
28
QT_BEGIN_NAMESPACE
29
30
class
QSGSimpleRectNode;
31
class
QSGSimpleTextureNode;
32
class
QSGSoftwareInternalImageNode;
33
class
QSGSoftwarePainterNode;
34
class
QSGSoftwareInternalRectangleNode
;
35
class
QSGSoftwareGlyphNode;
36
class
QSGSoftwareNinePatchNode;
37
class
QSGSoftwareSpriteNode
;
38
class
QSGRenderNode;
39
40
class
Q_QUICK_EXPORT
QSGSoftwareRenderableNode
41
{
42
public
:
43
enum
NodeType {
44
Invalid = -1,
45
SimpleRect,
46
SimpleTexture,
47
Image,
48
Painter,
49
Rectangle,
50
Glyph,
51
NinePatch,
52
SimpleRectangle,
53
SimpleImage,
54
#
if
QT_CONFIG
(
quick_sprite
)
55
SpriteNode,
56
#
endif
57
RenderNode
58
};
59
60
QSGSoftwareRenderableNode(NodeType type, QSGNode *node);
61
~QSGSoftwareRenderableNode();
62
63
void
update();
64
65
QRegion renderNode(QPainter *painter,
bool
forceOpaquePainting =
false
);
66
QRect boundingRectMin()
const
{
return
m_boundingRectMin; }
67
QRect boundingRectMax()
const
{
return
m_boundingRectMax; }
68
NodeType type()
const
{
return
m_nodeType; }
69
bool
isOpaque()
const
{
return
m_isOpaque; }
70
bool
isDirty()
const
{
return
m_isDirty; }
71
bool
isDirtyRegionEmpty()
const
;
72
QSGNode *handle()
const
{
return
m_handle.node; }
73
74
void
setTransform(
const
QTransform &transform);
75
void
setClipRegion(
const
QRegion &clipRegion,
bool
hasClipRegion =
true
);
76
void
setOpacity(
float
opacity);
77
QTransform transform()
const
{
return
m_transform; }
78
QRegion clipRegion()
const
{
return
m_clipRegion; }
79
float
opacity()
const
{
return
m_opacity; }
80
81
void
markGeometryDirty();
82
void
markMaterialDirty();
83
84
void
addDirtyRegion(
const
QRegion &dirtyRegion,
bool
forceDirty =
true
);
85
void
subtractDirtyRegion(
const
QRegion &dirtyRegion);
86
87
QRegion previousDirtyRegion(
bool
wasRemoved =
false
)
const
;
88
QRegion dirtyRegion()
const
;
89
90
private
:
91
union
RenderableNodeHandle {
92
QSGNode *node;
93
QSGSimpleRectNode *simpleRectNode;
94
QSGSimpleTextureNode *simpleTextureNode;
95
QSGSoftwareInternalImageNode *imageNode;
96
QSGSoftwarePainterNode *painterNode;
97
QSGSoftwareInternalRectangleNode *rectangleNode;
98
QSGSoftwareGlyphNode *glpyhNode;
99
QSGSoftwareNinePatchNode *ninePatchNode;
100
QSGRectangleNode *simpleRectangleNode;
101
QSGImageNode *simpleImageNode;
102
QSGSoftwareSpriteNode *spriteNode;
103
QSGRenderNode *renderNode;
104
};
105
106
const
NodeType m_nodeType;
107
RenderableNodeHandle m_handle;
108
109
bool
m_isOpaque;
110
111
bool
m_isDirty;
112
QRegion m_dirtyRegion;
113
QRegion m_previousDirtyRegion;
114
115
QTransform m_transform;
116
QRegion m_clipRegion;
117
bool
m_hasClipRegion;
118
float
m_opacity;
119
120
QRect m_boundingRectMin;
121
QRect m_boundingRectMax;
122
};
123
124
QT_END_NAMESPACE
125
126
#
endif
// QSGSOFTWARERENDERABLENODE_H
QSGAbstractSoftwareRenderer
Definition
qsgabstractsoftwarerenderer_p.h:31
QSGSoftwareInternalRectangleNode
Definition
qsgsoftwareinternalrectanglenode_p.h:28
QSGSoftwareRenderableNodeUpdater
Definition
qsgsoftwarerenderablenodeupdater_p.h:31
QSGSoftwareRenderableNodeUpdater::QSGSoftwareRenderableNodeUpdater
QSGSoftwareRenderableNodeUpdater(QSGAbstractSoftwareRenderer *renderer)
Definition
qsgsoftwarerenderablenodeupdater.cpp:21
QSGSoftwareRenderableNodeUpdater::endVisit
void endVisit(QSGTransformNode *) override
Definition
qsgsoftwarerenderablenodeupdater.cpp:46
QSGSoftwareRenderableNodeUpdater::endVisit
void endVisit(QSGRenderNode *) override
Definition
qsgsoftwarerenderablenodeupdater.cpp:170
QSGSoftwareRenderableNodeUpdater::~QSGSoftwareRenderableNodeUpdater
virtual ~QSGSoftwareRenderableNodeUpdater()
Definition
qsgsoftwarerenderablenodeupdater.cpp:31
QSGSoftwareRenderableNodeUpdater::visit
bool visit(QSGRenderNode *) override
Definition
qsgsoftwarerenderablenodeupdater.cpp:165
QSGSoftwareRenderableNodeUpdater::visit
bool visit(QSGTransformNode *) override
Definition
qsgsoftwarerenderablenodeupdater.cpp:36
QSGSoftwareRenderableNodeUpdater::updateNodes
void updateNodes(QSGNode *node, bool isNodeRemoved=false)
Definition
qsgsoftwarerenderablenodeupdater.cpp:174
QSGSoftwareRenderableNode
Definition
qsgsoftwarerenderablenode_p.h:41
QSGSoftwareSpriteNode
Definition
qsgsoftwarespritenode_p.h:29
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
Q_STATIC_LOGGING_CATEGORY
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)
qtdeclarative
src
quick
scenegraph
adaptations
software
qsgsoftwarerenderablenode_p.h
Generated on
for Qt by
1.18.0