OpenCoverage

qsgdefaultdistancefieldglyphcache.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.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 "qsgdefaultdistancefieldglyphcache_p.h"-
41-
42#include <QtGui/private/qdistancefield_p.h>-
43#include <QtGui/private/qopenglcontext_p.h>-
44#include <QtQml/private/qqmlglobal_p.h>-
45#include <qopenglfunctions.h>-
46#include <qopenglframebufferobject.h>-
47#include <qmath.h>-
48-
49#if !defined(QT_OPENGL_ES_2)-
50#include <QtGui/qopenglfunctions_3_2_core.h>-
51#endif-
52-
53QT_BEGIN_NAMESPACE-
54-
55DEFINE_BOOL_CONFIG_OPTION(qmlUseGlyphCacheWorkaround, QML_USE_GLYPHCACHE_WORKAROUND)
never executed: status = Yes;
never executed: end of block
executed 48 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
executed 48 times by 24 tests: return status == Yes;
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
status == UnknownDescription
TRUEevaluated 48 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
FALSEnever evaluated
__builtin_expe...UND")), false)Description
TRUEnever evaluated
FALSEevaluated 48 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
v != "0"Description
TRUEnever evaluated
FALSEnever evaluated
v != "false"Description
TRUEnever evaluated
FALSEnever evaluated
0-48
56DEFINE_BOOL_CONFIG_OPTION(qsgPreferFullSizeGlyphCacheTextures, QSG_PREFER_FULLSIZE_GLYPHCACHE_TEXTURES)
never executed: status = Yes;
never executed: end of block
executed 48 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
executed 1620 times by 24 tests: return status == Yes;
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
status == UnknownDescription
TRUEevaluated 48 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 1572 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
__builtin_expe...RES")), false)Description
TRUEnever evaluated
FALSEevaluated 48 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
v != "0"Description
TRUEnever evaluated
FALSEnever evaluated
v != "false"Description
TRUEnever evaluated
FALSEnever evaluated
0-1620
57-
58#if !defined(QSG_DEFAULT_DISTANCEFIELD_GLYPH_CACHE_PADDING)-
59# define QSG_DEFAULT_DISTANCEFIELD_GLYPH_CACHE_PADDING 2-
60#endif-
61-
62QSGDefaultDistanceFieldGlyphCache::QSGDefaultDistanceFieldGlyphCache(QOpenGLContext *c, const QRawFont &font)-
63 : QSGDistanceFieldGlyphCache(c, font)-
64 , m_maxTextureSize(0)-
65 , m_maxTextureCount(3)-
66 , m_blitProgram(nullptr)-
67 , m_blitBuffer(QOpenGLBuffer::VertexBuffer)-
68 , m_fboGuard(nullptr)-
69 , m_funcs(c->functions())-
70#if !defined(QT_OPENGL_ES_2)-
71 , m_coreFuncs(nullptr)-
72#endif-
73{-
74 if (Q_LIKELY(m_blitBuffer.create())) {
__builtin_expe...eate()), true)Description
TRUEevaluated 1622 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
FALSEnever evaluated
0-1622
75 m_blitBuffer.bind();-
76 static const GLfloat buffer[16] = {-1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f,-
77 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f};-
78 m_blitBuffer.allocate(buffer, sizeof(buffer));-
79 m_blitBuffer.release();-
80 } else {
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
81 qWarning("Buffer creation failed");-
82 }
never executed: end of block
0
83-
84 m_areaAllocator = new QSGAreaAllocator(QSize(maxTextureSize(), m_maxTextureCount * maxTextureSize()));-
85}
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
86-
87QSGDefaultDistanceFieldGlyphCache::~QSGDefaultDistanceFieldGlyphCache()-
88{-
89 for (int i = 0; i < m_textures.count(); ++i)
i < m_textures.count()Description
TRUEevaluated 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
FALSEevaluated 1622 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
1620-1622
90 m_funcs->glDeleteTextures(1, &m_textures[i].texture);
executed 1620 times by 24 tests: m_funcs->glDeleteTextures(1, &m_textures[i].texture);
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
1620
91-
92 if (m_fboGuard != nullptr)
m_fboGuard != nullptrDescription
TRUEevaluated 453 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
FALSEevaluated 1169 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
453-1169
93 m_fboGuard->free();
executed 453 times by 11 tests: m_fboGuard->free();
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
453
94-
95 delete m_blitProgram;-
96 delete m_areaAllocator;-
97}
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
98-
99void QSGDefaultDistanceFieldGlyphCache::requestGlyphs(const QSet<glyph_t> &glyphs)-
100{-
101 QList<GlyphPosition> glyphPositions;-
102 QVector<glyph_t> glyphsToRender;-
103-
104 for (QSet<glyph_t>::const_iterator it = glyphs.constBegin(); it != glyphs.constEnd() ; ++it) {
it != glyphs.constEnd()Description
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
105 glyph_t glyphIndex = *it;-
106-
107 int padding = QSG_DEFAULT_DISTANCEFIELD_GLYPH_CACHE_PADDING;-
108 QRectF boundingRect = glyphData(glyphIndex).boundingRect;-
109 int glyphWidth = qCeil(boundingRect.width()) + distanceFieldRadius() * 2;-
110 int glyphHeight = qCeil(boundingRect.height()) + distanceFieldRadius() * 2;-
111 QSize glyphSize(glyphWidth + padding * 2, glyphHeight + padding * 2);-
112 QRect alloc = m_areaAllocator->allocate(glyphSize);-
113-
114 if (alloc.isNull()) {
alloc.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
115 // Unallocate unused glyphs until we can allocated the new glyph-
116 while (alloc.isNull() && !m_unusedGlyphs.isEmpty()) {
alloc.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
!m_unusedGlyphs.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
117 glyph_t unusedGlyph = *m_unusedGlyphs.constBegin();-
118-
119 TexCoord unusedCoord = glyphTexCoord(unusedGlyph);-
120 QRectF unusedGlyphBoundingRect = glyphData(unusedGlyph).boundingRect;-
121 int unusedGlyphWidth = qCeil(unusedGlyphBoundingRect.width()) + distanceFieldRadius() * 2;-
122 int unusedGlyphHeight = qCeil(unusedGlyphBoundingRect.height()) + distanceFieldRadius() * 2;-
123 m_areaAllocator->deallocate(QRect(unusedCoord.x - padding,-
124 unusedCoord.y - padding,-
125 padding * 2 + unusedGlyphWidth,-
126 padding * 2 + unusedGlyphHeight));-
127-
128 m_unusedGlyphs.remove(unusedGlyph);-
129 m_glyphsTexture.remove(unusedGlyph);-
130 removeGlyph(unusedGlyph);-
131-
132 alloc = m_areaAllocator->allocate(glyphSize);-
133 }
never executed: end of block
0
134-
135 // Not enough space left for this glyph... skip to the next one-
136 if (alloc.isNull())
alloc.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
137 continue;
never executed: continue;
0
138 }
never executed: end of block
0
139-
140 TextureInfo *tex = textureInfo(alloc.y() / maxTextureSize());-
141 alloc = QRect(alloc.x(), alloc.y() % maxTextureSize(), alloc.width(), alloc.height());-
142-
143 tex->allocatedArea |= alloc;-
144 Q_ASSERT(tex->padding == padding || tex->padding < 0);-
145 tex->padding = padding;-
146-
147 GlyphPosition p;-
148 p.glyph = glyphIndex;-
149 p.position = alloc.topLeft() + QPoint(padding, padding);-
150-
151 glyphPositions.append(p);-
152 glyphsToRender.append(glyphIndex);-
153 m_glyphsTexture.insert(glyphIndex, tex);-
154 }
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
155-
156 setGlyphsPosition(glyphPositions);-
157 markGlyphsToRender(glyphsToRender);-
158}
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
159-
160void QSGDefaultDistanceFieldGlyphCache::storeGlyphs(const QList<QDistanceField> &glyphs)-
161{-
162 typedef QHash<TextureInfo *, QVector<glyph_t> > GlyphTextureHash;-
163 typedef GlyphTextureHash::const_iterator GlyphTextureHashConstIt;-
164-
165 GlyphTextureHash glyphTextures;-
166-
167 GLint alignment = 4; // default value-
168 m_funcs->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);-
169-
170 // Distance field data is always tightly packed-
171 m_funcs->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);-
172-
173 for (int i = 0; i < glyphs.size(); ++i) {
i < glyphs.size()Description
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
174 QDistanceField glyph = glyphs.at(i);-
175 glyph_t glyphIndex = glyph.glyph();-
176 TexCoord c = glyphTexCoord(glyphIndex);-
177 TextureInfo *texInfo = m_glyphsTexture.value(glyphIndex);-
178-
179 resizeTexture(texInfo, texInfo->allocatedArea.width(), texInfo->allocatedArea.height());-
180 m_funcs->glBindTexture(GL_TEXTURE_2D, texInfo->texture);-
181-
182 glyphTextures[texInfo].append(glyphIndex);-
183-
184 int padding = texInfo->padding;-
185 int expectedWidth = qCeil(c.width + c.xMargin * 2);-
186 glyph = glyph.copy(-padding, -padding,-
187 expectedWidth + padding * 2, glyph.height() + padding * 2);-
188-
189 if (useTextureResizeWorkaround()) {
useTextureResizeWorkaround()Description
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
190 uchar *inBits = glyph.scanLine(0);-
191 uchar *outBits = texInfo->image.scanLine(int(c.y) - padding) + int(c.x) - padding;-
192 for (int y = 0; y < glyph.height(); ++y) {
y < glyph.height()Description
TRUEnever evaluated
FALSEnever evaluated
0
193 memcpy(outBits, inBits, glyph.width());-
194 inBits += glyph.width();-
195 outBits += texInfo->image.width();-
196 }
never executed: end of block
0
197 }
never executed: end of block
0
198-
199#if !defined(QT_OPENGL_ES_2)-
200 const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
isCoreProfile()Description
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
201#else-
202 const GLenum format = GL_ALPHA;-
203#endif-
204 if (useTextureUploadWorkaround()) {
useTextureUploadWorkaround()Description
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
205 for (int i = 0; i < glyph.height(); ++i) {
i < glyph.height()Description
TRUEnever evaluated
FALSEnever evaluated
0
206 m_funcs->glTexSubImage2D(GL_TEXTURE_2D, 0,-
207 c.x - padding, c.y + i - padding, glyph.width(),1,-
208 format, GL_UNSIGNED_BYTE,-
209 glyph.scanLine(i));-
210 }
never executed: end of block
0
211 } else {
never executed: end of block
0
212 m_funcs->glTexSubImage2D(GL_TEXTURE_2D, 0,-
213 c.x - padding, c.y - padding, glyph.width(), glyph.height(),-
214 format, GL_UNSIGNED_BYTE,-
215 glyph.constBits());-
216 }
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
217 }-
218-
219 // restore to previous alignment-
220 m_funcs->glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);-
221-
222 for (GlyphTextureHashConstIt i = glyphTextures.constBegin(), cend = glyphTextures.constEnd(); i != cend; ++i) {
i != cendDescription
TRUEevaluated 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
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
223 Texture t;-
224 t.textureId = i.key()->texture;-
225 t.size = i.key()->size;-
226 setGlyphsTexture(i.value(), t);-
227 }
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
228}
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
229-
230void QSGDefaultDistanceFieldGlyphCache::referenceGlyphs(const QSet<glyph_t> &glyphs)-
231{-
232 m_unusedGlyphs -= glyphs;-
233}
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
234-
235void QSGDefaultDistanceFieldGlyphCache::releaseGlyphs(const QSet<glyph_t> &glyphs)-
236{-
237 m_unusedGlyphs += glyphs;-
238}
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
239-
240void QSGDefaultDistanceFieldGlyphCache::createTexture(TextureInfo *texInfo, int width, int height)-
241{-
242 if (useTextureResizeWorkaround() && texInfo->image.isNull())
useTextureResizeWorkaround()Description
TRUEnever evaluated
FALSEevaluated 2195 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
texInfo->image.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0-2195
243 texInfo->image = QDistanceField(width, height);
never executed: texInfo->image = QDistanceField(width, height);
0
244-
245 while (m_funcs->glGetError() != GL_NO_ERROR) { }
never executed: end of block
m_funcs->glGetError() != 0Description
TRUEnever evaluated
FALSEevaluated 2195 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-2195
246-
247 m_funcs->glGenTextures(1, &texInfo->texture);-
248 m_funcs->glBindTexture(GL_TEXTURE_2D, texInfo->texture);-
249-
250 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);-
251 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);-
252 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);-
253 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);-
254#if !defined(QT_OPENGL_ES_2)-
255 if (!QOpenGLContext::currentContext()->isOpenGLES())
!QOpenGLContex...->isOpenGLES()Description
TRUEevaluated 2195 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
FALSEnever evaluated
0-2195
256 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
executed 2195 times by 24 tests: m_funcs->glTexParameteri( 0x0DE1 , 0x813D , 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
2195
257 const GLint internalFormat = isCoreProfile() ? GL_R8 : GL_ALPHA;
isCoreProfile()Description
TRUEnever evaluated
FALSEevaluated 2195 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-2195
258 const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
isCoreProfile()Description
TRUEnever evaluated
FALSEevaluated 2195 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-2195
259#else-
260 const GLint internalFormat = GL_ALPHA;-
261 const GLenum format = GL_ALPHA;-
262#endif-
263-
264 QByteArray zeroBuf(width * height, 0);-
265 m_funcs->glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, width, height, 0, format, GL_UNSIGNED_BYTE, zeroBuf.constData());-
266-
267 texInfo->size = QSize(width, height);-
268-
269 GLuint error = m_funcs->glGetError();-
270 if (error != GL_NO_ERROR) {
error != 0Description
TRUEnever evaluated
FALSEevaluated 2195 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-2195
271 m_funcs->glBindTexture(GL_TEXTURE_2D, 0);-
272 m_funcs->glDeleteTextures(1, &texInfo->texture);-
273 texInfo->texture = 0;-
274 }
never executed: end of block
0
275-
276}
executed 2195 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
2195
277-
278static void freeFramebufferFunc(QOpenGLFunctions *funcs, GLuint id)-
279{-
280 funcs->glDeleteFramebuffers(1, &id);-
281}
executed 453 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
453
282-
283void QSGDefaultDistanceFieldGlyphCache::resizeTexture(TextureInfo *texInfo, int width, int height)-
284{-
285 QOpenGLContext *ctx = QOpenGLContext::currentContext();-
286 Q_ASSERT(ctx);-
287-
288 int oldWidth = texInfo->size.width();-
289 int oldHeight = texInfo->size.height();-
290 if (width == oldWidth && height == oldHeight)
width == oldWidthDescription
TRUEevaluated 26380 times by 23 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_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 2188 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
height == oldHeightDescription
TRUEevaluated 26373 times by 23 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_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicktextedit
7-26380
291 return;
executed 26373 times by 23 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_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
26373
292-
293 GLuint oldTexture = texInfo->texture;-
294 createTexture(texInfo, width, height);-
295-
296 if (!oldTexture)
!oldTextureDescription
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 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
591-1604
297 return;
executed 1604 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
1604
298-
299 updateTexture(oldTexture, texInfo->texture, texInfo->size);-
300-
301#if !defined(QT_OPENGL_ES_2)-
302 if (isCoreProfile() && !useTextureResizeWorkaround()) {
isCoreProfile()Description
TRUEnever evaluated
FALSEevaluated 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
!useTextureResizeWorkaround()Description
TRUEnever evaluated
FALSEnever evaluated
0-591
303 // For an OpenGL Core Profile we can use http://www.opengl.org/wiki/Framebuffer#Blitting-
304 // to efficiently copy the contents of the old texture to the new texture-
305 // TODO: Use ARB_copy_image if available of if we have >=4.3 context-
306 if (!m_coreFuncs) {
!m_coreFuncsDescription
TRUEnever evaluated
FALSEnever evaluated
0
307 m_coreFuncs = ctx->versionFunctions<QOpenGLFunctions_3_2_Core>();-
308 Q_ASSERT(m_coreFuncs);-
309 m_coreFuncs->initializeOpenGLFunctions();-
310 }
never executed: end of block
0
311-
312 // Create a framebuffer object to which we can attach our old and new textures (to-
313 // the first two color buffer attachment points)-
314 if (!m_fboGuard) {
!m_fboGuardDescription
TRUEnever evaluated
FALSEnever evaluated
0
315 GLuint fbo;-
316 m_coreFuncs->glGenFramebuffers(1, &fbo);-
317 m_fboGuard = new QOpenGLSharedResourceGuard(ctx, fbo, freeFramebufferFunc);-
318 }
never executed: end of block
0
319-
320 // Bind the FBO to both the GL_READ_FRAMEBUFFER? and GL_DRAW_FRAMEBUFFER targets-
321 m_coreFuncs->glBindFramebuffer(GL_FRAMEBUFFER, m_fboGuard->id());-
322-
323 // Bind the old texture to GL_COLOR_ATTACHMENT0-
324 m_coreFuncs->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,-
325 GL_TEXTURE_2D, oldTexture, 0);-
326-
327 // Bind the new texture to GL_COLOR_ATTACHMENT1-
328 m_coreFuncs->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1,-
329 GL_TEXTURE_2D, texInfo->texture, 0);-
330-
331 // Set the source and destination buffers-
332 m_coreFuncs->glReadBuffer(GL_COLOR_ATTACHMENT0);-
333 m_coreFuncs->glDrawBuffer(GL_COLOR_ATTACHMENT1);-
334-
335 // Do the blit-
336 m_coreFuncs->glBlitFramebuffer(0, 0, oldWidth, oldHeight,-
337 0, 0, oldWidth, oldHeight,-
338 GL_COLOR_BUFFER_BIT, GL_NEAREST);-
339-
340 // Reset the default framebuffer-
341 QOpenGLFramebufferObject::bindDefault();-
342-
343 return;
never executed: return;
0
344 } else if (useTextureResizeWorkaround()) {
useTextureResizeWorkaround()Description
TRUEnever evaluated
FALSEevaluated 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
0-591
345#else-
346 if (useTextureResizeWorkaround()) {-
347#endif-
348 GLint alignment = 4; // default value-
349 m_funcs->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);-
350 m_funcs->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);-
351-
352#if !defined(QT_OPENGL_ES_2)-
353 const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
isCoreProfile()Description
TRUEnever evaluated
FALSEnever evaluated
0
354#else-
355 const GLenum format = GL_ALPHA;-
356#endif-
357-
358 if (useTextureUploadWorkaround()) {
useTextureUploadWorkaround()Description
TRUEnever evaluated
FALSEnever evaluated
0
359 for (int i = 0; i < texInfo->image.height(); ++i) {
i < texInfo->image.height()Description
TRUEnever evaluated
FALSEnever evaluated
0
360 m_funcs->glTexSubImage2D(GL_TEXTURE_2D, 0,-
361 0, i, oldWidth, 1,-
362 format, GL_UNSIGNED_BYTE,-
363 texInfo->image.scanLine(i));-
364 }
never executed: end of block
0
365 } else {
never executed: end of block
0
366 m_funcs->glTexSubImage2D(GL_TEXTURE_2D, 0,-
367 0, 0, oldWidth, oldHeight,-
368 format, GL_UNSIGNED_BYTE,-
369 texInfo->image.constBits());-
370 }
never executed: end of block
0
371-
372 m_funcs->glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); // restore to previous value-
373-
374 texInfo->image = texInfo->image.copy(0, 0, width, height);-
375 m_funcs->glDeleteTextures(1, &oldTexture);-
376 return;
never executed: return;
0
377 }-
378-
379 if (!m_blitProgram)
!m_blitProgramDescription
TRUEevaluated 453 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
FALSEevaluated 138 times by 8 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktextedit
138-453
380 createBlitProgram();
executed 453 times by 11 tests: createBlitProgram();
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
453
381-
382 Q_ASSERT(m_blitProgram);-
383-
384 if (!m_fboGuard) {
!m_fboGuardDescription
TRUEevaluated 453 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
FALSEevaluated 138 times by 8 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktextedit
138-453
385 GLuint fbo;-
386 m_funcs->glGenFramebuffers(1, &fbo);-
387 m_fboGuard = new QOpenGLSharedResourceGuard(ctx, fbo, freeFramebufferFunc);-
388 }
executed 453 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
453
389 m_funcs->glBindFramebuffer(GL_FRAMEBUFFER, m_fboGuard->id());-
390-
391 GLuint tmp_texture;-
392 m_funcs->glGenTextures(1, &tmp_texture);-
393 m_funcs->glBindTexture(GL_TEXTURE_2D, tmp_texture);-
394 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);-
395 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);-
396 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);-
397 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);-
398#if !defined(QT_OPENGL_ES_2)-
399 if (!ctx->isOpenGLES())
!ctx->isOpenGLES()Description
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
400 m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
executed 591 times by 11 tests: m_funcs->glTexParameteri( 0x0DE1 , 0x813D , 0);
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
401#endif-
402 m_funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, oldWidth, oldHeight, 0,-
403 GL_RGBA, GL_UNSIGNED_BYTE, nullptr);-
404 m_funcs->glBindTexture(GL_TEXTURE_2D, 0);-
405 m_funcs->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,-
406 GL_TEXTURE_2D, tmp_texture, 0);-
407-
408 m_funcs->glActiveTexture(GL_TEXTURE0);-
409 m_funcs->glBindTexture(GL_TEXTURE_2D, oldTexture);-
410-
411 // save current render states-
412 GLboolean stencilTestEnabled;-
413 GLboolean depthTestEnabled;-
414 GLboolean scissorTestEnabled;-
415 GLboolean blendEnabled;-
416 GLint viewport[4];-
417 GLint oldProgram;-
418 m_funcs->glGetBooleanv(GL_STENCIL_TEST, &stencilTestEnabled);-
419 m_funcs->glGetBooleanv(GL_DEPTH_TEST, &depthTestEnabled);-
420 m_funcs->glGetBooleanv(GL_SCISSOR_TEST, &scissorTestEnabled);-
421 m_funcs->glGetBooleanv(GL_BLEND, &blendEnabled);-
422 m_funcs->glGetIntegerv(GL_VIEWPORT, &viewport[0]);-
423 m_funcs->glGetIntegerv(GL_CURRENT_PROGRAM, &oldProgram);-
424-
425 m_funcs->glDisable(GL_STENCIL_TEST);-
426 m_funcs->glDisable(GL_DEPTH_TEST);-
427 m_funcs->glDisable(GL_SCISSOR_TEST);-
428 m_funcs->glDisable(GL_BLEND);-
429-
430 m_funcs->glViewport(0, 0, oldWidth, oldHeight);-
431-
432 const bool vaoInit = m_vao.isCreated();-
433 if (isCoreProfile()) {
isCoreProfile()Description
TRUEnever evaluated
FALSEevaluated 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
0-591
434 if ( !vaoInit )
!vaoInitDescription
TRUEnever evaluated
FALSEnever evaluated
0
435 m_vao.create();
never executed: m_vao.create();
0
436 m_vao.bind();-
437 }
never executed: end of block
0
438 m_blitProgram->bind();-
439 if (!vaoInit || !isCoreProfile()) {
!vaoInitDescription
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
!isCoreProfile()Description
TRUEnever evaluated
FALSEnever evaluated
0-591
440 m_blitBuffer.bind();-
441-
442 m_blitProgram->enableAttributeArray(int(QT_VERTEX_COORDS_ATTR));-
443 m_blitProgram->enableAttributeArray(int(QT_TEXTURE_COORDS_ATTR));-
444 m_blitProgram->setAttributeBuffer(int(QT_VERTEX_COORDS_ATTR), GL_FLOAT, 0, 2);-
445 m_blitProgram->setAttributeBuffer(int(QT_TEXTURE_COORDS_ATTR), GL_FLOAT, 32, 2);-
446 }
executed 591 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
591
447 m_blitProgram->disableAttributeArray(int(QT_OPACITY_ATTR));-
448 m_blitProgram->setUniformValue("imageTexture", GLuint(0));-
449-
450 m_funcs->glDrawArrays(GL_TRIANGLE_FAN, 0, 4);-
451-
452 m_funcs->glBindTexture(GL_TEXTURE_2D, texInfo->texture);-
453-
454 if (useTextureUploadWorkaround()) {
useTextureUploadWorkaround()Description
TRUEnever evaluated
FALSEevaluated 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
0-591
455 for (int i = 0; i < oldHeight; ++i)
i < oldHeightDescription
TRUEnever evaluated
FALSEnever evaluated
0
456 m_funcs->glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, i, 0, i, oldWidth, 1);
never executed: m_funcs->glCopyTexSubImage2D( 0x0DE1 , 0, 0, i, 0, i, oldWidth, 1);
0
457 } else {
never executed: end of block
0
458 m_funcs->glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, oldWidth, oldHeight);-
459 }
executed 591 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
591
460-
461 m_funcs->glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,-
462 GL_RENDERBUFFER, 0);-
463 m_funcs->glDeleteTextures(1, &tmp_texture);-
464 m_funcs->glDeleteTextures(1, &oldTexture);-
465-
466 QOpenGLFramebufferObject::bindDefault();-
467-
468 // restore render states-
469 if (stencilTestEnabled)
stencilTestEnabledDescription
TRUEnever evaluated
FALSEevaluated 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
0-591
470 m_funcs->glEnable(GL_STENCIL_TEST);
never executed: m_funcs->glEnable( 0x0B90 );
0
471 if (depthTestEnabled)
depthTestEnabledDescription
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
472 m_funcs->glEnable(GL_DEPTH_TEST);
executed 591 times by 11 tests: m_funcs->glEnable( 0x0B71 );
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
473 if (scissorTestEnabled)
scissorTestEnabledDescription
TRUEnever evaluated
FALSEevaluated 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
0-591
474 m_funcs->glEnable(GL_SCISSOR_TEST);
never executed: m_funcs->glEnable( 0x0C11 );
0
475 if (blendEnabled)
blendEnabledDescription
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
476 m_funcs->glEnable(GL_BLEND);
executed 591 times by 11 tests: m_funcs->glEnable( 0x0BE2 );
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
477 m_funcs->glViewport(viewport[0], viewport[1], viewport[2], viewport[3]);-
478 m_funcs->glUseProgram(oldProgram);-
479-
480 m_blitProgram->disableAttributeArray(int(QT_VERTEX_COORDS_ATTR));-
481 m_blitProgram->disableAttributeArray(int(QT_TEXTURE_COORDS_ATTR));-
482 if (isCoreProfile())
isCoreProfile()Description
TRUEnever evaluated
FALSEevaluated 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
0-591
483 m_vao.release();
never executed: m_vao.release();
0
484}
executed 591 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
591
485-
486bool QSGDefaultDistanceFieldGlyphCache::useTextureResizeWorkaround() const-
487{-
488 static bool set = false;-
489 static bool useWorkaround = false;-
490 if (!set) {
!setDescription
TRUEevaluated 48 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 31306 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
48-31306
491 QOpenGLContextPrivate *ctx_p = static_cast<QOpenGLContextPrivate *>(QOpenGLContextPrivate::get(QOpenGLContext::currentContext()));-
492 useWorkaround = ctx_p->workaround_brokenFBOReadBack
ctx_p->workaro...kenFBOReadBackDescription
TRUEnever evaluated
FALSEevaluated 48 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-48
493 || qmlUseGlyphCacheWorkaround(); // on some hardware the workaround is faster (see QTBUG-29264)
qmlUseGlyphCacheWorkaround()Description
TRUEnever evaluated
FALSEevaluated 48 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-48
494 set = true;-
495 }
executed 48 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
48
496 return useWorkaround;
executed 31354 times by 24 tests: return useWorkaround;
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
31354
497}-
498-
499bool QSGDefaultDistanceFieldGlyphCache::useTextureUploadWorkaround() const-
500{-
501 static bool set = false;-
502 static bool useWorkaround = false;-
503 if (!set) {
!setDescription
TRUEevaluated 48 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 29111 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
48-29111
504 useWorkaround = qstrcmp(reinterpret_cast<const char*>(m_funcs->glGetString(GL_RENDERER)),-
505 "Mali-400 MP") == 0;-
506 set = true;-
507 }
executed 48 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
48
508 return useWorkaround;
executed 29159 times by 24 tests: return useWorkaround;
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
29159
509}-
510-
511bool QSGDefaultDistanceFieldGlyphCache::createFullSizeTextures() const-
512{-
513 return qsgPreferFullSizeGlyphCacheTextures() && glyphCount() > QT_DISTANCEFIELD_HIGHGLYPHCOUNT();
executed 1620 times by 24 tests: return qsgPreferFullSizeGlyphCacheTextures() && glyphCount() > QT_DISTANCEFIELD_HIGHGLYPHCOUNT();
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
1620
514}-
515-
516int QSGDefaultDistanceFieldGlyphCache::maxTextureSize() const-
517{-
518 if (!m_maxTextureSize)
!m_maxTextureSizeDescription
TRUEevaluated 1622 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 59246 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
1622-59246
519 m_funcs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &m_maxTextureSize);
executed 1622 times by 24 tests: m_funcs->glGetIntegerv( 0x0D33 , &m_maxTextureSize);
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
520 return m_maxTextureSize;
executed 60868 times by 24 tests: return m_maxTextureSize;
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
60868
521}-
522-
523QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0