OpenCoverage

qsgnodeupdater.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/coreapi/qsgnodeupdater.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6QSGNodeUpdater::QSGNodeUpdater()-
7 : m_combined_matrix_stack(64)-
8 , m_opacity_stack(64)-
9 , m_current_clip(nullptr)-
10 , m_force_update(0)-
11{-
12 m_opacity_stack.add(1);-
13}
executed 3593 times by 77 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
3593
14-
15QSGNodeUpdater::~QSGNodeUpdater()-
16{-
17}-
18-
19void QSGNodeUpdater::updateStates(QSGNode *n)-
20{-
21 m_current_clip = nullptr;-
22 m_force_update = 0;-
23-
24 ((m_opacity_stack.size() == 1) ? static_cast<void>(0) : qt_assert("m_opacity_stack.size() == 1", __FILE__, 66));-
25 ((m_combined_matrix_stack.isEmpty()) ? static_cast<void>(0) : qt_assert("m_combined_matrix_stack.isEmpty()", __FILE__, 67));-
26-
27 visitNode(n);-
28}
executed 24 times by 1 test: end of block
Executed by:
  • tst_qquickshape
24
29bool QSGNodeUpdater::isNodeBlocked(QSGNode *node, QSGNode *root) const-
30{-
31 while (node != root
node != rootDescription
TRUEevaluated 7646172 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEevaluated 920412 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
&& node != nullptr
node != nullptrDescription
TRUEevaluated 7646172 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
) {
0-7646172
32 if (node->isSubtreeBlocked()
node->isSubtreeBlocked()Description
TRUEevaluated 87965 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_nodestest
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitemlayer
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktaphandler
  • tst_qquickvisualdatamodel
FALSEevaluated 7558207 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
)
87965-7558207
33 return
executed 87965 times by 12 tests: return true;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_nodestest
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitemlayer
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktaphandler
  • tst_qquickvisualdatamodel
true;
executed 87965 times by 12 tests: return true;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_nodestest
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitemlayer
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktaphandler
  • tst_qquickvisualdatamodel
87965
34 node = node->parent();-
35 }
executed 7558207 times by 76 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
7558207
36 return
executed 920412 times by 76 tests: return false;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
false;
executed 920412 times by 76 tests: return false;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
920412
37}-
38-
39-
40void QSGNodeUpdater::enterTransformNode(QSGTransformNode *t)-
41{-
42-
43-
44-
45-
46 if (!t->matrix().isIdentity()
!t->matrix().isIdentity()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
47 if (!m_combined_matrix_stack.isEmpty()
!m_combined_ma...tack.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
48 t->setCombinedMatrix(*m_combined_matrix_stack.last() * t->matrix());-
49 }
never executed: end of block
else {
0
50 t->setCombinedMatrix(t->matrix());-
51 }
never executed: end of block
0
52 m_combined_matrix_stack.add(&t->combinedMatrix());-
53 }
never executed: end of block
else {
0
54 if (!m_combined_matrix_stack.isEmpty()
!m_combined_ma...tack.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
55 t->setCombinedMatrix(*m_combined_matrix_stack.last());-
56 }
never executed: end of block
else {
0
57 t->setCombinedMatrix(QMatrix4x4());-
58 }
never executed: end of block
0
59 }-
60}-
61-
62-
63void QSGNodeUpdater::leaveTransformNode(QSGTransformNode *t)-
64{-
65-
66-
67-
68-
69 if (!t->matrix().isIdentity()
!t->matrix().isIdentity()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
70 m_combined_matrix_stack.pop_back();-
71 }
never executed: end of block
0
72-
73}
never executed: end of block
0
74-
75-
76void QSGNodeUpdater::enterClipNode(QSGClipNode *c)-
77{-
78-
79-
80-
81-
82 c->m_matrix = m_combined_matrix_stack.isEmpty()
m_combined_mat...tack.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
? 0 : m_combined_matrix_stack.last();
0
83 c->m_clip_list = m_current_clip;-
84 m_current_clip = c;-
85}
never executed: end of block
0
86-
87-
88void QSGNodeUpdater::leaveClipNode(QSGClipNode *c)-
89{-
90-
91-
92-
93-
94 m_current_clip = c->m_clip_list;-
95}
never executed: end of block
0
96-
97-
98void QSGNodeUpdater::enterGeometryNode(QSGGeometryNode *g)-
99{-
100-
101-
102-
103-
104 g->m_matrix = m_combined_matrix_stack.isEmpty()
m_combined_mat...tack.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
? 0 : m_combined_matrix_stack.last();
0
105 g->m_clip_list = m_current_clip;-
106 g->setInheritedOpacity(m_opacity_stack.last());-
107}
never executed: end of block
0
108-
109void QSGNodeUpdater::leaveGeometryNode(QSGGeometryNode *g)-
110{-
111-
112-
113-
114 (void)g;-
115-
116}
never executed: end of block
0
117-
118void QSGNodeUpdater::enterRenderNode(QSGRenderNode *r)-
119{-
120-
121-
122-
123-
124 QSGRenderNodePrivate *rd = QSGRenderNodePrivate::get(r);-
125 rd->m_matrix = m_combined_matrix_stack.isEmpty()
m_combined_mat...tack.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
? 0 : m_combined_matrix_stack.last();
0
126 rd->m_clip_list = m_current_clip;-
127 rd->m_opacity = m_opacity_stack.last();-
128}
never executed: end of block
0
129-
130void QSGNodeUpdater::leaveRenderNode(QSGRenderNode *r)-
131{-
132-
133-
134-
135 (void)r;-
136-
137}
never executed: end of block
0
138-
139void QSGNodeUpdater::enterOpacityNode(QSGOpacityNode *o)-
140{-
141 qreal opacity = m_opacity_stack.last() * o->opacity();-
142 o->setCombinedOpacity(opacity);-
143 m_opacity_stack.add(opacity);-
144-
145-
146-
147-
148}
never executed: end of block
0
149-
150void QSGNodeUpdater::leaveOpacityNode(QSGOpacityNode *o)-
151{-
152-
153-
154-
155 if (o->flags() & QSGNode::DirtyOpacity
o->flags() & Q...::DirtyOpacityDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
156 --
never executed: --m_force_update;
m_force_update;
never executed: --m_force_update;
0
157-
158 m_opacity_stack.pop_back();-
159}
never executed: end of block
0
160-
161void QSGNodeUpdater::visitChildren(QSGNode *n)-
162{-
163 for (QSGNode *c = n->firstChild(); c
cDescription
TRUEnever evaluated
FALSEnever evaluated
; c = c->nextSibling())
0
164 visitNode(c);
never executed: visitNode(c);
0
165}
never executed: end of block
0
166-
167void QSGNodeUpdater::visitNode(QSGNode *n)-
168{-
169-
170-
171-
172-
173 if (!m_force_update
!m_force_updateDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickshape
FALSEnever evaluated
)
0-24
174 return;
executed 24 times by 1 test: return;
Executed by:
  • tst_qquickshape
24
175 if (n->isSubtreeBlocked()
n->isSubtreeBlocked()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
176 return;
never executed: return;
0
177-
178 switch (n->type()) {-
179 case
never executed: case QSGNode::TransformNodeType:
QSGNode::TransformNodeType:
never executed: case QSGNode::TransformNodeType:
{
0
180 QSGTransformNode *t = static_cast<QSGTransformNode *>(n);-
181 enterTransformNode(t);-
182 visitChildren(t);-
183 leaveTransformNode(t);-
184 break;
never executed: break;
}
0
185 case
never executed: case QSGNode::GeometryNodeType:
QSGNode::GeometryNodeType:
never executed: case QSGNode::GeometryNodeType:
{
0
186 QSGGeometryNode *g = static_cast<QSGGeometryNode *>(n);-
187 enterGeometryNode(g);-
188 visitChildren(g);-
189 leaveGeometryNode(g);-
190 break;
never executed: break;
}
0
191 case
never executed: case QSGNode::RenderNodeType:
QSGNode::RenderNodeType:
never executed: case QSGNode::RenderNodeType:
{
0
192 QSGRenderNode *r = static_cast<QSGRenderNode *>(n);-
193 enterRenderNode(r);-
194 visitChildren(r);-
195 leaveRenderNode(r);-
196 break;
never executed: break;
}
0
197 case
never executed: case QSGNode::ClipNodeType:
QSGNode::ClipNodeType:
never executed: case QSGNode::ClipNodeType:
{
0
198 QSGClipNode *c = static_cast<QSGClipNode *>(n);-
199 enterClipNode(c);-
200 visitChildren(c);-
201 leaveClipNode(c);-
202 break;
never executed: break;
}
0
203 case
never executed: case QSGNode::OpacityNodeType:
QSGNode::OpacityNodeType:
never executed: case QSGNode::OpacityNodeType:
{
0
204 QSGOpacityNode *o = static_cast<QSGOpacityNode *>(n);-
205 enterOpacityNode(o);-
206 visitChildren(o);-
207 leaveOpacityNode(o);-
208 break;
never executed: break;
}
0
209 default
never executed: default:
:
never executed: default:
0
210 visitChildren(n);-
211 break;
never executed: break;
0
212 }-
213}-
214-
215-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0