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 "qsgadaptationlayer_p.h" | - |
41 | | - |
42 | #include <qmath.h> | - |
43 | #include <QtQuick/private/qsgdistancefieldglyphnode_p.h> | - |
44 | #include <QtQuick/private/qsgcontext_p.h> | - |
45 | #include <private/qrawfont_p.h> | - |
46 | #include <QtGui/qguiapplication.h> | - |
47 | #include <qdir.h> | - |
48 | #include <qsgrendernode.h> | - |
49 | | - |
50 | #include <private/qquickprofiler_p.h> | - |
51 | #include <QElapsedTimer> | - |
52 | | - |
53 | QT_BEGIN_NAMESPACE | - |
54 | | - |
55 | static QElapsedTimer qsg_render_timer; | - |
56 | | - |
57 | QSGDistanceFieldGlyphCache::Texture QSGDistanceFieldGlyphCache::s_emptyTexture; | - |
58 | | - |
59 | QSGDistanceFieldGlyphCache::QSGDistanceFieldGlyphCache(QOpenGLContext *c, const QRawFont &font) | - |
60 | : m_pendingGlyphs(64) | - |
61 | { | - |
62 | Q_ASSERT(font.isValid()); | - |
63 | | - |
64 | QRawFontPrivate *fontD = QRawFontPrivate::get(font); | - |
65 | m_glyphCount = fontD->fontEngine->glyphCount(); | - |
66 | | - |
67 | m_doubleGlyphResolution = qt_fontHasNarrowOutlines(font) && m_glyphCount < QT_DISTANCEFIELD_HIGHGLYPHCOUNT();TRUE | evaluated 2 times by 1 test | FALSE | evaluated 1620 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
|
TRUE | evaluated 2 times by 1 test | FALSE | never evaluated |
| 0-1620 |
68 | | - |
69 | m_referenceFont = font; | - |
70 | | - |
71 | | - |
72 | m_referenceFont.setPixelSize(QT_DISTANCEFIELD_BASEFONTSIZE(m_doubleGlyphResolution) * QT_DISTANCEFIELD_SCALE(m_doubleGlyphResolution)); | - |
73 | Q_ASSERT(m_referenceFont.isValid()); | - |
74 | #if QT_CONFIG(opengl) | - |
75 | m_coreProfile = (c->format().profile() == QSurfaceFormat::CoreProfile); | - |
76 | #else | - |
77 | Q_UNUSED(c) | - |
78 | #endif | - |
79 | }executed 1622 times by 24 tests: end of block 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
| 1622 |
80 | | - |
81 | QSGDistanceFieldGlyphCache::~QSGDistanceFieldGlyphCache() | - |
82 | { | - |
83 | } | - |
84 | | - |
85 | QSGDistanceFieldGlyphCache::GlyphData &QSGDistanceFieldGlyphCache::glyphData(glyph_t glyph) | - |
86 | { | - |
87 | QHash<glyph_t, GlyphData>::iterator data = m_glyphsData.find(glyph); | - |
88 | if (data == m_glyphsData.end()) {TRUE | evaluated 29791 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 6701665 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
|
| 29791-6701665 |
89 | GlyphData gd; | - |
90 | gd.texture = &s_emptyTexture; | - |
91 | gd.path = m_referenceFont.pathForGlyph(glyph); | - |
92 | | - |
93 | qreal scaleFactor = qreal(1) / QT_DISTANCEFIELD_SCALE(m_doubleGlyphResolution); | - |
94 | QTransform scaleDown; | - |
95 | scaleDown.scale(scaleFactor, scaleFactor); | - |
96 | gd.boundingRect = scaleDown.mapRect(gd.path.boundingRect()); | - |
97 | data = m_glyphsData.insert(glyph, gd); | - |
98 | }executed 29791 times by 24 tests: end of block 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
| 29791 |
99 | return data.value();executed 6731456 times by 24 tests: return data.value(); 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
| 6731456 |
100 | } | - |
101 | | - |
102 | QSGDistanceFieldGlyphCache::Metrics QSGDistanceFieldGlyphCache::glyphMetrics(glyph_t glyph, qreal pixelSize) | - |
103 | { | - |
104 | GlyphData &gd = glyphData(glyph); | - |
105 | qreal scale = fontScale(pixelSize); | - |
106 | | - |
107 | Metrics m; | - |
108 | m.width = gd.boundingRect.width() * scale; | - |
109 | m.height = gd.boundingRect.height() * scale; | - |
110 | m.baselineX = gd.boundingRect.x() * scale; | - |
111 | m.baselineY = -gd.boundingRect.y() * scale; | - |
112 | | - |
113 | return m;executed 1248153 times by 24 tests: return m; 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
| 1248153 |
114 | } | - |
115 | | - |
116 | void QSGDistanceFieldGlyphCache::populate(const QVector<glyph_t> &glyphs) | - |
117 | { | - |
118 | QSet<glyph_t> referencedGlyphs; | - |
119 | QSet<glyph_t> newGlyphs; | - |
120 | int count = glyphs.count(); | - |
121 | for (int i = 0; i < count; ++i) {TRUE | evaluated 1379907 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 249131 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
|
| 249131-1379907 |
122 | glyph_t glyphIndex = glyphs.at(i); | - |
123 | if ((int) glyphIndex >= glyphCount() && glyphCount() > 0) {TRUE | never evaluated | FALSE | evaluated 1379907 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
|
TRUE | never evaluated | FALSE | never evaluated |
| 0-1379907 |
124 | qWarning("Warning: distance-field glyph is not available with index %d", glyphIndex); | - |
125 | continue; never executed: continue; | 0 |
126 | } | - |
127 | | - |
128 | GlyphData &gd = glyphData(glyphIndex); | - |
129 | ++gd.ref; | - |
130 | referencedGlyphs.insert(glyphIndex); | - |
131 | | - |
132 | if (gd.texCoord.isValid() || m_populatingGlyphs.contains(glyphIndex))TRUE | evaluated 1339810 times by 18 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_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| FALSE | evaluated 40097 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
|
TRUE | evaluated 10306 times by 20 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| FALSE | evaluated 29791 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
|
| 10306-1339810 |
133 | continue;executed 1350116 times by 21 tests: continue; Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 1350116 |
134 | | - |
135 | m_populatingGlyphs.insert(glyphIndex); | - |
136 | | - |
137 | if (gd.boundingRect.isEmpty()) {TRUE | evaluated 979 times by 18 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| FALSE | evaluated 28812 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
|
| 979-28812 |
138 | gd.texCoord.width = 0; | - |
139 | gd.texCoord.height = 0; | - |
140 | } else {executed 979 times by 18 tests: end of block Executed by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
| 979 |
141 | newGlyphs.insert(glyphIndex); | - |
142 | }executed 28812 times by 24 tests: end of block 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
| 28812 |
143 | } | - |
144 | | - |
145 | referenceGlyphs(referencedGlyphs); | - |
146 | if (!newGlyphs.isEmpty())TRUE | evaluated 9494 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 239637 times by 16 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
|
| 9494-239637 |
147 | requestGlyphs(newGlyphs);executed 9494 times by 24 tests: requestGlyphs(newGlyphs); 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
| 9494 |
148 | }executed 249131 times by 24 tests: end of block 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
| 249131 |
149 | | - |
150 | void QSGDistanceFieldGlyphCache::release(const QVector<glyph_t> &glyphs) | - |
151 | { | - |
152 | QSet<glyph_t> unusedGlyphs; | - |
153 | int count = glyphs.count(); | - |
154 | for (int i = 0; i < count; ++i) {TRUE | evaluated 1379907 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 249131 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
|
| 249131-1379907 |
155 | glyph_t glyphIndex = glyphs.at(i); | - |
156 | GlyphData &gd = glyphData(glyphIndex); | - |
157 | if (--gd.ref == 0 && !gd.texCoord.isNull())TRUE | evaluated 105227 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 1274680 times by 21 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickflickable
- tst_qquickfocusscope
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickspringanimation
- tst_qquicktaphandler
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
TRUE | evaluated 101390 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 3837 times by 18 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickfocusscope
- tst_qquickfontloader_static
- tst_qquickgridview
- tst_qquickitem
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
- tst_touchmouse
|
| 3837-1274680 |
158 | unusedGlyphs.insert(glyphIndex);executed 101390 times by 24 tests: unusedGlyphs.insert(glyphIndex); 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
| 101390 |
159 | }executed 1379907 times by 24 tests: end of block 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
| 1379907 |
160 | releaseGlyphs(unusedGlyphs); | - |
161 | }executed 249131 times by 24 tests: end of block 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
| 249131 |
162 | | - |
163 | void QSGDistanceFieldGlyphCache::update() | - |
164 | { | - |
165 | m_populatingGlyphs.clear(); | - |
166 | | - |
167 | if (m_pendingGlyphs.isEmpty())TRUE | evaluated 727386 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 2343 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
|
| 2343-727386 |
168 | return;executed 727386 times by 24 tests: return; 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
| 727386 |
169 | | - |
170 | bool profileFrames = QSG_LOG_TIME_GLYPH().isDebugEnabled(); | - |
171 | if (profileFrames)TRUE | never evaluated | FALSE | evaluated 2343 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-2343 |
172 | qsg_render_timer.start(); never executed: qsg_render_timer.start(); | 0 |
173 | Q_QUICK_SG_PROFILE_START(QQuickProfiler::SceneGraphAdaptationLayerFrame); never executed: end of block executed 2343 times by 24 tests: (void)0; 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
TRUE | never evaluated | FALSE | evaluated 2343 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-2343 |
174 | | - |
175 | QList<QDistanceField> distanceFields; | - |
176 | const int pendingGlyphsSize = m_pendingGlyphs.size(); | - |
177 | distanceFields.reserve(pendingGlyphsSize); | - |
178 | for (int i = 0; i < pendingGlyphsSize; ++i) {TRUE | evaluated 28568 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 2343 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
|
| 2343-28568 |
179 | GlyphData &gd = glyphData(m_pendingGlyphs.at(i)); | - |
180 | distanceFields.append(QDistanceField(gd.path, | - |
181 | m_pendingGlyphs.at(i), | - |
182 | m_doubleGlyphResolution)); | - |
183 | gd.path = QPainterPath(); | - |
184 | }executed 28568 times by 24 tests: end of block 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
| 28568 |
185 | | - |
186 | qint64 renderTime = 0; | - |
187 | int count = m_pendingGlyphs.size(); | - |
188 | if (profileFrames)TRUE | never evaluated | FALSE | evaluated 2343 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-2343 |
189 | renderTime = qsg_render_timer.nsecsElapsed(); never executed: renderTime = qsg_render_timer.nsecsElapsed(); | 0 |
190 | Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphAdaptationLayerFrame, never executed: end of block executed 2343 times by 24 tests: (void)0 ; 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
TRUE | never evaluated | FALSE | evaluated 2343 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-2343 |
191 | QQuickProfiler::SceneGraphAdaptationLayerGlyphRender);executed 2343 times by 24 tests: (void)0 ; 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
| 2343 |
192 | | - |
193 | m_pendingGlyphs.reset(); | - |
194 | | - |
195 | storeGlyphs(distanceFields); | - |
196 | | - |
197 | #if defined(QSG_DISTANCEFIELD_CACHE_DEBUG) | - |
198 | for (Texture texture : qAsConst(m_textures)) | - |
199 | saveTexture(texture.textureId, texture.size.width(), texture.size.height()); | - |
200 | #endif | - |
201 | | - |
202 | if (QSG_LOG_TIME_GLYPH().isDebugEnabled()) {TRUE | never evaluated | FALSE | evaluated 2343 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-2343 |
203 | quint64 now = qsg_render_timer.elapsed(); | - |
204 | qCDebug(QSG_LOG_TIME_GLYPH, never executed: QMessageLogger( __FILE__ , 209 , __PRETTY_FUNCTION__, QSG_LOG_TIME_GLYPH().categoryName()).debug("distancefield: %d glyphs prepared in %dms, rendering=%d, upload=%d", count, (int) now, int(renderTime / 1000000), int((now - (renderTime / 1000000)))) ; TRUE | never evaluated | FALSE | never evaluated |
| 0 |
205 | "distancefield: %d glyphs prepared in %dms, rendering=%d, upload=%d", never executed: QMessageLogger( __FILE__ , 209 , __PRETTY_FUNCTION__, QSG_LOG_TIME_GLYPH().categoryName()).debug("distancefield: %d glyphs prepared in %dms, rendering=%d, upload=%d", count, (int) now, int(renderTime / 1000000), int((now - (renderTime / 1000000)))) ; | 0 |
206 | count, never executed: QMessageLogger( __FILE__ , 209 , __PRETTY_FUNCTION__, QSG_LOG_TIME_GLYPH().categoryName()).debug("distancefield: %d glyphs prepared in %dms, rendering=%d, upload=%d", count, (int) now, int(renderTime / 1000000), int((now - (renderTime / 1000000)))) ; | 0 |
207 | (int) now, never executed: QMessageLogger( __FILE__ , 209 , __PRETTY_FUNCTION__, QSG_LOG_TIME_GLYPH().categoryName()).debug("distancefield: %d glyphs prepared in %dms, rendering=%d, upload=%d", count, (int) now, int(renderTime / 1000000), int((now - (renderTime / 1000000)))) ; | 0 |
208 | int(renderTime / 1000000), never executed: QMessageLogger( __FILE__ , 209 , __PRETTY_FUNCTION__, QSG_LOG_TIME_GLYPH().categoryName()).debug("distancefield: %d glyphs prepared in %dms, rendering=%d, upload=%d", count, (int) now, int(renderTime / 1000000), int((now - (renderTime / 1000000)))) ; | 0 |
209 | int((now - (renderTime / 1000000)))); never executed: QMessageLogger( __FILE__ , 209 , __PRETTY_FUNCTION__, QSG_LOG_TIME_GLYPH().categoryName()).debug("distancefield: %d glyphs prepared in %dms, rendering=%d, upload=%d", count, (int) now, int(renderTime / 1000000), int((now - (renderTime / 1000000)))) ; | 0 |
210 | } never executed: end of block | 0 |
211 | Q_QUICK_SG_PROFILE_END_WITH_PAYLOAD(QQuickProfiler::SceneGraphAdaptationLayerFrame, never executed: end of block executed 2343 times by 24 tests: (void)0 ; 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
TRUE | never evaluated | FALSE | evaluated 2343 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-2343 |
212 | QQuickProfiler::SceneGraphAdaptationLayerGlyphStore,executed 2343 times by 24 tests: (void)0 ; 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
| 2343 |
213 | (qint64)count);executed 2343 times by 24 tests: (void)0 ; 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
| 2343 |
214 | } | - |
215 | | - |
216 | void QSGDistanceFieldGlyphCache::setGlyphsPosition(const QList<GlyphPosition> &glyphs) | - |
217 | { | - |
218 | QVector<quint32> invalidatedGlyphs; | - |
219 | | - |
220 | int count = glyphs.count(); | - |
221 | for (int i = 0; i < count; ++i) {TRUE | evaluated 28812 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 9494 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
|
| 9494-28812 |
222 | GlyphPosition glyph = glyphs.at(i); | - |
223 | GlyphData &gd = glyphData(glyph.glyph); | - |
224 | | - |
225 | if (!gd.texCoord.isNull())TRUE | never evaluated | FALSE | evaluated 28812 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-28812 |
226 | invalidatedGlyphs.append(glyph.glyph); never executed: invalidatedGlyphs.append(glyph.glyph); | 0 |
227 | | - |
228 | gd.texCoord.xMargin = QT_DISTANCEFIELD_RADIUS(m_doubleGlyphResolution) / qreal(QT_DISTANCEFIELD_SCALE(m_doubleGlyphResolution)); | - |
229 | gd.texCoord.yMargin = QT_DISTANCEFIELD_RADIUS(m_doubleGlyphResolution) / qreal(QT_DISTANCEFIELD_SCALE(m_doubleGlyphResolution)); | - |
230 | gd.texCoord.x = glyph.position.x(); | - |
231 | gd.texCoord.y = glyph.position.y(); | - |
232 | gd.texCoord.width = gd.boundingRect.width(); | - |
233 | gd.texCoord.height = gd.boundingRect.height(); | - |
234 | }executed 28812 times by 24 tests: end of block 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
| 28812 |
235 | | - |
236 | if (!invalidatedGlyphs.isEmpty()) {TRUE | never evaluated | FALSE | evaluated 9494 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-9494 |
237 | for (QSGDistanceFieldGlyphConsumerList::iterator iter = m_registeredNodes.begin(); iter != m_registeredNodes.end(); ++iter) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
238 | iter->invalidateGlyphs(invalidatedGlyphs); | - |
239 | } never executed: end of block | 0 |
240 | } never executed: end of block | 0 |
241 | }executed 9494 times by 24 tests: end of block 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
| 9494 |
242 | | - |
243 | void QSGDistanceFieldGlyphCache::registerOwnerElement(QQuickItem *ownerElement) | - |
244 | { | - |
245 | Q_UNUSED(ownerElement); | - |
246 | }executed 249131 times by 24 tests: end of block 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
| 249131 |
247 | | - |
248 | void QSGDistanceFieldGlyphCache::unregisterOwnerElement(QQuickItem *ownerElement) | - |
249 | { | - |
250 | Q_UNUSED(ownerElement); | - |
251 | }executed 249131 times by 24 tests: end of block 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
| 249131 |
252 | | - |
253 | void QSGDistanceFieldGlyphCache::processPendingGlyphs() | - |
254 | { | - |
255 | | - |
256 | } | - |
257 | | - |
258 | void QSGDistanceFieldGlyphCache::setGlyphsTexture(const QVector<glyph_t> &glyphs, const Texture &tex) | - |
259 | { | - |
260 | int i = m_textures.indexOf(tex); | - |
261 | if (i == -1) {TRUE | evaluated 1604 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 739 times by 11 testsEvaluated by:- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickgridview
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
|
| 739-1604 |
262 | m_textures.append(tex); | - |
263 | i = m_textures.size() - 1; | - |
264 | } else {executed 1604 times by 24 tests: end of block 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
| 1604 |
265 | m_textures[i].size = tex.size; | - |
266 | }executed 739 times by 11 tests: end of block Executed by:- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickgridview
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
| 739 |
267 | Texture *texture = &(m_textures[i]); | - |
268 | | - |
269 | QVector<quint32> invalidatedGlyphs; | - |
270 | | - |
271 | int count = glyphs.count(); | - |
272 | for (int j = 0; j < count; ++j) {TRUE | evaluated 28568 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 2343 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
|
| 2343-28568 |
273 | glyph_t glyphIndex = glyphs.at(j); | - |
274 | GlyphData &gd = glyphData(glyphIndex); | - |
275 | if (gd.texture != &s_emptyTexture)TRUE | never evaluated | FALSE | evaluated 28568 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-28568 |
276 | invalidatedGlyphs.append(glyphIndex); never executed: invalidatedGlyphs.append(glyphIndex); | 0 |
277 | gd.texture = texture; | - |
278 | }executed 28568 times by 24 tests: end of block 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
| 28568 |
279 | | - |
280 | if (!invalidatedGlyphs.isEmpty()) {TRUE | never evaluated | FALSE | evaluated 2343 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-2343 |
281 | for (QSGDistanceFieldGlyphConsumerList::iterator iter = m_registeredNodes.begin(); iter != m_registeredNodes.end(); ++iter) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
282 | iter->invalidateGlyphs(invalidatedGlyphs); | - |
283 | } never executed: end of block | 0 |
284 | } never executed: end of block | 0 |
285 | }executed 2343 times by 24 tests: end of block 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
| 2343 |
286 | | - |
287 | void QSGDistanceFieldGlyphCache::markGlyphsToRender(const QVector<glyph_t> &glyphs) | - |
288 | { | - |
289 | int count = glyphs.count(); | - |
290 | for (int i = 0; i < count; ++i)TRUE | evaluated 28812 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 9494 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
|
| 9494-28812 |
291 | m_pendingGlyphs.add(glyphs.at(i));executed 28812 times by 24 tests: m_pendingGlyphs.add(glyphs.at(i)); 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
| 28812 |
292 | }executed 9494 times by 24 tests: end of block 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
| 9494 |
293 | | - |
294 | void QSGDistanceFieldGlyphCache::updateTexture(uint oldTex, uint newTex, const QSize &newTexSize) | - |
295 | { | - |
296 | int count = m_textures.count(); | - |
297 | for (int i = 0; i < count; ++i) {TRUE | evaluated 591 times by 11 testsEvaluated by:- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickgridview
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never evaluated |
| 0-591 |
298 | Texture &tex = m_textures[i]; | - |
299 | if (tex.textureId == oldTex) {TRUE | evaluated 591 times by 11 testsEvaluated by:- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickgridview
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never evaluated |
| 0-591 |
300 | tex.textureId = newTex; | - |
301 | tex.size = newTexSize; | - |
302 | return;executed 591 times by 11 tests: return; Executed by:- tst_flickableinterop
- tst_qquickdraghandler
- tst_qquickgridview
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickmousearea
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
| 591 |
303 | } | - |
304 | } never executed: end of block | 0 |
305 | } never executed: end of block | 0 |
306 | | - |
307 | #if defined(QSG_DISTANCEFIELD_CACHE_DEBUG) | - |
308 | #include <QtGui/qopenglfunctions.h> | - |
309 | | - |
310 | void QSGDistanceFieldGlyphCache::saveTexture(GLuint textureId, int width, int height) const | - |
311 | { | - |
312 | QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions(); | - |
313 | | - |
314 | GLuint fboId; | - |
315 | functions->glGenFramebuffers(1, &fboId); | - |
316 | | - |
317 | GLuint tmpTexture = 0; | - |
318 | functions->glGenTextures(1, &tmpTexture); | - |
319 | functions->glBindTexture(GL_TEXTURE_2D, tmpTexture); | - |
320 | functions->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); | - |
321 | functions->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); | - |
322 | functions->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); | - |
323 | functions->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); | - |
324 | functions->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); | - |
325 | functions->glBindTexture(GL_TEXTURE_2D, 0); | - |
326 | | - |
327 | functions->glBindFramebuffer(GL_FRAMEBUFFER_EXT, fboId); | - |
328 | functions->glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, | - |
329 | tmpTexture, 0); | - |
330 | | - |
331 | functions->glActiveTexture(GL_TEXTURE0); | - |
332 | functions->glBindTexture(GL_TEXTURE_2D, textureId); | - |
333 | | - |
334 | functions->glDisable(GL_STENCIL_TEST); | - |
335 | functions->glDisable(GL_DEPTH_TEST); | - |
336 | functions->glDisable(GL_SCISSOR_TEST); | - |
337 | functions->glDisable(GL_BLEND); | - |
338 | | - |
339 | GLfloat textureCoordinateArray[8]; | - |
340 | textureCoordinateArray[0] = 0.0f; | - |
341 | textureCoordinateArray[1] = 0.0f; | - |
342 | textureCoordinateArray[2] = 1.0f; | - |
343 | textureCoordinateArray[3] = 0.0f; | - |
344 | textureCoordinateArray[4] = 1.0f; | - |
345 | textureCoordinateArray[5] = 1.0f; | - |
346 | textureCoordinateArray[6] = 0.0f; | - |
347 | textureCoordinateArray[7] = 1.0f; | - |
348 | | - |
349 | GLfloat vertexCoordinateArray[8]; | - |
350 | vertexCoordinateArray[0] = -1.0f; | - |
351 | vertexCoordinateArray[1] = -1.0f; | - |
352 | vertexCoordinateArray[2] = 1.0f; | - |
353 | vertexCoordinateArray[3] = -1.0f; | - |
354 | vertexCoordinateArray[4] = 1.0f; | - |
355 | vertexCoordinateArray[5] = 1.0f; | - |
356 | vertexCoordinateArray[6] = -1.0f; | - |
357 | vertexCoordinateArray[7] = 1.0f; | - |
358 | | - |
359 | functions->glViewport(0, 0, width, height); | - |
360 | functions->glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, vertexCoordinateArray); | - |
361 | functions->glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, textureCoordinateArray); | - |
362 | | - |
363 | { | - |
364 | static const char *vertexShaderSource = | - |
365 | "attribute vec4 vertexCoordsArray; \n" | - |
366 | "attribute vec2 textureCoordArray; \n" | - |
367 | "varying vec2 textureCoords; \n" | - |
368 | "void main(void) \n" | - |
369 | "{ \n" | - |
370 | " gl_Position = vertexCoordsArray; \n" | - |
371 | " textureCoords = textureCoordArray; \n" | - |
372 | "} \n"; | - |
373 | | - |
374 | static const char *fragmentShaderSource = | - |
375 | "varying vec2 textureCoords; \n" | - |
376 | "uniform sampler2D texture; \n" | - |
377 | "void main() \n" | - |
378 | "{ \n" | - |
379 | " gl_FragColor = texture2D(texture, textureCoords); \n" | - |
380 | "} \n"; | - |
381 | | - |
382 | GLuint vertexShader = functions->glCreateShader(GL_VERTEX_SHADER); | - |
383 | GLuint fragmentShader = functions->glCreateShader(GL_FRAGMENT_SHADER); | - |
384 | | - |
385 | if (vertexShader == 0 || fragmentShader == 0) { | - |
386 | GLenum error = functions->glGetError(); | - |
387 | qWarning("QSGDistanceFieldGlyphCache::saveTexture: Failed to create shaders. (GL error: %x)", | - |
388 | error); | - |
389 | return; | - |
390 | } | - |
391 | | - |
392 | functions->glShaderSource(vertexShader, 1, &vertexShaderSource, NULL); | - |
393 | functions->glShaderSource(fragmentShader, 1, &fragmentShaderSource, NULL); | - |
394 | functions->glCompileShader(vertexShader); | - |
395 | | - |
396 | GLint len = 1; | - |
397 | functions->glGetShaderiv(vertexShader, GL_INFO_LOG_LENGTH, &len); | - |
398 | | - |
399 | char infoLog[2048]; | - |
400 | functions->glGetShaderInfoLog(vertexShader, 2048, NULL, infoLog); | - |
401 | if (qstrlen(infoLog) > 0) | - |
402 | qWarning("Problems compiling vertex shader:\n %s", infoLog); | - |
403 | | - |
404 | functions->glCompileShader(fragmentShader); | - |
405 | functions->glGetShaderInfoLog(fragmentShader, 2048, NULL, infoLog); | - |
406 | if (qstrlen(infoLog) > 0) | - |
407 | qWarning("Problems compiling fragment shader:\n %s", infoLog); | - |
408 | | - |
409 | GLuint shaderProgram = functions->glCreateProgram(); | - |
410 | functions->glAttachShader(shaderProgram, vertexShader); | - |
411 | functions->glAttachShader(shaderProgram, fragmentShader); | - |
412 | | - |
413 | functions->glBindAttribLocation(shaderProgram, 0, "vertexCoordsArray"); | - |
414 | functions->glBindAttribLocation(shaderProgram, 1, "textureCoordArray"); | - |
415 | | - |
416 | functions->glLinkProgram(shaderProgram); | - |
417 | functions->glGetProgramInfoLog(shaderProgram, 2048, NULL, infoLog); | - |
418 | if (qstrlen(infoLog) > 0) | - |
419 | qWarning("Problems linking shaders:\n %s", infoLog); | - |
420 | | - |
421 | functions->glUseProgram(shaderProgram); | - |
422 | functions->glEnableVertexAttribArray(0); | - |
423 | functions->glEnableVertexAttribArray(1); | - |
424 | | - |
425 | int textureUniformLocation = functions->glGetUniformLocation(shaderProgram, "texture"); | - |
426 | functions->glUniform1i(textureUniformLocation, 0); | - |
427 | } | - |
428 | | - |
429 | functions->glDrawArrays(GL_TRIANGLE_FAN, 0, 4); | - |
430 | | - |
431 | { | - |
432 | GLenum error = functions->glGetError(); | - |
433 | if (error != GL_NO_ERROR) | - |
434 | qWarning("glDrawArrays reported error 0x%x", error); | - |
435 | } | - |
436 | | - |
437 | uchar *data = new uchar[width * height * 4]; | - |
438 | | - |
439 | functions->glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); | - |
440 | | - |
441 | QImage image(data, width, height, QImage::Format_ARGB32); | - |
442 | | - |
443 | QByteArray fileName = m_referenceFont.familyName().toLatin1() + '_' + QByteArray::number(textureId); | - |
444 | fileName = fileName.replace('/', '_').replace(' ', '_') + ".png"; | - |
445 | | - |
446 | image.save(QString::fromLocal8Bit(fileName)); | - |
447 | | - |
448 | { | - |
449 | GLenum error = functions->glGetError(); | - |
450 | if (error != GL_NO_ERROR) | - |
451 | qWarning("glReadPixels reported error 0x%x", error); | - |
452 | } | - |
453 | | - |
454 | functions->glDisableVertexAttribArray(0); | - |
455 | functions->glDisableVertexAttribArray(1); | - |
456 | | - |
457 | functions->glDeleteFramebuffers(1, &fboId); | - |
458 | functions->glDeleteTextures(1, &tmpTexture); | - |
459 | | - |
460 | delete[] data; | - |
461 | } | - |
462 | #endif | - |
463 | | - |
464 | void QSGNodeVisitorEx::visitChildren(QSGNode *node) | - |
465 | { | - |
466 | for (QSGNode *child = node->firstChild(); child; child = child->nextSibling()) {TRUE | evaluated 104 times by 1 test | FALSE | evaluated 176 times by 1 test |
| 104-176 |
467 | switch (child->type()) { | - |
468 | case QSGNode::ClipNodeType: { never executed: case QSGNode::ClipNodeType: | 0 |
469 | QSGClipNode *c = static_cast<QSGClipNode*>(child); | - |
470 | if (visit(c))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
471 | visitChildren(c); never executed: visitChildren(c); | 0 |
472 | endVisit(c); | - |
473 | break; never executed: break; | 0 |
474 | } | - |
475 | case QSGNode::TransformNodeType: {executed 80 times by 1 test: case QSGNode::TransformNodeType: | 80 |
476 | QSGTransformNode *c = static_cast<QSGTransformNode*>(child); | - |
477 | if (visit(c))TRUE | evaluated 80 times by 1 test | FALSE | never evaluated |
| 0-80 |
478 | visitChildren(c);executed 80 times by 1 test: visitChildren(c); | 80 |
479 | endVisit(c); | - |
480 | break;executed 80 times by 1 test: break; | 80 |
481 | } | - |
482 | case QSGNode::OpacityNodeType: { never executed: case QSGNode::OpacityNodeType: | 0 |
483 | QSGOpacityNode *c = static_cast<QSGOpacityNode*>(child); | - |
484 | if (visit(c))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
485 | visitChildren(c); never executed: visitChildren(c); | 0 |
486 | endVisit(c); | - |
487 | break; never executed: break; | 0 |
488 | } | - |
489 | case QSGNode::GeometryNodeType: { never executed: case QSGNode::GeometryNodeType: | 0 |
490 | if (child->flags() & QSGNode::IsVisitableNode) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
491 | QSGVisitableNode *v = static_cast<QSGVisitableNode*>(child); | - |
492 | v->accept(this); | - |
493 | } else { never executed: end of block | 0 |
494 | QSGGeometryNode *c = static_cast<QSGGeometryNode*>(child); | - |
495 | if (visit(c))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
496 | visitChildren(c); never executed: visitChildren(c); | 0 |
497 | endVisit(c); | - |
498 | } never executed: end of block | 0 |
499 | break; never executed: break; | 0 |
500 | } | - |
501 | case QSGNode::RootNodeType: { never executed: case QSGNode::RootNodeType: | 0 |
502 | QSGRootNode *root = static_cast<QSGRootNode*>(child); | - |
503 | if (visit(root))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
504 | visitChildren(root); never executed: visitChildren(root); | 0 |
505 | endVisit(root); | - |
506 | break; never executed: break; | 0 |
507 | } | - |
508 | case QSGNode::BasicNodeType: { never executed: case QSGNode::BasicNodeType: | 0 |
509 | visitChildren(child); | - |
510 | break; never executed: break; | 0 |
511 | } | - |
512 | case QSGNode::RenderNodeType: {executed 24 times by 1 test: case QSGNode::RenderNodeType: | 24 |
513 | QSGRenderNode *r = static_cast<QSGRenderNode*>(child); | - |
514 | if (visit(r))TRUE | evaluated 24 times by 1 test | FALSE | never evaluated |
| 0-24 |
515 | visitChildren(r);executed 24 times by 1 test: visitChildren(r); | 24 |
516 | endVisit(r); | - |
517 | break;executed 24 times by 1 test: break; | 24 |
518 | } | - |
519 | default: never executed: default: | 0 |
520 | Q_UNREACHABLE(); | - |
521 | break; never executed: break; | 0 |
522 | } | - |
523 | } | - |
524 | }executed 176 times by 1 test: end of block | 176 |
525 | | - |
526 | #ifndef QT_NO_DEBUG_STREAM | - |
527 | QDebug operator<<(QDebug debug, const QSGGuiThreadShaderEffectManager::ShaderInfo::InputParameter &p) | - |
528 | { | - |
529 | QDebugStateSaver saver(debug); | - |
530 | debug.space(); | - |
531 | debug << p.semanticName << "semindex" << p.semanticIndex; | - |
532 | return debug; never executed: return debug; | 0 |
533 | } | - |
534 | | - |
535 | QDebug operator<<(QDebug debug, const QSGGuiThreadShaderEffectManager::ShaderInfo::Variable &v) | - |
536 | { | - |
537 | QDebugStateSaver saver(debug); | - |
538 | debug.space(); | - |
539 | debug << v.name; | - |
540 | switch (v.type) { | - |
541 | case QSGGuiThreadShaderEffectManager::ShaderInfo::Constant: never executed: case QSGGuiThreadShaderEffectManager::ShaderInfo::Constant: | 0 |
542 | debug << "cvar" << "offset" << v.offset << "size" << v.size; | - |
543 | break; never executed: break; | 0 |
544 | case QSGGuiThreadShaderEffectManager::ShaderInfo::Sampler: never executed: case QSGGuiThreadShaderEffectManager::ShaderInfo::Sampler: | 0 |
545 | debug << "sampler" << "bindpoint" << v.bindPoint; | - |
546 | break; never executed: break; | 0 |
547 | case QSGGuiThreadShaderEffectManager::ShaderInfo::Texture: never executed: case QSGGuiThreadShaderEffectManager::ShaderInfo::Texture: | 0 |
548 | debug << "texture" << "bindpoint" << v.bindPoint; | - |
549 | break; never executed: break; | 0 |
550 | default: never executed: default: | 0 |
551 | break; never executed: break; | 0 |
552 | } | - |
553 | return debug; never executed: return debug; | 0 |
554 | } | - |
555 | | - |
556 | QDebug operator<<(QDebug debug, const QSGShaderEffectNode::VariableData &vd) | - |
557 | { | - |
558 | QDebugStateSaver saver(debug); | - |
559 | debug.space(); | - |
560 | debug << vd.specialType; | - |
561 | return debug; never executed: return debug; | 0 |
562 | } | - |
563 | #endif | - |
564 | | - |
565 | QT_END_NAMESPACE | - |
566 | | - |
567 | #include "moc_qsgadaptationlayer_p.cpp" | - |
| | |