OpenCoverage

qsgsimplematerial.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgsimplematerial.h
Source codeSwitch to Preprocessed file
LineSourceCount
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#ifndef QSGSIMPLEMATERIAL_H-
41#define QSGSIMPLEMATERIAL_H-
42-
43#include <QtQuick/qsgmaterial.h>-
44-
45QT_BEGIN_NAMESPACE-
46-
47template <typename State>-
48class QSGSimpleMaterialShader : public QSGMaterialShader-
49{-
50public:-
51 void initialize() override {-
52 QSGMaterialShader::initialize();-
53#if QT_CONFIG(opengl)-
54 m_id_matrix = program()->uniformLocation(uniformMatrixName());-
55 if (m_id_matrix < 0) {
m_id_matrix < 0Description
TRUEnever evaluated
FALSEevaluated 64 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
0-64
56 qFatal("QSGSimpleMaterialShader does not implement 'uniform highp mat4 %s;' in its vertex shader",-
57 uniformMatrixName());-
58 }
never executed: end of block
0
59-
60 const char *opacity = uniformOpacityName();-
61 if (opacity) {
opacityDescription
TRUEevaluated 64 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
FALSEnever evaluated
0-64
62 m_id_opacity = program()->uniformLocation(uniformOpacityName());-
63 if (m_id_opacity < 0) {
m_id_opacity < 0Description
TRUEnever evaluated
FALSEevaluated 64 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
0-64
64 qFatal("QSGSimpleMaterialShader does not implement 'uniform lowp float %s' in its fragment shader",-
65 uniformOpacityName());-
66 }
never executed: end of block
0
67 } else {
executed 64 times by 21 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
64
68 m_id_opacity = -1;-
69 }
never executed: end of block
0
70#endif-
71 resolveUniforms();-
72 }
executed 64 times by 21 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
64
73-
74 // ### Qt 6: make both virtual and fix docs-
75 const char *uniformMatrixName() const { return "qt_Matrix"; }
executed 64 times by 21 tests: return "qt_Matrix";
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
64
76 const char *uniformOpacityName() const { return "qt_Opacity"; }
executed 128 times by 21 tests: return "qt_Opacity";
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
128
77-
78 void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;-
79-
80 virtual void updateState(const State *newState, const State *oldState) = 0;-
81-
82 virtual void resolveUniforms() {}-
83-
84 virtual QList<QByteArray> attributes() const = 0;-
85-
86 char const *const *attributeNames() const override-
87 {-
88 if (m_attribute_pointers.size())
m_attribute_pointers.size()Description
TRUEevaluated 12413 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
FALSEevaluated 64 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
64-12413
89 return m_attribute_pointers.constData();
executed 12413 times by 21 tests: return m_attribute_pointers.constData();
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
12413
90-
91 QList<QByteArray> names = attributes();-
92-
93 // Calculate the total number of bytes needed, so we don't get rellocs and-
94 // bad pointers while copying over the individual names.-
95 // Add an extra byte pr entry for the '\0' char.-
96 int total = 0;-
97 for (int i=0; i<names.size(); ++i)
i<names.size()Description
TRUEevaluated 240 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
FALSEevaluated 64 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
64-240
98 total += names.at(i).size() + 1;
executed 240 times by 21 tests: total += names.at(i).size() + 1;
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
240
99 m_attribute_name_data.reserve(total);-
100-
101 // Copy over the names-
102 for (int i=0; i<names.size(); ++i) {
i<names.size()Description
TRUEevaluated 240 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
FALSEevaluated 64 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
64-240
103 m_attribute_pointers << m_attribute_name_data.constData() + m_attribute_name_data.size();-
104 m_attribute_name_data.append(names.at(i));-
105 m_attribute_name_data.append('\0');-
106 }
executed 240 times by 21 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
240
107-
108 // Append the "null" terminator-
109 m_attribute_pointers << 0;-
110-
111 return m_attribute_pointers.constData();
executed 64 times by 21 tests: return m_attribute_pointers.constData();
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
64
112 }-
113-
114private:-
115 int m_id_matrix;-
116 int m_id_opacity;-
117-
118 mutable QByteArray m_attribute_name_data;-
119 mutable QVector<const char *> m_attribute_pointers;-
120};-
121-
122#define QSG_DECLARE_SIMPLE_SHADER(Shader, State) \-
123static QSGMaterialShader *createShader() \-
124{ \-
125 return new Shader; \-
126} \-
127public: \-
128static QSGSimpleMaterial<State> *createMaterial() \-
129{ \-
130 return new QSGSimpleMaterial<State>(createShader); \-
131}-
132-
133-
134typedef QSGMaterialShader *(*PtrShaderCreateFunc)();-
135-
136-
137template <typename State>-
138class QSGSimpleMaterial : public QSGMaterial-
139{-
140public:-
141#ifndef Q_CLANG_QDOC-
142 QSGSimpleMaterial(const State &aState, PtrShaderCreateFunc func)-
143 : m_state(aState)-
144 , m_func(func)-
145 {-
146 }
never executed: end of block
0
147-
148 QSGSimpleMaterial(PtrShaderCreateFunc func)-
149 : m_func(func)-
150 {-
151 }
executed 99 times by 21 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
99
152-
153 QSGMaterialShader *createShader() const override { return m_func(); }
executed 64 times by 21 tests: return m_func();
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
64
154 QSGMaterialType *type() const override { return &m_type; }
executed 12010 times by 21 tests: return &m_type;
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
12010
155-
156 State *state() { return &m_state; }
executed 145005 times by 21 tests: return &m_state;
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
145005
157 const State *state() const { return &m_state; }
never executed: return &m_state;
0
158#endif-
159-
160private:-
161 static QSGMaterialType m_type;-
162 State m_state;-
163 PtrShaderCreateFunc m_func;-
164};-
165-
166#define QSG_DECLARE_SIMPLE_COMPARABLE_SHADER(Shader, State) \-
167static QSGMaterialShader *createShader() \-
168{ \-
169 return new Shader; \-
170} \-
171public: \-
172static QSGSimpleMaterialComparableMaterial<State> *createMaterial() \-
173{ \-
174 return new QSGSimpleMaterialComparableMaterial<State>(createShader); \-
175}-
176-
177template <typename State>-
178class QSGSimpleMaterialComparableMaterial : public QSGSimpleMaterial<State>-
179{-
180-
181public:-
182 QSGSimpleMaterialComparableMaterial(const State &state, PtrShaderCreateFunc func)-
183 : QSGSimpleMaterial<State>(state, func) {}
never executed: end of block
0
184-
185 QSGSimpleMaterialComparableMaterial(PtrShaderCreateFunc func)-
186 : QSGSimpleMaterial<State>(func) {}
never executed: end of block
0
187-
188 int compare(const QSGMaterial *other) const override {-
189 return QSGSimpleMaterialComparableMaterial<State>::state()->compare(static_cast<const QSGSimpleMaterialComparableMaterial<State> *>(other)->state());
never executed: return QSGSimpleMaterialComparableMaterial<State>::state()->compare(static_cast<const QSGSimpleMaterialComparableMaterial<State> *>(other)->state());
0
190 }-
191};-
192-
193-
194template <typename State>-
195QSGMaterialType QSGSimpleMaterial<State>::m_type;-
196-
197-
198template <typename State>-
199Q_INLINE_TEMPLATE void QSGSimpleMaterialShader<State>::updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial)-
200{-
201#if QT_CONFIG(opengl)-
202 if (state.isMatrixDirty())
state.isMatrixDirty()Description
TRUEevaluated 4593 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
FALSEnever evaluated
0-4593
203 program()->setUniformValue(m_id_matrix, state.combinedMatrix());
executed 4593 times by 21 tests: program()->setUniformValue(m_id_matrix, state.combinedMatrix());
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
4593
204 if (state.isOpacityDirty() && m_id_opacity >= 0)
state.isOpacityDirty()Description
TRUEevaluated 64 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
FALSEevaluated 4529 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
m_id_opacity >= 0Description
TRUEevaluated 64 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
FALSEnever evaluated
0-4529
205 program()->setUniformValue(m_id_opacity, state.opacity());
executed 64 times by 21 tests: program()->setUniformValue(m_id_opacity, state.opacity());
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
64
206#else-
207 Q_UNUSED(state)-
208#endif-
209 State *ns = static_cast<QSGSimpleMaterial<State> *>(newMaterial)->state();-
210 State *old = nullptr;-
211 if (oldMaterial)
oldMaterialDescription
TRUEevaluated 683 times by 5 tests
Evaluated by:
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquicklineextruder
  • tst_qquickrectangleextruder
  • tst_qquicktrailemitter
FALSEevaluated 3910 times by 21 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
683-3910
212 old = static_cast<QSGSimpleMaterial<State> *>(oldMaterial)->state();
executed 683 times by 5 tests: old = static_cast<QSGSimpleMaterial<State> *>(oldMaterial)->state();
Executed by:
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquicklineextruder
  • tst_qquickrectangleextruder
  • tst_qquicktrailemitter
683
213 updateState(ns, old);-
214}
executed 4593 times by 21 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
4593
215-
216QT_END_NAMESPACE-
217-
218-
219#endif-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0