OpenCoverage

qsgadaptationlayer.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/qsgadaptationlayer.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQuick module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#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-
53QT_BEGIN_NAMESPACE-
54-
55static QElapsedTimer qsg_render_timer;-
56-
57QSGDistanceFieldGlyphCache::Texture QSGDistanceFieldGlyphCache::s_emptyTexture;-
58-
59QSGDistanceFieldGlyphCache::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();
qt_fontHasNarrowOutlines(font)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 1620 times by 24 tests
Evaluated 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
m_glyphCount <...GHGLYPHCOUNT()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
0-1620
68-
69 m_referenceFont = font;-
70 // we set the same pixel size as used by the distance field internally.-
71 // this allows us to call pathForGlyph once and reuse the result.-
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-
81QSGDistanceFieldGlyphCache::~QSGDistanceFieldGlyphCache()-
82{-
83}-
84-
85QSGDistanceFieldGlyphCache::GlyphData &QSGDistanceFieldGlyphCache::glyphData(glyph_t glyph)-
86{-
87 QHash<glyph_t, GlyphData>::iterator data = m_glyphsData.find(glyph);-
88 if (data == m_glyphsData.end()) {
data == m_glyphsData.end()Description
TRUEevaluated 29791 times by 24 tests
Evaluated 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
FALSEevaluated 6701665 times by 24 tests
Evaluated 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 // need bounding rect in base font size scale-
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-
102QSGDistanceFieldGlyphCache::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-
116void 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) {
i < countDescription
TRUEevaluated 1379907 times by 24 tests
Evaluated 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
FALSEevaluated 249131 times by 24 tests
Evaluated 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) {
(int) glyphInd...= glyphCount()Description
TRUEnever evaluated
FALSEevaluated 1379907 times by 24 tests
Evaluated 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
glyphCount() > 0Description
TRUEnever evaluated
FALSEnever 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))
gd.texCoord.isValid()Description
TRUEevaluated 1339810 times by 18 tests
Evaluated 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
FALSEevaluated 40097 times by 24 tests
Evaluated 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
m_populatingGl...ns(glyphIndex)Description
TRUEevaluated 10306 times by 20 tests
Evaluated 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
FALSEevaluated 29791 times by 24 tests
Evaluated 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()) {
gd.boundingRect.isEmpty()Description
TRUEevaluated 979 times by 18 tests
Evaluated 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
FALSEevaluated 28812 times by 24 tests
Evaluated 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())
!newGlyphs.isEmpty()Description
TRUEevaluated 9494 times by 24 tests
Evaluated 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
FALSEevaluated 239637 times by 16 tests
Evaluated 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-
150void 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) {
i < countDescription
TRUEevaluated 1379907 times by 24 tests
Evaluated 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
FALSEevaluated 249131 times by 24 tests
Evaluated 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())
--gd.ref == 0Description
TRUEevaluated 105227 times by 24 tests
Evaluated 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
FALSEevaluated 1274680 times by 21 tests
Evaluated 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
!gd.texCoord.isNull()Description
TRUEevaluated 101390 times by 24 tests
Evaluated 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
FALSEevaluated 3837 times by 18 tests
Evaluated 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-
163void QSGDistanceFieldGlyphCache::update()-
164{-
165 m_populatingGlyphs.clear();-
166-
167 if (m_pendingGlyphs.isEmpty())
m_pendingGlyphs.isEmpty()Description
TRUEevaluated 727386 times by 24 tests
Evaluated 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
FALSEevaluated 2343 times by 24 tests
Evaluated 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)
profileFramesDescription
TRUEnever evaluated
FALSEevaluated 2343 times by 24 tests
Evaluated 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
QQuickProfiler...ileSceneGraph)Description
TRUEnever evaluated
FALSEevaluated 2343 times by 24 tests
Evaluated 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) {
i < pendingGlyphsSizeDescription
TRUEevaluated 28568 times by 24 tests
Evaluated 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
FALSEevaluated 2343 times by 24 tests
Evaluated 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(); // no longer needed, so release memory used by the painter path-
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)
profileFramesDescription
TRUEnever evaluated
FALSEevaluated 2343 times by 24 tests
Evaluated 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
QQuickProfiler...ileSceneGraph)Description
TRUEnever evaluated
FALSEevaluated 2343 times by 24 tests
Evaluated 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()) {
QSG_LOG_TIME_G...DebugEnabled()Description
TRUEnever evaluated
FALSEevaluated 2343 times by 24 tests
Evaluated 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)))) ;
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever 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
QQuickProfiler...ileSceneGraph)Description
TRUEnever evaluated
FALSEevaluated 2343 times by 24 tests
Evaluated 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-
216void 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) {
i < countDescription
TRUEevaluated 28812 times by 24 tests
Evaluated 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
FALSEevaluated 9494 times by 24 tests
Evaluated 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())
!gd.texCoord.isNull()Description
TRUEnever evaluated
FALSEevaluated 28812 times by 24 tests
Evaluated 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()) {
!invalidatedGlyphs.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 9494 times by 24 tests
Evaluated 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) {
iter != m_regi...redNodes.end()Description
TRUEnever evaluated
FALSEnever 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-
243void 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-
248void 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-
253void QSGDistanceFieldGlyphCache::processPendingGlyphs()-
254{-
255 /* Intentionally empty */-
256}-
257-
258void QSGDistanceFieldGlyphCache::setGlyphsTexture(const QVector<glyph_t> &glyphs, const Texture &tex)-
259{-
260 int i = m_textures.indexOf(tex);-
261 if (i == -1) {
i == -1Description
TRUEevaluated 1604 times by 24 tests
Evaluated 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
FALSEevaluated 739 times by 11 tests
Evaluated 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) {
j < countDescription
TRUEevaluated 28568 times by 24 tests
Evaluated 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
FALSEevaluated 2343 times by 24 tests
Evaluated 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)
gd.texture != &s_emptyTextureDescription
TRUEnever evaluated
FALSEevaluated 28568 times by 24 tests
Evaluated 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()) {
!invalidatedGlyphs.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 2343 times by 24 tests
Evaluated 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) {
iter != m_regi...redNodes.end()Description
TRUEnever evaluated
FALSEnever 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-
287void QSGDistanceFieldGlyphCache::markGlyphsToRender(const QVector<glyph_t> &glyphs)-
288{-
289 int count = glyphs.count();-
290 for (int i = 0; i < count; ++i)
i < countDescription
TRUEevaluated 28812 times by 24 tests
Evaluated 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
FALSEevaluated 9494 times by 24 tests
Evaluated 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-
294void QSGDistanceFieldGlyphCache::updateTexture(uint oldTex, uint newTex, const QSize &newTexSize)-
295{-
296 int count = m_textures.count();-
297 for (int i = 0; i < count; ++i) {
i < countDescription
TRUEevaluated 591 times by 11 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
0-591
298 Texture &tex = m_textures[i];-
299 if (tex.textureId == oldTex) {
tex.textureId == oldTexDescription
TRUEevaluated 591 times by 11 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever 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-
310void 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-
464void QSGNodeVisitorEx::visitChildren(QSGNode *node)-
465{-
466 for (QSGNode *child = node->firstChild(); child; child = child->nextSibling()) {
childDescription
TRUEevaluated 104 times by 1 test
Evaluated by:
  • tst_qquickshape
FALSEevaluated 176 times by 1 test
Evaluated by:
  • tst_qquickshape
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))
visit(c)Description
TRUEnever evaluated
FALSEnever 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:
Executed by:
  • tst_qquickshape
80
476 QSGTransformNode *c = static_cast<QSGTransformNode*>(child);-
477 if (visit(c))
visit(c)Description
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_qquickshape
FALSEnever evaluated
0-80
478 visitChildren(c);
executed 80 times by 1 test: visitChildren(c);
Executed by:
  • tst_qquickshape
80
479 endVisit(c);-
480 break;
executed 80 times by 1 test: break;
Executed by:
  • tst_qquickshape
80
481 }-
482 case QSGNode::OpacityNodeType: {
never executed: case QSGNode::OpacityNodeType:
0
483 QSGOpacityNode *c = static_cast<QSGOpacityNode*>(child);-
484 if (visit(c))
visit(c)Description
TRUEnever evaluated
FALSEnever 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) {
child->flags()...sVisitableNodeDescription
TRUEnever evaluated
FALSEnever 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))
visit(c)Description
TRUEnever evaluated
FALSEnever 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))
visit(root)Description
TRUEnever evaluated
FALSEnever 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:
Executed by:
  • tst_qquickshape
24
513 QSGRenderNode *r = static_cast<QSGRenderNode*>(child);-
514 if (visit(r))
visit(r)Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickshape
FALSEnever evaluated
0-24
515 visitChildren(r);
executed 24 times by 1 test: visitChildren(r);
Executed by:
  • tst_qquickshape
24
516 endVisit(r);-
517 break;
executed 24 times by 1 test: break;
Executed by:
  • tst_qquickshape
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
Executed by:
  • tst_qquickshape
176
525-
526#ifndef QT_NO_DEBUG_STREAM-
527QDebug 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-
535QDebug 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-
556QDebug 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-
565QT_END_NAMESPACE-
566-
567#include "moc_qsgadaptationlayer_p.cpp"-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0