Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | | - |
41 | #include "qsgdefaultinternalrectanglenode_p.h" | - |
42 | | - |
43 | #include <QtQuick/qsgvertexcolormaterial.h> | - |
44 | #include <QtQuick/qsgtexturematerial.h> | - |
45 | | - |
46 | #include <QtQuick/private/qsgcontext_p.h> | - |
47 | | - |
48 | #include <QtCore/qmath.h> | - |
49 | #include <QtCore/qvarlengtharray.h> | - |
50 | | - |
51 | QT_BEGIN_NAMESPACE | - |
52 | | - |
53 | class SmoothColorMaterialShader : public QSGMaterialShader | - |
54 | { | - |
55 | public: | - |
56 | SmoothColorMaterialShader(); | - |
57 | | - |
58 | void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override; | - |
59 | char const *const *attributeNames() const override; | - |
60 | | - |
61 | private: | - |
62 | void initialize() override; | - |
63 | | - |
64 | int m_matrixLoc; | - |
65 | int m_opacityLoc; | - |
66 | int m_pixelSizeLoc; | - |
67 | }; | - |
68 | | - |
69 | SmoothColorMaterialShader::SmoothColorMaterialShader() | - |
70 | { | - |
71 | setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/smoothcolor.vert"));executed 247 times by 11 tests: return qstring_literal_temp; Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 247 |
72 | setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/smoothcolor.frag"));executed 247 times by 11 tests: return qstring_literal_temp; Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 247 |
73 | }executed 247 times by 11 tests: end of block Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 247 |
74 | | - |
75 | void SmoothColorMaterialShader::updateState(const RenderState &state, QSGMaterial *, QSGMaterial *oldEffect) | - |
76 | { | - |
77 | if (state.isOpacityDirty())TRUE | evaluated 803 times by 11 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| FALSE | evaluated 1643 times by 11 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
|
| 803-1643 |
78 | program()->setUniformValue(m_opacityLoc, state.opacity());executed 803 times by 11 tests: program()->setUniformValue(m_opacityLoc, state.opacity()); Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 803 |
79 | | - |
80 | if (state.isMatrixDirty())TRUE | evaluated 2446 times by 11 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| FALSE | never evaluated |
| 0-2446 |
81 | program()->setUniformValue(m_matrixLoc, state.combinedMatrix());executed 2446 times by 11 tests: program()->setUniformValue(m_matrixLoc, state.combinedMatrix()); Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 2446 |
82 | | - |
83 | if (oldEffect == nullptr) {TRUE | evaluated 1516 times by 11 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| FALSE | evaluated 930 times by 4 testsEvaluated by:- tst_examples
- tst_multipointtoucharea_interop
- tst_qquickitem2
- tst_scenegraph
|
| 930-1516 |
84 | | - |
85 | QRect r = state.viewportRect(); | - |
86 | program()->setUniformValue(m_pixelSizeLoc, 2.0f / r.width(), 2.0f / r.height()); | - |
87 | }executed 1516 times by 11 tests: end of block Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 1516 |
88 | }executed 2446 times by 11 tests: end of block Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 2446 |
89 | | - |
90 | char const *const *SmoothColorMaterialShader::attributeNames() const | - |
91 | { | - |
92 | static char const *const attributes[] = { | - |
93 | "vertex", | - |
94 | "vertexColor", | - |
95 | "vertexOffset", | - |
96 | nullptr | - |
97 | }; | - |
98 | return attributes;executed 5725 times by 11 tests: return attributes; Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 5725 |
99 | } | - |
100 | | - |
101 | void SmoothColorMaterialShader::initialize() | - |
102 | { | - |
103 | m_matrixLoc = program()->uniformLocation("matrix"); | - |
104 | m_opacityLoc = program()->uniformLocation("opacity"); | - |
105 | m_pixelSizeLoc = program()->uniformLocation("pixelSize"); | - |
106 | }executed 247 times by 11 tests: end of block Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 247 |
107 | | - |
108 | QSGSmoothColorMaterial::QSGSmoothColorMaterial() | - |
109 | { | - |
110 | setFlag(RequiresFullMatrixExceptTranslate, true); | - |
111 | setFlag(Blending, true); | - |
112 | }executed 72061 times by 66 tests: end of block Executed by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
| 72061 |
113 | | - |
114 | int QSGSmoothColorMaterial::compare(const QSGMaterial *) const | - |
115 | { | - |
116 | return 0;executed 4789 times by 10 tests: return 0; Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 4789 |
117 | } | - |
118 | | - |
119 | QSGMaterialType *QSGSmoothColorMaterial::type() const | - |
120 | { | - |
121 | static QSGMaterialType type; | - |
122 | return &type;executed 11108 times by 11 tests: return &type; Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 11108 |
123 | } | - |
124 | | - |
125 | QSGMaterialShader *QSGSmoothColorMaterial::createShader() const | - |
126 | { | - |
127 | return new SmoothColorMaterialShader;executed 247 times by 11 tests: return new SmoothColorMaterialShader; Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 247 |
128 | } | - |
129 | | - |
130 | QSGDefaultInternalRectangleNode::QSGDefaultInternalRectangleNode() | - |
131 | { | - |
132 | setMaterial(&m_material); | - |
133 | }executed 72061 times by 66 tests: end of block Executed by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
| 72061 |
134 | | - |
135 | void QSGDefaultInternalRectangleNode::updateMaterialAntialiasing() | - |
136 | { | - |
137 | if (m_antialiasing)TRUE | evaluated 3322 times by 12 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| FALSE | never evaluated |
| 0-3322 |
138 | setMaterial(&m_smoothMaterial);executed 3322 times by 12 tests: setMaterial(&m_smoothMaterial); Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
| 3322 |
139 | else | - |
140 | setMaterial(&m_material); never executed: setMaterial(&m_material); | 0 |
141 | } | - |
142 | | - |
143 | void QSGDefaultInternalRectangleNode::updateMaterialBlending(QSGNode::DirtyState *state) | - |
144 | { | - |
145 | | - |
146 | if (material() == &m_material) {TRUE | evaluated 73455 times by 65 testsEvaluated by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
| FALSE | evaluated 3713 times by 12 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_scenegraph
|
| 3713-73455 |
147 | bool wasBlending = (m_material.flags() & QSGMaterial::Blending); | - |
148 | bool isBlending = (m_gradient_stops.size() > 0 && !m_gradient_is_opaque)TRUE | evaluated 136 times by 3 testsEvaluated by:- tst_examples
- tst_qquickitemlayer
- tst_scenegraph
| FALSE | evaluated 73319 times by 65 testsEvaluated by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
|
TRUE | evaluated 8 times by 1 test | FALSE | evaluated 128 times by 3 testsEvaluated by:- tst_examples
- tst_qquickitemlayer
- tst_scenegraph
|
| 8-73319 |
149 | || (m_color.alpha() < 255 && m_color.alpha() != 0)TRUE | evaluated 240 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquicktextedit
| FALSE | evaluated 73207 times by 65 testsEvaluated by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
|
TRUE | evaluated 218 times by 3 testsEvaluated by:- tst_examples
- tst_qquickgridview
- tst_qquicklistview
| FALSE | evaluated 22 times by 2 testsEvaluated by:- tst_qquickfocusscope
- tst_qquicktextedit
|
| 22-73207 |
150 | || (m_pen_width > 0 && m_border_color.alpha() < 255);TRUE | evaluated 42103 times by 12 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmultipointtoucharea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 31126 times by 65 testsEvaluated by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
|
TRUE | never evaluated | FALSE | evaluated 42103 times by 12 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmultipointtoucharea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
|
| 0-42103 |
151 | if (wasBlending != isBlending) {TRUE | evaluated 68513 times by 65 testsEvaluated by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
| FALSE | evaluated 4942 times by 16 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickanimationcontroller
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickmultipointtoucharea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextinput
- tst_qquickwidget
- tst_scenegraph
|
| 4942-68513 |
152 | m_material.setFlag(QSGMaterial::Blending, isBlending); | - |
153 | *state |= QSGNode::DirtyMaterial; | - |
154 | }executed 68513 times by 65 tests: end of block Executed by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
| 68513 |
155 | }executed 73455 times by 65 tests: end of block Executed by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
| 73455 |
156 | }executed 77168 times by 66 tests: end of block Executed by:- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qqmltypeloader
- tst_qquickage
- tst_qquickangleddirection
- tst_qquickanimatedsprite
- tst_qquickanimationcontroller
- tst_qquickcumulativedirection
- tst_qquickcustomaffector
- tst_qquickcustomparticle
- tst_qquickdraghandler
- tst_qquickellipseextruder
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickfriction
- tst_qquickgravity
- tst_qquickgridview
- tst_qquickgroupgoal
- tst_qquickimage
- tst_qquickimageparticle
- tst_qquickitem
- ...
| 77168 |
157 | | - |
158 | QT_END_NAMESPACE | - |
| | |