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
void
setState(
const
QTransform &transform,
float
opacity,
const
QRegion &clipRegion,
78
bool
hasClipRegion);
79
QTransform transform()
const
{
return
m_transform; }
80
QRegion clipRegion()
const
{
return
m_clipRegion; }
81
float
opacity()
const
{
return
m_opacity; }
82
83
void
markGeometryDirty();
84
void
markMaterialDirty();
85
86
void
addDirtyRegion(
const
QRegion &dirtyRegion,
bool
forceDirty =
true
);
87
void
subtractDirtyRegion(
const
QRegion &dirtyRegion);
88
89
void
clearDirty() { m_isDirty =
false
; m_dirtyRegion = QRegion(); }
90
QRegion previousDirtyRegion(
bool
wasRemoved =
false
)
const
;
91
QRegion dirtyRegion()
const
;
92
93
private
:
94
union
RenderableNodeHandle {
95
QSGNode *node;
96
QSGSimpleRectNode *simpleRectNode;
97
QSGSimpleTextureNode *simpleTextureNode;
98
QSGSoftwareInternalImageNode *imageNode;
99
QSGSoftwarePainterNode *painterNode;
100
QSGSoftwareInternalRectangleNode *rectangleNode;
101
QSGSoftwareGlyphNode *glpyhNode;
102
QSGSoftwareNinePatchNode *ninePatchNode;
103
QSGRectangleNode *simpleRectangleNode;
104
QSGImageNode *simpleImageNode;
105
QSGSoftwareSpriteNode *spriteNode;
106
QSGRenderNode *renderNode;
107
};
108
109
const
NodeType m_nodeType;
110
RenderableNodeHandle m_handle;
111
112
bool
m_isOpaque;
113
114
bool
m_isDirty;
115
QRegion m_dirtyRegion;
116
QRegion m_previousDirtyRegion;
117
118
QTransform m_transform;
119
QRegion m_clipRegion;
120
bool
m_hasClipRegion;
121
float
m_opacity;
122
123
QRect m_boundingRectMin;
124
QRect m_boundingRectMax;
125
};
126
127
QT_END_NAMESPACE
128
129
#
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:173
QSGSoftwareRenderableNodeUpdater::~QSGSoftwareRenderableNodeUpdater
virtual ~QSGSoftwareRenderableNodeUpdater()
Definition
qsgsoftwarerenderablenodeupdater.cpp:31
QSGSoftwareRenderableNodeUpdater::visit
bool visit(QSGRenderNode *) override
Definition
qsgsoftwarerenderablenodeupdater.cpp:168
QSGSoftwareRenderableNodeUpdater::visit
bool visit(QSGTransformNode *) override
Definition
qsgsoftwarerenderablenodeupdater.cpp:36
QSGSoftwareRenderableNodeUpdater::updateNodes
void updateNodes(QSGNode *node, bool isNodeRemoved=false)
Definition
qsgsoftwarerenderablenodeupdater.cpp:177
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)
tiledRegion
static QRegion tiledRegion(const QRegion ®ion)
Definition
qsgabstractsoftwarerenderer.cpp:130
qtdeclarative
src
quick
scenegraph
adaptations
software
qsgsoftwarerenderablenode_p.h
Generated on
for Qt by
1.18.0