| 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 | #include "qsgdistancefieldglyphnode_p_p.h" | - |
| 41 | #include <QtQuick/private/qsgtexture_p.h> | - |
| 42 | #include <QtGui/qopenglfunctions.h> | - |
| 43 | #include <QtGui/qsurface.h> | - |
| 44 | #include <QtGui/qwindow.h> | - |
| 45 | #include <qmath.h> | - |
| 46 | | - |
| 47 | QT_BEGIN_NAMESPACE | - |
| 48 | | - |
| 49 | class QSGDistanceFieldTextMaterialShader : public QSGMaterialShader | - |
| 50 | { | - |
| 51 | public: | - |
| 52 | QSGDistanceFieldTextMaterialShader(); | - |
| 53 | | - |
| 54 | void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override; | - |
| 55 | char const *const *attributeNames() const override; | - |
| 56 | | - |
| 57 | protected: | - |
| 58 | void initialize() override; | - |
| 59 | | - |
| 60 | void updateAlphaRange(); | - |
| 61 | void updateColor(const QVector4D &c); | - |
| 62 | void updateTextureScale(const QVector2D &ts); | - |
| 63 | | - |
| 64 | float m_fontScale = 1.0; | - |
| 65 | float m_matrixScale = 1.0; | - |
| 66 | | - |
| 67 | int m_matrix_id = -1; | - |
| 68 | int m_textureScale_id = -1; | - |
| 69 | int m_alphaMin_id = -1; | - |
| 70 | int m_alphaMax_id = -1; | - |
| 71 | int m_color_id = -1; | - |
| 72 | | - |
| 73 | QVector2D m_lastTextureScale; | - |
| 74 | QVector4D m_lastColor; | - |
| 75 | float m_lastAlphaMin = -1; | - |
| 76 | float m_lastAlphaMax = -1; | - |
| 77 | }; | - |
| 78 | | - |
| 79 | char const *const *QSGDistanceFieldTextMaterialShader::attributeNames() const { | - |
| 80 | static char const *const attr[] = { "vCoord", "tCoord", nullptr }; | - |
| 81 | return attr;executed 95811 times by 24 tests: return attr;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 95811 |
| 82 | } | - |
| 83 | | - |
| 84 | QSGDistanceFieldTextMaterialShader::QSGDistanceFieldTextMaterialShader() | - |
| 85 | { | - |
| 86 | setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldtext.vert"));executed 1543 times by 24 tests: return qstring_literal_temp;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1543 |
| 87 | setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldtext.frag"));executed 1543 times by 24 tests: return qstring_literal_temp;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1543 |
| 88 | }executed 1543 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1543 |
| 89 | | - |
| 90 | static float qt_sg_envFloat(const char *name, float defaultValue) | - |
| 91 | { | - |
| 92 | if (Q_LIKELY(!qEnvironmentVariableIsSet(name)))| TRUE | evaluated 240 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | never evaluated |
| 0-240 |
| 93 | return defaultValue;executed 240 times by 24 tests: return defaultValue;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 240 |
| 94 | bool ok = false; | - |
| 95 | const float value = qgetenv(name).toFloat(&ok); | - |
| 96 | return ok ? value : defaultValue; never executed: return ok ? value : defaultValue; | 0 |
| 97 | } | - |
| 98 | | - |
| 99 | static float thresholdFunc(float glyphScale) | - |
| 100 | { | - |
| 101 | static const float base = qt_sg_envFloat("QT_DF_BASE", 0.5f); | - |
| 102 | static const float baseDev = qt_sg_envFloat("QT_DF_BASEDEVIATION", 0.065f); | - |
| 103 | static const float devScaleMin = qt_sg_envFloat("QT_DF_SCALEFORMAXDEV", 0.15f); | - |
| 104 | static const float devScaleMax = qt_sg_envFloat("QT_DF_SCALEFORNODEV", 0.3f); | - |
| 105 | return base - ((qBound(devScaleMin, glyphScale, devScaleMax) - devScaleMin) / (devScaleMax - devScaleMin) * -baseDev + baseDev);executed 34196 times by 24 tests: return base - ((qBound(devScaleMin, glyphScale, devScaleMax) - devScaleMin) / (devScaleMax - devScaleMin) * -baseDev + baseDev);Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 34196 |
| 106 | } | - |
| 107 | | - |
| 108 | static float spreadFunc(float glyphScale) | - |
| 109 | { | - |
| 110 | static const float range = qt_sg_envFloat("QT_DF_RANGE", 0.06f); | - |
| 111 | return range / glyphScale;executed 34196 times by 24 tests: return range / glyphScale;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 34196 |
| 112 | } | - |
| 113 | | - |
| 114 | void QSGDistanceFieldTextMaterialShader::updateAlphaRange() | - |
| 115 | { | - |
| 116 | float combinedScale = m_fontScale * m_matrixScale; | - |
| 117 | float base = thresholdFunc(combinedScale); | - |
| 118 | float range = spreadFunc(combinedScale); | - |
| 119 | float alphaMin = qMax(0.0f, base - range); | - |
| 120 | float alphaMax = qMin(base + range, 1.0f); | - |
| 121 | if (alphaMin != m_lastAlphaMin) {| TRUE | evaluated 3295 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 30895 times by 23 testsEvaluated by:- tst_examples
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
| 3295-30895 |
| 122 | program()->setUniformValue(m_alphaMin_id, GLfloat(alphaMin)); | - |
| 123 | m_lastAlphaMin = alphaMin; | - |
| 124 | }executed 3295 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 3295 |
| 125 | if (alphaMax != m_lastAlphaMax) {| TRUE | evaluated 3301 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 30889 times by 23 testsEvaluated by:- tst_examples
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
| 3301-30889 |
| 126 | program()->setUniformValue(m_alphaMax_id, GLfloat(alphaMax)); | - |
| 127 | m_lastAlphaMax = alphaMax; | - |
| 128 | }executed 3301 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 3301 |
| 129 | }executed 34190 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 34190 |
| 130 | | - |
| 131 | void QSGDistanceFieldTextMaterialShader::updateColor(const QVector4D &c) | - |
| 132 | { | - |
| 133 | if (m_lastColor != c) {| TRUE | evaluated 2415 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 28040 times by 23 testsEvaluated by:- tst_examples
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
| 2415-28040 |
| 134 | program()->setUniformValue(m_color_id, c); | - |
| 135 | m_lastColor = c; | - |
| 136 | }executed 2415 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 2415 |
| 137 | }executed 30455 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 30455 |
| 138 | | - |
| 139 | void QSGDistanceFieldTextMaterialShader::updateTextureScale(const QVector2D &ts) | - |
| 140 | { | - |
| 141 | if (m_lastTextureScale != ts) {| TRUE | evaluated 2249 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 30841 times by 23 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
| 2249-30841 |
| 142 | program()->setUniformValue(m_textureScale_id, ts); | - |
| 143 | m_lastTextureScale = ts; | - |
| 144 | }executed 2249 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 2249 |
| 145 | }executed 33090 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 33090 |
| 146 | | - |
| 147 | void QSGDistanceFieldTextMaterialShader::initialize() | - |
| 148 | { | - |
| 149 | QSGMaterialShader::initialize(); | - |
| 150 | m_matrix_id = program()->uniformLocation("matrix"); | - |
| 151 | m_textureScale_id = program()->uniformLocation("textureScale"); | - |
| 152 | m_color_id = program()->uniformLocation("color"); | - |
| 153 | m_alphaMin_id = program()->uniformLocation("alphaMin"); | - |
| 154 | m_alphaMax_id = program()->uniformLocation("alphaMax"); | - |
| 155 | }executed 1543 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1543 |
| 156 | | - |
| 157 | void QSGDistanceFieldTextMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) | - |
| 158 | { | - |
| 159 | Q_ASSERT(oldEffect == nullptr || newEffect->type() == oldEffect->type()); | - |
| 160 | QSGDistanceFieldTextMaterial *material = static_cast<QSGDistanceFieldTextMaterial *>(newEffect); | - |
| 161 | QSGDistanceFieldTextMaterial *oldMaterial = static_cast<QSGDistanceFieldTextMaterial *>(oldEffect); | - |
| 162 | | - |
| 163 | bool updated = material->updateTextureSize(); | - |
| 164 | | - |
| 165 | if (oldMaterial == nullptr| TRUE | evaluated 30039 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 4151 times by 9 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktext
- tst_qquicktextedit
|
| 4151-30039 |
| 166 | || material->color() != oldMaterial->color()| TRUE | evaluated 412 times by 6 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickfocusscope
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktextedit
| | FALSE | evaluated 3739 times by 7 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickgridview
- tst_qquicklistview
- tst_qquicktext
- tst_qquicktextedit
|
| 412-3739 |
| 167 | || state.isOpacityDirty()) {| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 3735 times by 7 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickgridview
- tst_qquicklistview
- tst_qquicktext
- tst_qquicktextedit
|
| 4-3735 |
| 168 | QVector4D color = material->color(); | - |
| 169 | color *= state.opacity(); | - |
| 170 | updateColor(color); | - |
| 171 | }executed 30455 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 30455 |
| 172 | | - |
| 173 | bool updateRange = false; | - |
| 174 | if (oldMaterial == nullptr| TRUE | evaluated 30039 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 4151 times by 9 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktext
- tst_qquicktextedit
|
| 4151-30039 |
| 175 | || material->fontScale() != oldMaterial->fontScale()) {| TRUE | evaluated 1224 times by 8 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktextedit
| | FALSE | evaluated 2927 times by 6 testsEvaluated by:- tst_examples
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktext
- tst_qquicktextedit
|
| 1224-2927 |
| 176 | m_fontScale = material->fontScale(); | - |
| 177 | updateRange = true; | - |
| 178 | }executed 31263 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 31263 |
| 179 | if (state.isMatrixDirty()) {| TRUE | evaluated 34190 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | never evaluated |
| 0-34190 |
| 180 | program()->setUniformValue(m_matrix_id, state.combinedMatrix()); | - |
| 181 | m_matrixScale = qSqrt(qAbs(state.determinant())) * state.devicePixelRatio(); | - |
| 182 | updateRange = true; | - |
| 183 | }executed 34190 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 34190 |
| 184 | if (updateRange) {| TRUE | evaluated 34190 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | never evaluated |
| 0-34190 |
| 185 | updateAlphaRange(); | - |
| 186 | }executed 34190 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 34190 |
| 187 | | - |
| 188 | Q_ASSERT(material->glyphCache()); | - |
| 189 | | - |
| 190 | if (updated| TRUE | evaluated 10560 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 23630 times by 23 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
| 10560-23630 |
| 191 | || oldMaterial == nullptr| TRUE | evaluated 22526 times by 22 testsEvaluated by:- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 1104 times by 8 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktextedit
|
| 1104-22526 |
| 192 | || oldMaterial->texture()->textureId != material->texture()->textureId) {| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 1100 times by 8 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktextedit
|
| 4-1100 |
| 193 | updateTextureScale(QVector2D(1.0 / material->textureSize().width(), | - |
| 194 | 1.0 / material->textureSize().height())); | - |
| 195 | | - |
| 196 | QOpenGLFunctions *funcs = state.context()->functions(); | - |
| 197 | funcs->glBindTexture(GL_TEXTURE_2D, material->texture()->textureId); | - |
| 198 | | - |
| 199 | if (updated) {| TRUE | evaluated 10560 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 22530 times by 22 testsEvaluated by:- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
| 10560-22530 |
| 200 | | - |
| 201 | | - |
| 202 | funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); | - |
| 203 | funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | - |
| 204 | funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); | - |
| 205 | funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); | - |
| 206 | }executed 10560 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 10560 |
| 207 | }executed 33090 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 33090 |
| 208 | }executed 34190 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 34190 |
| 209 | | - |
| 210 | QSGDistanceFieldTextMaterial::QSGDistanceFieldTextMaterial() | - |
| 211 | : m_glyph_cache(nullptr) | - |
| 212 | , m_texture(nullptr) | - |
| 213 | , m_fontScale(1.0) | - |
| 214 | { | - |
| 215 | setFlag(Blending | RequiresDeterminant, true); | - |
| 216 | }executed 249131 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 249131 |
| 217 | | - |
| 218 | QSGDistanceFieldTextMaterial::~QSGDistanceFieldTextMaterial() | - |
| 219 | { | - |
| 220 | } | - |
| 221 | | - |
| 222 | QSGMaterialType *QSGDistanceFieldTextMaterial::type() const | - |
| 223 | { | - |
| 224 | static QSGMaterialType type; | - |
| 225 | return &type; never executed: return &type; | 0 |
| 226 | } | - |
| 227 | | - |
| 228 | void QSGDistanceFieldTextMaterial::setColor(const QColor &color) | - |
| 229 | { | - |
| 230 | m_color = QVector4D(color.redF() * color.alphaF(), | - |
| 231 | color.greenF() * color.alphaF(), | - |
| 232 | color.blueF() * color.alphaF(), | - |
| 233 | color.alphaF()); | - |
| 234 | }executed 34 times by 1 test: end of block | 34 |
| 235 | | - |
| 236 | QSGMaterialShader *QSGDistanceFieldTextMaterial::createShader() const | - |
| 237 | { | - |
| 238 | return new QSGDistanceFieldTextMaterialShader; never executed: return new QSGDistanceFieldTextMaterialShader; | 0 |
| 239 | } | - |
| 240 | | - |
| 241 | bool QSGDistanceFieldTextMaterial::updateTextureSize() | - |
| 242 | { | - |
| 243 | if (!m_texture)| TRUE | never evaluated | | FALSE | evaluated 34190 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
| 0-34190 |
| 244 | m_texture = m_glyph_cache->glyphTexture(0); never executed: m_texture = m_glyph_cache->glyphTexture(0); | 0 |
| 245 | | - |
| 246 | if (m_texture->size != m_size) {| TRUE | evaluated 10560 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 23630 times by 23 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
| 10560-23630 |
| 247 | m_size = m_texture->size; | - |
| 248 | return true;executed 10560 times by 24 tests: return true;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 10560 |
| 249 | } else { | - |
| 250 | return false;executed 23630 times by 23 tests: return false;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 23630 |
| 251 | } | - |
| 252 | } | - |
| 253 | | - |
| 254 | int QSGDistanceFieldTextMaterial::compare(const QSGMaterial *o) const | - |
| 255 | { | - |
| 256 | Q_ASSERT(o && type() == o->type()); | - |
| 257 | const QSGDistanceFieldTextMaterial *other = static_cast<const QSGDistanceFieldTextMaterial *>(o); | - |
| 258 | if (m_glyph_cache != other->m_glyph_cache)| TRUE | evaluated 389 times by 3 testsEvaluated by:- tst_examples
- tst_qquickpathview
- tst_qquicktext
| | FALSE | evaluated 515555 times by 17 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktextedit
- tst_qquicktextinput
- tst_touchmouse
|
| 389-515555 |
| 259 | return m_glyph_cache - other->m_glyph_cache;executed 389 times by 3 tests: return m_glyph_cache - other->m_glyph_cache;Executed by:- tst_examples
- tst_qquickpathview
- tst_qquicktext
| 389 |
| 260 | if (m_fontScale != other->m_fontScale) {| TRUE | evaluated 3577 times by 7 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquicktextedit
| | FALSE | evaluated 511978 times by 17 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktextedit
- tst_qquicktextinput
- tst_touchmouse
|
| 3577-511978 |
| 261 | return int(other->m_fontScale < m_fontScale) - int(m_fontScale < other->m_fontScale);executed 3577 times by 7 tests: return int(other->m_fontScale < m_fontScale) - int(m_fontScale < other->m_fontScale);Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquicktextedit
| 3577 |
| 262 | } | - |
| 263 | if (m_color != other->m_color)| TRUE | evaluated 120 times by 4 testsEvaluated by:- tst_examples
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktextedit
| | FALSE | evaluated 511858 times by 17 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktextedit
- tst_qquicktextinput
- tst_touchmouse
|
| 120-511858 |
| 264 | return &m_color < &other->m_color ? -1 : 1;executed 120 times by 4 tests: return &m_color < &other->m_color ? -1 : 1;Executed by:- tst_examples
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktextedit
| 120 |
| 265 | int t0 = m_texture ? m_texture->textureId : 0;| TRUE | evaluated 511858 times by 17 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktextedit
- tst_qquicktextinput
- tst_touchmouse
| | FALSE | never evaluated |
| 0-511858 |
| 266 | int t1 = other->m_texture ? other->m_texture->textureId : 0;| TRUE | evaluated 511858 times by 17 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktextedit
- tst_qquicktextinput
- tst_touchmouse
| | FALSE | never evaluated |
| 0-511858 |
| 267 | return t0 - t1;executed 511858 times by 17 tests: return t0 - t1;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktextedit
- tst_qquicktextinput
- tst_touchmouse
| 511858 |
| 268 | } | - |
| 269 | | - |
| 270 | | - |
| 271 | class DistanceFieldStyledTextMaterialShader : public QSGDistanceFieldTextMaterialShader | - |
| 272 | { | - |
| 273 | public: | - |
| 274 | DistanceFieldStyledTextMaterialShader(); | - |
| 275 | | - |
| 276 | void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override; | - |
| 277 | | - |
| 278 | protected: | - |
| 279 | void initialize() override; | - |
| 280 | | - |
| 281 | int m_styleColor_id = -1; | - |
| 282 | }; | - |
| 283 | | - |
| 284 | DistanceFieldStyledTextMaterialShader::DistanceFieldStyledTextMaterialShader() | - |
| 285 | : QSGDistanceFieldTextMaterialShader() | - |
| 286 | { | - |
| 287 | }executed 8 times by 1 test: end of block | 8 |
| 288 | | - |
| 289 | void DistanceFieldStyledTextMaterialShader::initialize() | - |
| 290 | { | - |
| 291 | QSGDistanceFieldTextMaterialShader::initialize(); | - |
| 292 | m_styleColor_id = program()->uniformLocation("styleColor"); | - |
| 293 | }executed 8 times by 1 test: end of block | 8 |
| 294 | | - |
| 295 | void DistanceFieldStyledTextMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) | - |
| 296 | { | - |
| 297 | QSGDistanceFieldTextMaterialShader::updateState(state, newEffect, oldEffect); | - |
| 298 | | - |
| 299 | QSGDistanceFieldStyledTextMaterial *material = static_cast<QSGDistanceFieldStyledTextMaterial *>(newEffect); | - |
| 300 | QSGDistanceFieldStyledTextMaterial *oldMaterial = static_cast<QSGDistanceFieldStyledTextMaterial *>(oldEffect); | - |
| 301 | | - |
| 302 | if (oldMaterial == nullptr| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 2 times by 1 test |
| 2-16 |
| 303 | || material->styleColor() != oldMaterial->styleColor()| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
| 0-2 |
| 304 | || (state.isOpacityDirty())) {| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
| 0-2 |
| 305 | QVector4D color = material->styleColor(); | - |
| 306 | color *= state.opacity(); | - |
| 307 | program()->setUniformValue(m_styleColor_id, color); | - |
| 308 | }executed 16 times by 1 test: end of block | 16 |
| 309 | }executed 18 times by 1 test: end of block | 18 |
| 310 | | - |
| 311 | QSGDistanceFieldStyledTextMaterial::QSGDistanceFieldStyledTextMaterial() | - |
| 312 | : QSGDistanceFieldTextMaterial() | - |
| 313 | { | - |
| 314 | }executed 34 times by 1 test: end of block | 34 |
| 315 | | - |
| 316 | QSGDistanceFieldStyledTextMaterial::~QSGDistanceFieldStyledTextMaterial() | - |
| 317 | { | - |
| 318 | } | - |
| 319 | | - |
| 320 | void QSGDistanceFieldStyledTextMaterial::setStyleColor(const QColor &color) | - |
| 321 | { | - |
| 322 | m_styleColor = QVector4D(color.redF() * color.alphaF(), | - |
| 323 | color.greenF() * color.alphaF(), | - |
| 324 | color.blueF() * color.alphaF(), | - |
| 325 | color.alphaF()); | - |
| 326 | }executed 34 times by 1 test: end of block | 34 |
| 327 | | - |
| 328 | int QSGDistanceFieldStyledTextMaterial::compare(const QSGMaterial *o) const | - |
| 329 | { | - |
| 330 | Q_ASSERT(o && type() == o->type()); | - |
| 331 | const QSGDistanceFieldStyledTextMaterial *other = static_cast<const QSGDistanceFieldStyledTextMaterial *>(o); | - |
| 332 | if (m_styleColor != other->m_styleColor)| TRUE | never evaluated | | FALSE | evaluated 22 times by 1 test |
| 0-22 |
| 333 | return &m_styleColor < &other->m_styleColor ? -1 : 1; never executed: return &m_styleColor < &other->m_styleColor ? -1 : 1; | 0 |
| 334 | return QSGDistanceFieldTextMaterial::compare(o);executed 22 times by 1 test: return QSGDistanceFieldTextMaterial::compare(o); | 22 |
| 335 | } | - |
| 336 | | - |
| 337 | | - |
| 338 | class DistanceFieldOutlineTextMaterialShader : public DistanceFieldStyledTextMaterialShader | - |
| 339 | { | - |
| 340 | public: | - |
| 341 | DistanceFieldOutlineTextMaterialShader(); | - |
| 342 | | - |
| 343 | void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override; | - |
| 344 | | - |
| 345 | protected: | - |
| 346 | void initialize() override; | - |
| 347 | | - |
| 348 | void updateOutlineAlphaRange(int dfRadius); | - |
| 349 | | - |
| 350 | int m_outlineAlphaMax0_id = -1; | - |
| 351 | int m_outlineAlphaMax1_id = -1; | - |
| 352 | }; | - |
| 353 | | - |
| 354 | DistanceFieldOutlineTextMaterialShader::DistanceFieldOutlineTextMaterialShader() | - |
| 355 | : DistanceFieldStyledTextMaterialShader() | - |
| 356 | { | - |
| 357 | setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldoutlinetext.frag"));executed 4 times by 1 test: return qstring_literal_temp; | 4 |
| 358 | }executed 4 times by 1 test: end of block | 4 |
| 359 | | - |
| 360 | void DistanceFieldOutlineTextMaterialShader::initialize() | - |
| 361 | { | - |
| 362 | DistanceFieldStyledTextMaterialShader::initialize(); | - |
| 363 | m_outlineAlphaMax0_id = program()->uniformLocation("outlineAlphaMax0"); | - |
| 364 | m_outlineAlphaMax1_id = program()->uniformLocation("outlineAlphaMax1"); | - |
| 365 | }executed 4 times by 1 test: end of block | 4 |
| 366 | | - |
| 367 | void DistanceFieldOutlineTextMaterialShader::updateOutlineAlphaRange(int dfRadius) | - |
| 368 | { | - |
| 369 | float combinedScale = m_fontScale * m_matrixScale; | - |
| 370 | float base = thresholdFunc(combinedScale); | - |
| 371 | float range = spreadFunc(combinedScale); | - |
| 372 | float outlineLimit = qMax(0.2f, base - 0.5f / dfRadius / m_fontScale); | - |
| 373 | | - |
| 374 | float alphaMin = qMax(0.0f, base - range); | - |
| 375 | float styleAlphaMin0 = qMax(0.0f, outlineLimit - range); | - |
| 376 | float styleAlphaMin1 = qMin(outlineLimit + range, alphaMin); | - |
| 377 | program()->setUniformValue(m_outlineAlphaMax0_id, GLfloat(styleAlphaMin0)); | - |
| 378 | program()->setUniformValue(m_outlineAlphaMax1_id, GLfloat(styleAlphaMin1)); | - |
| 379 | }executed 6 times by 1 test: end of block | 6 |
| 380 | | - |
| 381 | void DistanceFieldOutlineTextMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) | - |
| 382 | { | - |
| 383 | DistanceFieldStyledTextMaterialShader::updateState(state, newEffect, oldEffect); | - |
| 384 | | - |
| 385 | QSGDistanceFieldOutlineTextMaterial *material = static_cast<QSGDistanceFieldOutlineTextMaterial *>(newEffect); | - |
| 386 | QSGDistanceFieldOutlineTextMaterial *oldMaterial = static_cast<QSGDistanceFieldOutlineTextMaterial *>(oldEffect); | - |
| 387 | | - |
| 388 | if (oldMaterial == nullptr| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 2 times by 1 test |
| 2-4 |
| 389 | || material->fontScale() != oldMaterial->fontScale()| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
| 0-2 |
| 390 | || state.isMatrixDirty())| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 391 | updateOutlineAlphaRange(material->glyphCache()->distanceFieldRadius());executed 6 times by 1 test: updateOutlineAlphaRange(material->glyphCache()->distanceFieldRadius()); | 6 |
| 392 | }executed 6 times by 1 test: end of block | 6 |
| 393 | | - |
| 394 | | - |
| 395 | QSGDistanceFieldOutlineTextMaterial::QSGDistanceFieldOutlineTextMaterial() | - |
| 396 | : QSGDistanceFieldStyledTextMaterial() | - |
| 397 | { | - |
| 398 | }executed 8 times by 1 test: end of block | 8 |
| 399 | | - |
| 400 | QSGDistanceFieldOutlineTextMaterial::~QSGDistanceFieldOutlineTextMaterial() | - |
| 401 | { | - |
| 402 | } | - |
| 403 | | - |
| 404 | QSGMaterialType *QSGDistanceFieldOutlineTextMaterial::type() const | - |
| 405 | { | - |
| 406 | static QSGMaterialType type; | - |
| 407 | return &type;executed 28 times by 1 test: return &type; | 28 |
| 408 | } | - |
| 409 | | - |
| 410 | QSGMaterialShader *QSGDistanceFieldOutlineTextMaterial::createShader() const | - |
| 411 | { | - |
| 412 | return new DistanceFieldOutlineTextMaterialShader;executed 4 times by 1 test: return new DistanceFieldOutlineTextMaterialShader; | 4 |
| 413 | } | - |
| 414 | | - |
| 415 | | - |
| 416 | class DistanceFieldShiftedStyleTextMaterialShader : public DistanceFieldStyledTextMaterialShader | - |
| 417 | { | - |
| 418 | public: | - |
| 419 | DistanceFieldShiftedStyleTextMaterialShader(); | - |
| 420 | | - |
| 421 | void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override; | - |
| 422 | | - |
| 423 | protected: | - |
| 424 | void initialize() override; | - |
| 425 | | - |
| 426 | void updateShift(qreal fontScale, const QPointF& shift); | - |
| 427 | | - |
| 428 | int m_shift_id = -1; | - |
| 429 | }; | - |
| 430 | | - |
| 431 | DistanceFieldShiftedStyleTextMaterialShader::DistanceFieldShiftedStyleTextMaterialShader() | - |
| 432 | : DistanceFieldStyledTextMaterialShader() | - |
| 433 | { | - |
| 434 | setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldshiftedtext.vert"));executed 4 times by 1 test: return qstring_literal_temp; | 4 |
| 435 | setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldshiftedtext.frag"));executed 4 times by 1 test: return qstring_literal_temp; | 4 |
| 436 | }executed 4 times by 1 test: end of block | 4 |
| 437 | | - |
| 438 | void DistanceFieldShiftedStyleTextMaterialShader::initialize() | - |
| 439 | { | - |
| 440 | DistanceFieldStyledTextMaterialShader::initialize(); | - |
| 441 | m_shift_id = program()->uniformLocation("shift"); | - |
| 442 | }executed 4 times by 1 test: end of block | 4 |
| 443 | | - |
| 444 | void DistanceFieldShiftedStyleTextMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) | - |
| 445 | { | - |
| 446 | DistanceFieldStyledTextMaterialShader::updateState(state, newEffect, oldEffect); | - |
| 447 | | - |
| 448 | QSGDistanceFieldShiftedStyleTextMaterial *material = static_cast<QSGDistanceFieldShiftedStyleTextMaterial *>(newEffect); | - |
| 449 | QSGDistanceFieldShiftedStyleTextMaterial *oldMaterial = static_cast<QSGDistanceFieldShiftedStyleTextMaterial *>(oldEffect); | - |
| 450 | | - |
| 451 | if (oldMaterial == nullptr| TRUE | evaluated 12 times by 1 test | | FALSE | never evaluated |
| 0-12 |
| 452 | || oldMaterial->fontScale() != material->fontScale()| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 453 | || oldMaterial->shift() != material->shift()| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 454 | || oldMaterial->textureSize() != material->textureSize()) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 455 | updateShift(material->fontScale(), material->shift()); | - |
| 456 | }executed 12 times by 1 test: end of block | 12 |
| 457 | }executed 12 times by 1 test: end of block | 12 |
| 458 | | - |
| 459 | void DistanceFieldShiftedStyleTextMaterialShader::updateShift(qreal fontScale, const QPointF &shift) | - |
| 460 | { | - |
| 461 | QPointF texel(1.0 / fontScale * shift.x(), | - |
| 462 | 1.0 / fontScale * shift.y()); | - |
| 463 | program()->setUniformValue(m_shift_id, texel); | - |
| 464 | }executed 12 times by 1 test: end of block | 12 |
| 465 | | - |
| 466 | QSGDistanceFieldShiftedStyleTextMaterial::QSGDistanceFieldShiftedStyleTextMaterial() | - |
| 467 | : QSGDistanceFieldStyledTextMaterial() | - |
| 468 | { | - |
| 469 | }executed 26 times by 1 test: end of block | 26 |
| 470 | | - |
| 471 | QSGDistanceFieldShiftedStyleTextMaterial::~QSGDistanceFieldShiftedStyleTextMaterial() | - |
| 472 | { | - |
| 473 | } | - |
| 474 | | - |
| 475 | QSGMaterialType *QSGDistanceFieldShiftedStyleTextMaterial::type() const | - |
| 476 | { | - |
| 477 | static QSGMaterialType type; | - |
| 478 | return &type;executed 198 times by 1 test: return &type; | 198 |
| 479 | } | - |
| 480 | | - |
| 481 | QSGMaterialShader *QSGDistanceFieldShiftedStyleTextMaterial::createShader() const | - |
| 482 | { | - |
| 483 | return new DistanceFieldShiftedStyleTextMaterialShader;executed 4 times by 1 test: return new DistanceFieldShiftedStyleTextMaterialShader; | 4 |
| 484 | } | - |
| 485 | | - |
| 486 | int QSGDistanceFieldShiftedStyleTextMaterial::compare(const QSGMaterial *o) const | - |
| 487 | { | - |
| 488 | const QSGDistanceFieldShiftedStyleTextMaterial *other = static_cast<const QSGDistanceFieldShiftedStyleTextMaterial *>(o); | - |
| 489 | if (m_shift != other->m_shift)| TRUE | never evaluated | | FALSE | evaluated 20 times by 1 test |
| 0-20 |
| 490 | return &m_shift < &other->m_shift ? -1 : 1; never executed: return &m_shift < &other->m_shift ? -1 : 1; | 0 |
| 491 | return QSGDistanceFieldStyledTextMaterial::compare(o);executed 20 times by 1 test: return QSGDistanceFieldStyledTextMaterial::compare(o); | 20 |
| 492 | } | - |
| 493 | | - |
| 494 | class QSGHiQSubPixelDistanceFieldTextMaterialShader : public QSGDistanceFieldTextMaterialShader | - |
| 495 | { | - |
| 496 | public: | - |
| 497 | QSGHiQSubPixelDistanceFieldTextMaterialShader(); | - |
| 498 | | - |
| 499 | void initialize() override; | - |
| 500 | void activate() override; | - |
| 501 | void deactivate() override; | - |
| 502 | void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override; | - |
| 503 | | - |
| 504 | private: | - |
| 505 | int m_fontScale_id = -1; | - |
| 506 | int m_vecDelta_id = -1; | - |
| 507 | }; | - |
| 508 | | - |
| 509 | QSGHiQSubPixelDistanceFieldTextMaterialShader::QSGHiQSubPixelDistanceFieldTextMaterialShader() | - |
| 510 | : QSGDistanceFieldTextMaterialShader() | - |
| 511 | { | - |
| 512 | setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/hiqsubpixeldistancefieldtext.vert"));executed 1535 times by 24 tests: return qstring_literal_temp;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1535 |
| 513 | setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/hiqsubpixeldistancefieldtext.frag"));executed 1535 times by 24 tests: return qstring_literal_temp;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1535 |
| 514 | }executed 1535 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1535 |
| 515 | | - |
| 516 | void QSGHiQSubPixelDistanceFieldTextMaterialShader::initialize() | - |
| 517 | { | - |
| 518 | QSGDistanceFieldTextMaterialShader::initialize(); | - |
| 519 | m_fontScale_id = program()->uniformLocation("fontScale"); | - |
| 520 | m_vecDelta_id = program()->uniformLocation("vecDelta"); | - |
| 521 | }executed 1535 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1535 |
| 522 | | - |
| 523 | void QSGHiQSubPixelDistanceFieldTextMaterialShader::activate() | - |
| 524 | { | - |
| 525 | QSGDistanceFieldTextMaterialShader::activate(); | - |
| 526 | QOpenGLContext::currentContext()->functions()->glBlendFunc(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_COLOR); | - |
| 527 | }executed 30023 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 30023 |
| 528 | | - |
| 529 | void QSGHiQSubPixelDistanceFieldTextMaterialShader::deactivate() | - |
| 530 | { | - |
| 531 | QSGDistanceFieldTextMaterialShader::deactivate(); | - |
| 532 | QOpenGLContext::currentContext()->functions()->glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); | - |
| 533 | }executed 30023 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 30023 |
| 534 | | - |
| 535 | void QSGHiQSubPixelDistanceFieldTextMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) | - |
| 536 | { | - |
| 537 | Q_ASSERT(oldEffect == nullptr || newEffect->type() == oldEffect->type()); | - |
| 538 | QSGDistanceFieldTextMaterial *material = static_cast<QSGDistanceFieldTextMaterial *>(newEffect); | - |
| 539 | QSGDistanceFieldTextMaterial *oldMaterial = static_cast<QSGDistanceFieldTextMaterial *>(oldEffect); | - |
| 540 | | - |
| 541 | if (oldMaterial == nullptr || material->color() != oldMaterial->color()) {| TRUE | evaluated 30023 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 4149 times by 9 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktext
- tst_qquicktextedit
|
| TRUE | evaluated 412 times by 6 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickfocusscope
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktextedit
| | FALSE | evaluated 3737 times by 7 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickgridview
- tst_qquicklistview
- tst_qquicktext
- tst_qquicktextedit
|
| 412-30023 |
| 542 | QVector4D c = material->color(); | - |
| 543 | state.context()->functions()->glBlendColor(c.x(), c.y(), c.z(), 1.0f); | - |
| 544 | }executed 30435 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 30435 |
| 545 | | - |
| 546 | if (oldMaterial == nullptr || material->fontScale() != oldMaterial->fontScale())| TRUE | evaluated 30023 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 4149 times by 9 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktext
- tst_qquicktextedit
|
| TRUE | evaluated 1222 times by 8 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktextedit
| | FALSE | evaluated 2927 times by 6 testsEvaluated by:- tst_examples
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktext
- tst_qquicktextedit
|
| 1222-30023 |
| 547 | program()->setUniformValue(m_fontScale_id, GLfloat(material->fontScale()));executed 31245 times by 24 tests: program()->setUniformValue(m_fontScale_id, GLfloat(material->fontScale()));Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 31245 |
| 548 | | - |
| 549 | if (oldMaterial == nullptr || state.isMatrixDirty()) {| TRUE | evaluated 30023 times by 24 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| | FALSE | evaluated 4149 times by 9 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktext
- tst_qquicktextedit
|
| TRUE | evaluated 4149 times by 9 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickgridview
- tst_qquicklistview
- tst_qquickpathview
- tst_qquicktext
- tst_qquicktextedit
| | FALSE | never evaluated |
| 0-30023 |
| 550 | int viewportWidth = state.viewportRect().width(); | - |
| 551 | QMatrix4x4 mat = state.combinedMatrix().inverted(); | - |
| 552 | program()->setUniformValue(m_vecDelta_id, mat.column(0) * (qreal(2) / viewportWidth)); | - |
| 553 | }executed 34172 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 34172 |
| 554 | | - |
| 555 | QSGDistanceFieldTextMaterialShader::updateState(state, newEffect, oldEffect); | - |
| 556 | }executed 34172 times by 24 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 34172 |
| 557 | | - |
| 558 | QSGMaterialType *QSGHiQSubPixelDistanceFieldTextMaterial::type() const | - |
| 559 | { | - |
| 560 | static QSGMaterialType type; | - |
| 561 | return &type;executed 2114412 times by 24 tests: return &type;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 2114412 |
| 562 | } | - |
| 563 | | - |
| 564 | QSGMaterialShader *QSGHiQSubPixelDistanceFieldTextMaterial::createShader() const | - |
| 565 | { | - |
| 566 | return new QSGHiQSubPixelDistanceFieldTextMaterialShader;executed 1535 times by 24 tests: return new QSGHiQSubPixelDistanceFieldTextMaterialShader;Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpincharea
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1535 |
| 567 | } | - |
| 568 | | - |
| 569 | | - |
| 570 | class QSGLoQSubPixelDistanceFieldTextMaterialShader : public QSGHiQSubPixelDistanceFieldTextMaterialShader | - |
| 571 | { | - |
| 572 | public: | - |
| 573 | QSGLoQSubPixelDistanceFieldTextMaterialShader(); | - |
| 574 | }; | - |
| 575 | | - |
| 576 | QSGLoQSubPixelDistanceFieldTextMaterialShader::QSGLoQSubPixelDistanceFieldTextMaterialShader() | - |
| 577 | : QSGHiQSubPixelDistanceFieldTextMaterialShader() | - |
| 578 | { | - |
| 579 | setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/loqsubpixeldistancefieldtext.vert")); never executed: return qstring_literal_temp; | 0 |
| 580 | setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/loqsubpixeldistancefieldtext.frag")); never executed: return qstring_literal_temp; | 0 |
| 581 | } never executed: end of block | 0 |
| 582 | | - |
| 583 | QSGMaterialType *QSGLoQSubPixelDistanceFieldTextMaterial::type() const | - |
| 584 | { | - |
| 585 | static QSGMaterialType type; | - |
| 586 | return &type; never executed: return &type; | 0 |
| 587 | } | - |
| 588 | | - |
| 589 | QSGMaterialShader *QSGLoQSubPixelDistanceFieldTextMaterial::createShader() const | - |
| 590 | { | - |
| 591 | return new QSGLoQSubPixelDistanceFieldTextMaterialShader; never executed: return new QSGLoQSubPixelDistanceFieldTextMaterialShader; | 0 |
| 592 | } | - |
| 593 | | - |
| 594 | QT_END_NAMESPACE | - |
| | |