Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp |
Source code | Switch to Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | /**************************************************************************** | - | ||||||||||||||||||
2 | ** | - | ||||||||||||||||||
3 | ** Copyright (C) 2016 The Qt Company Ltd. | - | ||||||||||||||||||
4 | ** Contact: https://www.qt.io/licensing/ | - | ||||||||||||||||||
5 | ** | - | ||||||||||||||||||
6 | ** This file is part of the QtQuick module of the Qt Toolkit. | - | ||||||||||||||||||
7 | ** | - | ||||||||||||||||||
8 | ** $QT_BEGIN_LICENSE:LGPL$ | - | ||||||||||||||||||
9 | ** Commercial License Usage | - | ||||||||||||||||||
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||||||||||||||
11 | ** accordance with the commercial license agreement provided with the | - | ||||||||||||||||||
12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||||||||||||||
13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||||||||||||||
14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - | ||||||||||||||||||
15 | ** information use the contact form at https://www.qt.io/contact-us. | - | ||||||||||||||||||
16 | ** | - | ||||||||||||||||||
17 | ** GNU Lesser General Public License Usage | - | ||||||||||||||||||
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||||||||||||||
19 | ** General Public License version 3 as published by the Free Software | - | ||||||||||||||||||
20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - | ||||||||||||||||||
21 | ** packaging of this file. Please review the following information to | - | ||||||||||||||||||
22 | ** ensure the GNU Lesser General Public License version 3 requirements | - | ||||||||||||||||||
23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - | ||||||||||||||||||
24 | ** | - | ||||||||||||||||||
25 | ** GNU General Public License Usage | - | ||||||||||||||||||
26 | ** Alternatively, this file may be used under the terms of the GNU | - | ||||||||||||||||||
27 | ** General Public License version 2.0 or (at your option) the GNU General | - | ||||||||||||||||||
28 | ** Public license version 3 or any later version approved by the KDE Free | - | ||||||||||||||||||
29 | ** Qt Foundation. The licenses are as published by the Free Software | - | ||||||||||||||||||
30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - | ||||||||||||||||||
31 | ** included in the packaging of this file. Please review the following | - | ||||||||||||||||||
32 | ** information to ensure the GNU General Public License requirements will | - | ||||||||||||||||||
33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - | ||||||||||||||||||
34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - | ||||||||||||||||||
35 | ** | - | ||||||||||||||||||
36 | ** $QT_END_LICENSE$ | - | ||||||||||||||||||
37 | ** | - | ||||||||||||||||||
38 | ****************************************************************************/ | - | ||||||||||||||||||
39 | - | |||||||||||||||||||
40 | #include "qsgsoftwarerenderablenodeupdater_p.h" | - | ||||||||||||||||||
41 | - | |||||||||||||||||||
42 | #include "qsgabstractsoftwarerenderer_p.h" | - | ||||||||||||||||||
43 | #include "qsgsoftwareinternalimagenode_p.h" | - | ||||||||||||||||||
44 | #include "qsgsoftwareinternalrectanglenode_p.h" | - | ||||||||||||||||||
45 | #include "qsgsoftwareglyphnode_p.h" | - | ||||||||||||||||||
46 | #include "qsgsoftwarepublicnodes_p.h" | - | ||||||||||||||||||
47 | #include "qsgsoftwarepainternode_p.h" | - | ||||||||||||||||||
48 | #include "qsgsoftwarepixmaptexture_p.h" | - | ||||||||||||||||||
49 | - | |||||||||||||||||||
50 | #include <QtQuick/qsgsimplerectnode.h> | - | ||||||||||||||||||
51 | #include <QtQuick/qsgsimpletexturenode.h> | - | ||||||||||||||||||
52 | #include <QtQuick/qsgrendernode.h> | - | ||||||||||||||||||
53 | - | |||||||||||||||||||
54 | QT_BEGIN_NAMESPACE | - | ||||||||||||||||||
55 | - | |||||||||||||||||||
56 | QSGSoftwareRenderableNodeUpdater::QSGSoftwareRenderableNodeUpdater(QSGAbstractSoftwareRenderer *renderer) | - | ||||||||||||||||||
57 | : m_renderer(renderer) | - | ||||||||||||||||||
58 | { | - | ||||||||||||||||||
59 | m_opacityState.push(1.0f); | - | ||||||||||||||||||
60 | // Invalid RectF by default for no clip | - | ||||||||||||||||||
61 | m_clipState.push(QRegion()); | - | ||||||||||||||||||
62 | m_hasClip = false; | - | ||||||||||||||||||
63 | m_transformState.push(QTransform()); | - | ||||||||||||||||||
64 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||
65 | - | |||||||||||||||||||
66 | QSGSoftwareRenderableNodeUpdater::~QSGSoftwareRenderableNodeUpdater() | - | ||||||||||||||||||
67 | { | - | ||||||||||||||||||
68 | - | |||||||||||||||||||
69 | } | - | ||||||||||||||||||
70 | - | |||||||||||||||||||
71 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGTransformNode *node) | - | ||||||||||||||||||
72 | { | - | ||||||||||||||||||
73 | m_transformState.push(node->matrix().toTransform() * m_transformState.top()); | - | ||||||||||||||||||
74 | m_stateMap[node] = currentState(node); | - | ||||||||||||||||||
75 | return true; executed 40 times by 1 test: return true; Executed by:
| 40 | ||||||||||||||||||
76 | } | - | ||||||||||||||||||
77 | - | |||||||||||||||||||
78 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGTransformNode *) | - | ||||||||||||||||||
79 | { | - | ||||||||||||||||||
80 | m_transformState.pop(); | - | ||||||||||||||||||
81 | } executed 40 times by 1 test: end of block Executed by:
| 40 | ||||||||||||||||||
82 | - | |||||||||||||||||||
83 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGClipNode *node) | - | ||||||||||||||||||
84 | { | - | ||||||||||||||||||
85 | // Make sure to translate the clip rect into world coordinates | - | ||||||||||||||||||
86 | if (m_clipState.count() == 0 || (m_clipState.count() == 1 && m_clipState.top().isNull())) {
| 0 | ||||||||||||||||||
87 | m_clipState.push(m_transformState.top().map(QRegion(node->clipRect().toRect()))); | - | ||||||||||||||||||
88 | m_hasClip = true; | - | ||||||||||||||||||
89 | } else { never executed: end of block | 0 | ||||||||||||||||||
90 | const QRegion transformedClipRect = m_transformState.top().map(QRegion(node->clipRect().toRect())); | - | ||||||||||||||||||
91 | m_clipState.push(transformedClipRect.intersected(m_clipState.top())); | - | ||||||||||||||||||
92 | } never executed: end of block | 0 | ||||||||||||||||||
93 | m_stateMap[node] = currentState(node); | - | ||||||||||||||||||
94 | return true; never executed: return true; | 0 | ||||||||||||||||||
95 | } | - | ||||||||||||||||||
96 | - | |||||||||||||||||||
97 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGClipNode *) | - | ||||||||||||||||||
98 | { | - | ||||||||||||||||||
99 | m_clipState.pop(); | - | ||||||||||||||||||
100 | if (m_clipState.count() == 0 || (m_clipState.count() == 1 && m_clipState.top().isNull()))
| 0 | ||||||||||||||||||
101 | m_hasClip = false; never executed: m_hasClip = false; | 0 | ||||||||||||||||||
102 | } never executed: end of block | 0 | ||||||||||||||||||
103 | - | |||||||||||||||||||
104 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGGeometryNode *node) | - | ||||||||||||||||||
105 | { | - | ||||||||||||||||||
106 | if (QSGSimpleRectNode *rectNode = dynamic_cast<QSGSimpleRectNode *>(node)) {
| 0 | ||||||||||||||||||
107 | return updateRenderableNode(QSGSoftwareRenderableNode::SimpleRect, rectNode); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::SimpleRect, rectNode); | 0 | ||||||||||||||||||
108 | } else if (QSGSimpleTextureNode *tn = dynamic_cast<QSGSimpleTextureNode *>(node)) {
| 0 | ||||||||||||||||||
109 | return updateRenderableNode(QSGSoftwareRenderableNode::SimpleTexture, tn); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::SimpleTexture, tn); | 0 | ||||||||||||||||||
110 | } else if (QSGNinePatchNode *nn = dynamic_cast<QSGNinePatchNode *>(node)) {
| 0 | ||||||||||||||||||
111 | return updateRenderableNode(QSGSoftwareRenderableNode::NinePatch, nn); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::NinePatch, nn); | 0 | ||||||||||||||||||
112 | } else if (QSGRectangleNode *rn = dynamic_cast<QSGRectangleNode *>(node)) {
| 0 | ||||||||||||||||||
113 | return updateRenderableNode(QSGSoftwareRenderableNode::SimpleRectangle, rn); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::SimpleRectangle, rn); | 0 | ||||||||||||||||||
114 | } else if (QSGImageNode *n = dynamic_cast<QSGImageNode *>(node)) {
| 0 | ||||||||||||||||||
115 | return updateRenderableNode(QSGSoftwareRenderableNode::SimpleImage, n); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::SimpleImage, n); | 0 | ||||||||||||||||||
116 | } else { | - | ||||||||||||||||||
117 | // We dont know, so skip | - | ||||||||||||||||||
118 | return false; never executed: return false; | 0 | ||||||||||||||||||
119 | } | - | ||||||||||||||||||
120 | } | - | ||||||||||||||||||
121 | - | |||||||||||||||||||
122 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGGeometryNode *) | - | ||||||||||||||||||
123 | { | - | ||||||||||||||||||
124 | } | - | ||||||||||||||||||
125 | - | |||||||||||||||||||
126 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGOpacityNode *node) | - | ||||||||||||||||||
127 | { | - | ||||||||||||||||||
128 | m_opacityState.push(m_opacityState.top() * node->opacity()); | - | ||||||||||||||||||
129 | m_stateMap[node] = currentState(node); | - | ||||||||||||||||||
130 | return true; never executed: return true; | 0 | ||||||||||||||||||
131 | } | - | ||||||||||||||||||
132 | - | |||||||||||||||||||
133 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGOpacityNode *) | - | ||||||||||||||||||
134 | { | - | ||||||||||||||||||
135 | m_opacityState.pop(); | - | ||||||||||||||||||
136 | } never executed: end of block | 0 | ||||||||||||||||||
137 | - | |||||||||||||||||||
138 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGInternalImageNode *node) | - | ||||||||||||||||||
139 | { | - | ||||||||||||||||||
140 | return updateRenderableNode(QSGSoftwareRenderableNode::Image, node); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::Image, node); | 0 | ||||||||||||||||||
141 | } | - | ||||||||||||||||||
142 | - | |||||||||||||||||||
143 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGInternalImageNode *) | - | ||||||||||||||||||
144 | { | - | ||||||||||||||||||
145 | } | - | ||||||||||||||||||
146 | - | |||||||||||||||||||
147 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGPainterNode *node) | - | ||||||||||||||||||
148 | { | - | ||||||||||||||||||
149 | return updateRenderableNode(QSGSoftwareRenderableNode::Painter, node); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::Painter, node); | 0 | ||||||||||||||||||
150 | } | - | ||||||||||||||||||
151 | - | |||||||||||||||||||
152 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGPainterNode *) | - | ||||||||||||||||||
153 | { | - | ||||||||||||||||||
154 | } | - | ||||||||||||||||||
155 | - | |||||||||||||||||||
156 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGInternalRectangleNode *node) | - | ||||||||||||||||||
157 | { | - | ||||||||||||||||||
158 | return updateRenderableNode(QSGSoftwareRenderableNode::Rectangle, node); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::Rectangle, node); | 0 | ||||||||||||||||||
159 | } | - | ||||||||||||||||||
160 | - | |||||||||||||||||||
161 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGInternalRectangleNode *) | - | ||||||||||||||||||
162 | { | - | ||||||||||||||||||
163 | } | - | ||||||||||||||||||
164 | - | |||||||||||||||||||
165 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGGlyphNode *node) | - | ||||||||||||||||||
166 | { | - | ||||||||||||||||||
167 | return updateRenderableNode(QSGSoftwareRenderableNode::Glyph, node); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::Glyph, node); | 0 | ||||||||||||||||||
168 | } | - | ||||||||||||||||||
169 | - | |||||||||||||||||||
170 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGGlyphNode *) | - | ||||||||||||||||||
171 | { | - | ||||||||||||||||||
172 | } | - | ||||||||||||||||||
173 | - | |||||||||||||||||||
174 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGRootNode *node) | - | ||||||||||||||||||
175 | { | - | ||||||||||||||||||
176 | m_stateMap[node] = currentState(node); | - | ||||||||||||||||||
177 | return true; executed 8 times by 1 test: return true; Executed by:
| 8 | ||||||||||||||||||
178 | } | - | ||||||||||||||||||
179 | - | |||||||||||||||||||
180 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGRootNode *) | - | ||||||||||||||||||
181 | { | - | ||||||||||||||||||
182 | } | - | ||||||||||||||||||
183 | - | |||||||||||||||||||
184 | #if QT_CONFIG(quick_sprite) | - | ||||||||||||||||||
185 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGSpriteNode *node) | - | ||||||||||||||||||
186 | { | - | ||||||||||||||||||
187 | return updateRenderableNode(QSGSoftwareRenderableNode::SpriteNode, node); never executed: return updateRenderableNode(QSGSoftwareRenderableNode::SpriteNode, node); | 0 | ||||||||||||||||||
188 | } | - | ||||||||||||||||||
189 | - | |||||||||||||||||||
190 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGSpriteNode *) | - | ||||||||||||||||||
191 | { | - | ||||||||||||||||||
192 | - | |||||||||||||||||||
193 | } | - | ||||||||||||||||||
194 | #endif | - | ||||||||||||||||||
195 | - | |||||||||||||||||||
196 | bool QSGSoftwareRenderableNodeUpdater::visit(QSGRenderNode *node) | - | ||||||||||||||||||
197 | { | - | ||||||||||||||||||
198 | return updateRenderableNode(QSGSoftwareRenderableNode::RenderNode, node); executed 8 times by 1 test: return updateRenderableNode(QSGSoftwareRenderableNode::RenderNode, node); Executed by:
| 8 | ||||||||||||||||||
199 | } | - | ||||||||||||||||||
200 | - | |||||||||||||||||||
201 | void QSGSoftwareRenderableNodeUpdater::endVisit(QSGRenderNode *) | - | ||||||||||||||||||
202 | { | - | ||||||||||||||||||
203 | } | - | ||||||||||||||||||
204 | - | |||||||||||||||||||
205 | void QSGSoftwareRenderableNodeUpdater::updateNodes(QSGNode *node, bool isNodeRemoved) | - | ||||||||||||||||||
206 | { | - | ||||||||||||||||||
207 | m_opacityState.clear(); | - | ||||||||||||||||||
208 | m_clipState.clear(); | - | ||||||||||||||||||
209 | m_transformState.clear(); | - | ||||||||||||||||||
210 | - | |||||||||||||||||||
211 | auto parentNode = node->parent(); | - | ||||||||||||||||||
212 | // If the node was deleted, it will have no parent | - | ||||||||||||||||||
213 | // check if the state map has the previous parent | - | ||||||||||||||||||
214 | if ((!parentNode || isNodeRemoved ) && m_stateMap.contains(node))
| 8-72 | ||||||||||||||||||
215 | parentNode = m_stateMap[node].parent; executed 40 times by 1 test: parentNode = m_stateMap[node].parent; Executed by:
| 40 | ||||||||||||||||||
216 | - | |||||||||||||||||||
217 | // If we find a parent, use its state for updating the new children | - | ||||||||||||||||||
218 | if (parentNode && m_stateMap.contains(parentNode)) {
| 0-72 | ||||||||||||||||||
219 | auto state = m_stateMap[parentNode]; | - | ||||||||||||||||||
220 | m_opacityState.push(state.opacity); | - | ||||||||||||||||||
221 | m_transformState.push(state.transform); | - | ||||||||||||||||||
222 | m_clipState.push(state.clip); | - | ||||||||||||||||||
223 | m_hasClip = state.hasClip; | - | ||||||||||||||||||
224 | } else { executed 72 times by 1 test: end of block Executed by:
| 72 | ||||||||||||||||||
225 | // There is no parent, and no previous parent, so likely a root node | - | ||||||||||||||||||
226 | m_opacityState.push(1.0f); | - | ||||||||||||||||||
227 | m_transformState.push(QTransform()); | - | ||||||||||||||||||
228 | m_clipState.push(QRegion()); | - | ||||||||||||||||||
229 | m_hasClip = false; | - | ||||||||||||||||||
230 | } executed 16 times by 1 test: end of block Executed by:
| 16 | ||||||||||||||||||
231 | - | |||||||||||||||||||
232 | // If the node is being removed, then cleanup the state data | - | ||||||||||||||||||
233 | // Then just visit the children without visiting the now removed node | - | ||||||||||||||||||
234 | if (isNodeRemoved) {
| 40-48 | ||||||||||||||||||
235 | m_stateMap.remove(node); | - | ||||||||||||||||||
236 | return; executed 40 times by 1 test: return; Executed by:
| 40 | ||||||||||||||||||
237 | } | - | ||||||||||||||||||
238 | - | |||||||||||||||||||
239 | // Visit the current node itself first | - | ||||||||||||||||||
240 | switch (node->type()) { | - | ||||||||||||||||||
241 | case QSGNode::ClipNodeType: { never executed: case QSGNode::ClipNodeType: | 0 | ||||||||||||||||||
242 | QSGClipNode *c = static_cast<QSGClipNode*>(node); | - | ||||||||||||||||||
243 | if (visit(c))
| 0 | ||||||||||||||||||
244 | visitChildren(c); never executed: visitChildren(c); | 0 | ||||||||||||||||||
245 | endVisit(c); | - | ||||||||||||||||||
246 | break; never executed: break; | 0 | ||||||||||||||||||
247 | } | - | ||||||||||||||||||
248 | case QSGNode::TransformNodeType: { executed 32 times by 1 test: case QSGNode::TransformNodeType: Executed by:
| 32 | ||||||||||||||||||
249 | QSGTransformNode *c = static_cast<QSGTransformNode*>(node); | - | ||||||||||||||||||
250 | if (visit(c))
| 0-32 | ||||||||||||||||||
251 | visitChildren(c); executed 32 times by 1 test: visitChildren(c); Executed by:
| 32 | ||||||||||||||||||
252 | endVisit(c); | - | ||||||||||||||||||
253 | break; executed 32 times by 1 test: break; Executed by:
| 32 | ||||||||||||||||||
254 | } | - | ||||||||||||||||||
255 | case QSGNode::OpacityNodeType: { never executed: case QSGNode::OpacityNodeType: | 0 | ||||||||||||||||||
256 | QSGOpacityNode *c = static_cast<QSGOpacityNode*>(node); | - | ||||||||||||||||||
257 | if (visit(c))
| 0 | ||||||||||||||||||
258 | visitChildren(c); never executed: visitChildren(c); | 0 | ||||||||||||||||||
259 | endVisit(c); | - | ||||||||||||||||||
260 | break; never executed: break; | 0 | ||||||||||||||||||
261 | } | - | ||||||||||||||||||
262 | case QSGNode::GeometryNodeType: { never executed: case QSGNode::GeometryNodeType: | 0 | ||||||||||||||||||
263 | if (node->flags() & QSGNode::IsVisitableNode) {
| 0 | ||||||||||||||||||
264 | QSGVisitableNode *v = static_cast<QSGVisitableNode*>(node); | - | ||||||||||||||||||
265 | v->accept(this); | - | ||||||||||||||||||
266 | } else { never executed: end of block | 0 | ||||||||||||||||||
267 | QSGGeometryNode *c = static_cast<QSGGeometryNode*>(node); | - | ||||||||||||||||||
268 | if (visit(c))
| 0 | ||||||||||||||||||
269 | visitChildren(c); never executed: visitChildren(c); | 0 | ||||||||||||||||||
270 | endVisit(c); | - | ||||||||||||||||||
271 | } never executed: end of block | 0 | ||||||||||||||||||
272 | break; never executed: break; | 0 | ||||||||||||||||||
273 | } | - | ||||||||||||||||||
274 | case QSGNode::RootNodeType: { executed 8 times by 1 test: case QSGNode::RootNodeType: Executed by:
| 8 | ||||||||||||||||||
275 | QSGRootNode *root = static_cast<QSGRootNode*>(node); | - | ||||||||||||||||||
276 | if (visit(root))
| 0-8 | ||||||||||||||||||
277 | visitChildren(root); executed 8 times by 1 test: visitChildren(root); Executed by:
| 8 | ||||||||||||||||||
278 | endVisit(root); | - | ||||||||||||||||||
279 | break; executed 8 times by 1 test: break; Executed by:
| 8 | ||||||||||||||||||
280 | } | - | ||||||||||||||||||
281 | case QSGNode::BasicNodeType: { never executed: case QSGNode::BasicNodeType: | 0 | ||||||||||||||||||
282 | visitChildren(node); | - | ||||||||||||||||||
283 | break; never executed: break; | 0 | ||||||||||||||||||
284 | } | - | ||||||||||||||||||
285 | case QSGNode::RenderNodeType: { executed 8 times by 1 test: case QSGNode::RenderNodeType: Executed by:
| 8 | ||||||||||||||||||
286 | QSGRenderNode *r = static_cast<QSGRenderNode*>(node); | - | ||||||||||||||||||
287 | if (visit(r))
| 0-8 | ||||||||||||||||||
288 | visitChildren(r); executed 8 times by 1 test: visitChildren(r); Executed by:
| 8 | ||||||||||||||||||
289 | endVisit(r); | - | ||||||||||||||||||
290 | break; executed 8 times by 1 test: break; Executed by:
| 8 | ||||||||||||||||||
291 | } | - | ||||||||||||||||||
292 | default: never executed: default: | 0 | ||||||||||||||||||
293 | Q_UNREACHABLE(); | - | ||||||||||||||||||
294 | break; never executed: break; | 0 | ||||||||||||||||||
295 | } | - | ||||||||||||||||||
296 | } | - | ||||||||||||||||||
297 | - | |||||||||||||||||||
298 | QSGSoftwareRenderableNodeUpdater::NodeState QSGSoftwareRenderableNodeUpdater::currentState(QSGNode *node) const | - | ||||||||||||||||||
299 | { | - | ||||||||||||||||||
300 | NodeState state; | - | ||||||||||||||||||
301 | state.opacity = m_opacityState.top(); | - | ||||||||||||||||||
302 | state.clip = m_clipState.top(); | - | ||||||||||||||||||
303 | state.hasClip = m_hasClip; | - | ||||||||||||||||||
304 | state.transform = m_transformState.top(); | - | ||||||||||||||||||
305 | state.parent = node->parent(); | - | ||||||||||||||||||
306 | return state; executed 56 times by 1 test: return state; Executed by:
| 56 | ||||||||||||||||||
307 | } | - | ||||||||||||||||||
308 | - | |||||||||||||||||||
309 | QT_END_NAMESPACE | - | ||||||||||||||||||
Source code | Switch to Preprocessed file |