OpenCoverage

qsgdefaultrendercontext.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/qsgdefaultrendercontext.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 "qsgdefaultrendercontext_p.h"-
41-
42#include <QtGui/QGuiApplication>-
43#include <QtGui/QOpenGLFramebufferObject>-
44-
45#include <QtQuick/private/qsgbatchrenderer_p.h>-
46#include <QtQuick/private/qsgrenderer_p.h>-
47#include <QtQuick/private/qsgatlastexture_p.h>-
48#include <QtQuick/private/qsgcompressedtexture_p.h>-
49#include <QtQuick/private/qsgdefaultdistancefieldglyphcache_p.h>-
50-
51QT_BEGIN_NAMESPACE-
52-
53#define QSG_RENDERCONTEXT_PROPERTY "_q_sgrendercontext"-
54-
55QSGDefaultRenderContext::QSGDefaultRenderContext(QSGContext *context)-
56 : QSGRenderContext(context)-
57 , m_gl(nullptr)-
58 , m_depthStencilManager(nullptr)-
59 , m_maxTextureSize(0)-
60 , m_brokenIBOs(false)-
61 , m_serializedRender(false)-
62 , m_attachToGLContext(true)-
63 , m_atlasManager(nullptr)-
64{-
65-
66}
executed 314 times by 90 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • ...
314
67-
68/*!-
69 Initializes the scene graph render context with the GL context \a context. This also-
70 emits the ready() signal so that the QML graph can start building scene graph nodes.-
71 */-
72void QSGDefaultRenderContext::initialize(void *context)-
73{-
74 if (!m_sg)
!m_sgDescription
TRUEnever evaluated
FALSEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
0-3124
75 return;
never executed: return;
0
76-
77 QOpenGLContext *openglContext = static_cast<QOpenGLContext *>(context);-
78-
79 QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();-
80 funcs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &m_maxTextureSize);-
81-
82 // Sanity check the surface format, in case it was overridden by the application-
83 QSurfaceFormat requested = m_sg->defaultSurfaceFormat();-
84 QSurfaceFormat actual = openglContext->format();-
85 if (requested.depthBufferSize() > 0 && actual.depthBufferSize() <= 0)
requested.dept...fferSize() > 0Description
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
actual.depthBufferSize() <= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_nodestest
FALSEevaluated 3122 times by 75 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • ...
0-3124
86 qWarning("QSGContext::initialize: depth buffer support missing, expect rendering errors");
executed 2 times by 1 test: QMessageLogger(__FILE__, 86, __PRETTY_FUNCTION__).warning("QSGContext::initialize: depth buffer support missing, expect rendering errors");
Executed by:
  • tst_nodestest
2
87 if (requested.stencilBufferSize() > 0 && actual.stencilBufferSize() <= 0)
requested.sten...fferSize() > 0Description
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
actual.stencil...ferSize() <= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_nodestest
FALSEevaluated 3122 times by 75 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • ...
0-3124
88 qWarning("QSGContext::initialize: stencil buffer support missing, expect rendering errors");
executed 2 times by 1 test: QMessageLogger(__FILE__, 88, __PRETTY_FUNCTION__).warning("QSGContext::initialize: stencil buffer support missing, expect rendering errors");
Executed by:
  • tst_nodestest
2
89-
90 if (!m_atlasManager)
!m_atlasManagerDescription
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
0-3124
91 m_atlasManager = new QSGAtlasTexture::Manager();
executed 3124 times by 76 tests: m_atlasManager = new QSGAtlasTexture::Manager();
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
3124
92-
93 Q_ASSERT_X(!m_gl, "QSGRenderContext::initialize", "already initialized!");-
94 m_gl = openglContext;-
95 if (m_attachToGLContext) {
m_attachToGLContextDescription
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
0-3124
96 Q_ASSERT(!openglContext->property(QSG_RENDERCONTEXT_PROPERTY).isValid());-
97 openglContext->setProperty(QSG_RENDERCONTEXT_PROPERTY, QVariant::fromValue(this));-
98 }
executed 3124 times by 76 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
3124
99 m_sg->renderContextInitialized(this);-
100-
101#ifdef Q_OS_LINUX-
102 const char *vendor = (const char *) funcs->glGetString(GL_VENDOR);-
103 if (vendor && strstr(vendor, "nouveau"))
vendorDescription
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
strstr(vendor, "nouveau")Description
TRUEnever evaluated
FALSEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
0-3124
104 m_brokenIBOs = true;
never executed: m_brokenIBOs = true;
0
105 const char *renderer = (const char *) funcs->glGetString(GL_RENDERER);-
106 if (renderer && strstr(renderer, "llvmpipe"))
rendererDescription
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
strstr(renderer, "llvmpipe")Description
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
0-3124
107 m_serializedRender = true;
executed 3124 times by 76 tests: m_serializedRender = true;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
3124
108 if (vendor && renderer && strstr(vendor, "Hisilicon Technologies") && strstr(renderer, "Immersion.16"))
vendorDescription
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
rendererDescription
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
strstr(vendor,...Technologies")Description
TRUEnever evaluated
FALSEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
strstr(rendere...Immersion.16")Description
TRUEnever evaluated
FALSEnever evaluated
0-3124
109 m_brokenIBOs = true;
never executed: m_brokenIBOs = true;
0
110#endif-
111-
112 emit initialized();-
113}
executed 3124 times by 76 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
3124
114-
115-
116void QSGDefaultRenderContext::invalidate()-
117{-
118 if (!m_gl)
!m_glDescription
TRUEevaluated 1823 times by 40 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickdynamicpropertyanimation
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitemlayer
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickopenglinfo
  • tst_qquickparticlesystem
  • ...
FALSEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
1823-3124
119 return;
executed 1823 times by 40 tests: return;
Executed by:
  • tst_qqmlcomponent
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickdynamicpropertyanimation
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitemlayer
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickopenglinfo
  • tst_qquickparticlesystem
  • ...
1823
120-
121 qDeleteAll(m_texturesToDelete);-
122 m_texturesToDelete.clear();-
123-
124 qDeleteAll(m_textures);-
125 m_textures.clear();-
126-
127 /* The cleanup of the atlas textures is a bit intriguing.-
128 As part of the cleanup in the threaded render loop, we-
129 do:-
130 1. call this function-
131 2. call QCoreApp::sendPostedEvents() to immediately process-
132 any pending deferred deletes.-
133 3. delete the GL context.-
134-
135 As textures need the atlas manager while cleaning up, the-
136 manager needs to be cleaned up after the textures, so-
137 we post a deleteLater here at the very bottom so it gets-
138 deferred deleted last.-
139-
140 Another alternative would be to use a QPointer in-
141 QSGAtlasTexture::Texture, but this seemed simpler.-
142 */-
143 m_atlasManager->invalidate();-
144 m_atlasManager->deleteLater();-
145 m_atlasManager = nullptr;-
146-
147 // The following piece of code will read/write to the font engine's caches,-
148 // potentially from different threads. However, this is safe because this-
149 // code is only called from QQuickWindow's shutdown which is called-
150 // only when the GUI is blocked, and multiple threads will call it in-
151 // sequence. (see qsgdefaultglyphnode_p.cpp's init())-
152 for (QSet<QFontEngine *>::const_iterator it = m_fontEnginesToClean.constBegin(),-
153 end = m_fontEnginesToClean.constEnd(); it != end; ++it) {
it != endDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_scenegraph
FALSEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
16-3124
154 (*it)->clearGlyphCache(m_gl);-
155 if (!(*it)->ref.deref())
!(*it)->ref.deref()Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_scenegraph
0-16
156 delete *it;
never executed: delete *it;
0
157 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_scenegraph
16
158 m_fontEnginesToClean.clear();-
159-
160 delete m_depthStencilManager;-
161 m_depthStencilManager = nullptr;-
162-
163 qDeleteAll(m_glyphCaches);-
164 m_glyphCaches.clear();-
165-
166 if (m_gl->property(QSG_RENDERCONTEXT_PROPERTY) == QVariant::fromValue(this))
m_gl->property...romValue(this)Description
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
0-3124
167 m_gl->setProperty(QSG_RENDERCONTEXT_PROPERTY, QVariant());
executed 3124 times by 76 tests: m_gl->setProperty("_q_sgrendercontext", QVariant());
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
3124
168 m_gl = nullptr;-
169-
170 if (m_sg)
m_sgDescription
TRUEevaluated 3124 times by 76 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
FALSEnever evaluated
0-3124
171 m_sg->renderContextInvalidated(this);
executed 3124 times by 76 tests: m_sg->renderContextInvalidated(this);
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
3124
172 emit invalidated();-
173}
executed 3124 times by 76 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
3124
174-
175static QBasicMutex qsg_framerender_mutex;-
176-
177void QSGDefaultRenderContext::renderNextFrame(QSGRenderer *renderer, uint fboId)-
178{-
179 if (m_serializedRender)
m_serializedRenderDescription
TRUEevaluated 50599 times by 75 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • ...
FALSEnever evaluated
0-50599
180 qsg_framerender_mutex.lock();
executed 50599 times by 75 tests: qsg_framerender_mutex.lock();
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • ...
50599
181-
182 renderer->renderScene(fboId);-
183-
184 if (m_serializedRender)
m_serializedRenderDescription
TRUEevaluated 50599 times by 75 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • ...
FALSEnever evaluated
0-50599
185 qsg_framerender_mutex.unlock();
executed 50599 times by 75 tests: qsg_framerender_mutex.unlock();
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • ...
50599
186}
executed 50599 times by 75 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • ...
50599
187-
188/*!-
189 Returns a shared pointer to a depth stencil buffer that can be used with \a fbo.-
190*/-
191QSharedPointer<QSGDepthStencilBuffer> QSGDefaultRenderContext::depthStencilBufferForFbo(QOpenGLFramebufferObject *fbo)-
192{-
193 if (!m_gl)
!m_glDescription
TRUEnever evaluated
FALSEevaluated 85 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
0-85
194 return QSharedPointer<QSGDepthStencilBuffer>();
never executed: return QSharedPointer<QSGDepthStencilBuffer>();
0
195 QSGDepthStencilBufferManager *manager = depthStencilBufferManager();-
196 QSGDepthStencilBuffer::Format format;-
197 format.size = fbo->size();-
198 format.samples = fbo->format().samples();-
199 format.attachments = QSGDepthStencilBuffer::DepthAttachment | QSGDepthStencilBuffer::StencilAttachment;-
200 QSharedPointer<QSGDepthStencilBuffer> buffer = manager->bufferForFormat(format);-
201 if (buffer.isNull()) {
buffer.isNull()Description
TRUEevaluated 67 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickitemlayer
18-67
202 buffer = QSharedPointer<QSGDepthStencilBuffer>(new QSGDefaultDepthStencilBuffer(m_gl, format));-
203 manager->insertBuffer(buffer);-
204 }
executed 67 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
67
205 return buffer;
executed 85 times by 5 tests: return buffer;
Executed by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
85
206}-
207-
208/*!-
209 Returns a pointer to the context's depth/stencil buffer manager. This is useful for custom-
210 implementations of \l depthStencilBufferForFbo().-
211*/-
212QSGDepthStencilBufferManager *QSGDefaultRenderContext::depthStencilBufferManager()-
213{-
214 if (!m_gl)
!m_glDescription
TRUEnever evaluated
FALSEevaluated 85 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
0-85
215 return nullptr;
never executed: return nullptr;
0
216 if (!m_depthStencilManager)
!m_depthStencilManagerDescription
TRUEevaluated 57 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
FALSEevaluated 28 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
28-57
217 m_depthStencilManager = new QSGDepthStencilBufferManager(m_gl);
executed 57 times by 5 tests: m_depthStencilManager = new QSGDepthStencilBufferManager(m_gl);
Executed by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
57
218 return m_depthStencilManager;
executed 85 times by 5 tests: return m_depthStencilManager;
Executed by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
85
219}-
220-
221QSGTexture *QSGDefaultRenderContext::createTexture(const QImage &image, uint flags) const-
222{-
223 bool atlas = flags & CreateTexture_Atlas;-
224 bool mipmap = flags & CreateTexture_Mipmap;-
225 bool alpha = flags & CreateTexture_Alpha;-
226-
227 // The atlas implementation is only supported from the render thread and-
228 // does not support mipmaps.-
229 if (!mipmap && atlas && openglContext() && QThread::currentThread() == openglContext()->thread()) {
!mipmapDescription
TRUEevaluated 427 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickspritesequence
  • tst_qquicktext
  • tst_scenegraph
FALSEnever evaluated
atlasDescription
TRUEevaluated 367 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 60 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickspritesequence
  • tst_qquicktext
openglContext()Description
TRUEevaluated 367 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEnever evaluated
QThread::curre...xt()->thread()Description
TRUEevaluated 367 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEnever evaluated
0-427
230 QSGTexture *t = m_atlasManager->create(image, alpha);-
231 if (t)
tDescription
TRUEevaluated 289 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 78 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_scenegraph
78-289
232 return t;
executed 289 times by 8 tests: return t;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
289
233 }
executed 78 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickimage
  • tst_scenegraph
78
234-
235 QSGPlainTexture *texture = new QSGPlainTexture();-
236 texture->setImage(image);-
237 if (texture->hasAlphaChannel() && !alpha)
texture->hasAlphaChannel()Description
TRUEevaluated 84 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickspritesequence
  • tst_qquicktext
FALSEevaluated 54 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_scenegraph
!alphaDescription
TRUEnever evaluated
FALSEevaluated 84 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickspritesequence
  • tst_qquicktext
0-84
238 texture->setHasAlphaChannel(false);
never executed: texture->setHasAlphaChannel(false);
0
239-
240 return texture;
executed 138 times by 6 tests: return texture;
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickspritesequence
  • tst_qquicktext
  • tst_scenegraph
138
241}-
242-
243QSGRenderer *QSGDefaultRenderContext::createRenderer()-
244{-
245 return new QSGBatchRenderer::Renderer(this);
executed 3575 times by 75 tests: return new QSGBatchRenderer::Renderer(this);
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • ...
3575
246}-
247-
248QSGTexture *QSGDefaultRenderContext::compressedTextureForFactory(const QSGCompressedTextureFactory *factory) const-
249{-
250 // The atlas implementation is only supported from the render thread-
251 if (openglContext() && QThread::currentThread() == openglContext()->thread())
openglContext()Description
TRUEnever evaluated
FALSEnever evaluated
QThread::curre...xt()->thread()Description
TRUEnever evaluated
FALSEnever evaluated
0
252 return m_atlasManager->create(factory);
never executed: return m_atlasManager->create(factory);
0
253 return nullptr;
never executed: return nullptr;
0
254}-
255-
256/*!-
257 Compile \a shader, optionally using \a vertexCode and \a fragmentCode as-
258 replacement for the source code supplied by \a shader.-
259-
260 If \a vertexCode or \a fragmentCode is supplied, the caller is responsible-
261 for setting up attribute bindings.-
262-
263 \a material is supplied in case the implementation needs to take the-
264 material flags into account.-
265 */-
266void QSGDefaultRenderContext::compileShader(QSGMaterialShader *shader, QSGMaterial *material, const char *vertexCode, const char *fragmentCode)-
267{-
268 Q_UNUSED(material);-
269 if (vertexCode || fragmentCode) {
vertexCodeDescription
TRUEevaluated 4360 times by 69 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
FALSEevaluated 144 times by 30 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpincharea
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • ...
fragmentCodeDescription
TRUEnever evaluated
FALSEevaluated 144 times by 30 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpincharea
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • ...
0-4360
270 Q_ASSERT_X((material->flags() & QSGMaterial::CustomCompileStep) == 0,-
271 "QSGRenderContext::compile()",-
272 "materials with custom compile step cannot have modified vertex or fragment code");-
273 QOpenGLShaderProgram *p = shader->program();-
274 p->addCacheableShaderFromSourceCode(QOpenGLShader::Vertex, vertexCode ? vertexCode : shader->vertexShader());-
275 p->addCacheableShaderFromSourceCode(QOpenGLShader::Fragment, fragmentCode ? fragmentCode : shader->fragmentShader());-
276 p->link();-
277 if (!p->isLinked())
!p->isLinked()Description
TRUEnever evaluated
FALSEevaluated 4360 times by 69 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
0-4360
278 qWarning() << "shader compilation failed:" << endl << p->log();
never executed: QMessageLogger(__FILE__, 278, __PRETTY_FUNCTION__).warning() << "shader compilation failed:" << endl << p->log();
0
279 } else {
executed 4360 times by 69 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
4360
280 shader->compile();-
281 }
executed 144 times by 30 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpincharea
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • ...
144
282}-
283-
284QString QSGDefaultRenderContext::fontKey(const QRawFont &font)-
285{-
286 QFontEngine *fe = QRawFontPrivate::get(font)->fontEngine;-
287 if (!fe->faceId().filename.isEmpty()) {
!fe->faceId()....name.isEmpty()Description
TRUEevaluated 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
FALSEnever evaluated
0-249131
288 QByteArray keyName = fe->faceId().filename;-
289 if (font.style() != QFont::StyleNormal)
font.style() !...t::StyleNormalDescription
TRUEevaluated 41 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 249090 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
41-249090
290 keyName += QByteArray(" I");
executed 41 times by 2 tests: keyName += QByteArray(" I");
Executed by:
  • tst_examples
  • tst_qquicktext
41
291 if (font.weight() != QFont::Normal)
font.weight() != QFont::NormalDescription
TRUEevaluated 358 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
FALSEevaluated 248773 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
358-248773
292 keyName += ' ' + QByteArray::number(font.weight());
executed 358 times by 4 tests: keyName += ' ' + QByteArray::number(font.weight());
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
358
293 keyName += QByteArray(" DF");-
294 return QString::fromUtf8(keyName);
executed 249131 times by 24 tests: return QString::fromUtf8(keyName);
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
295 } else {-
296 return QString::fromLatin1("%1_%2_%3_%4")
never executed: return QString::fromLatin1("%1_%2_%3_%4") .arg(font.familyName()) .arg(font.styleName()) .arg(font.weight()) .arg(font.style());
0
297 .arg(font.familyName())
never executed: return QString::fromLatin1("%1_%2_%3_%4") .arg(font.familyName()) .arg(font.styleName()) .arg(font.weight()) .arg(font.style());
0
298 .arg(font.styleName())
never executed: return QString::fromLatin1("%1_%2_%3_%4") .arg(font.familyName()) .arg(font.styleName()) .arg(font.weight()) .arg(font.style());
0
299 .arg(font.weight())
never executed: return QString::fromLatin1("%1_%2_%3_%4") .arg(font.familyName()) .arg(font.styleName()) .arg(font.weight()) .arg(font.style());
0
300 .arg(font.style());
never executed: return QString::fromLatin1("%1_%2_%3_%4") .arg(font.familyName()) .arg(font.styleName()) .arg(font.weight()) .arg(font.style());
0
301 }-
302}-
303-
304void QSGDefaultRenderContext::initializeShader(QSGMaterialShader *shader)-
305{-
306 shader->program()->bind();-
307 shader->initialize();-
308}
executed 4504 times by 70 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
4504
309-
310void QSGDefaultRenderContext::setAttachToGraphicsContext(bool attach)-
311{-
312 Q_ASSERT(!isValid());-
313 m_attachToGLContext = attach;-
314}
never executed: end of block
0
315-
316QSGDefaultRenderContext *QSGDefaultRenderContext::from(QOpenGLContext *context)-
317{-
318 return qobject_cast<QSGDefaultRenderContext *>(context->property(QSG_RENDERCONTEXT_PROPERTY).value<QObject *>());
executed 303 times by 28 tests: return qobject_cast<QSGDefaultRenderContext *>(context->property("_q_sgrendercontext").value<QObject *>());
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickpainteditem
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquicktargetdirection
  • tst_qquicktext
  • tst_qquicktrailemitter
  • ...
303
319}-
320-
321bool QSGDefaultRenderContext::separateIndexBuffer() const-
322{-
323 // WebGL: A given WebGLBuffer object may only be bound to one of-
324 // the ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target in its-
325 // lifetime. An attempt to bind a buffer object to the other-
326 // target will generate an INVALID_OPERATION error, and the-
327 // current binding will remain untouched.-
328 static const bool isWebGL = qGuiApp->platformName().compare(QLatin1String("webgl")) == 0;-
329 return isWebGL;
executed 332948 times by 76 tests: return isWebGL;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • ...
332948
330}-
331-
332QSGDistanceFieldGlyphCache *QSGDefaultRenderContext::distanceFieldGlyphCache(const QRawFont &font)-
333{-
334 QString key = fontKey(font);-
335 QSGDistanceFieldGlyphCache *cache = m_glyphCaches.value(key, 0);-
336 if (!cache) {
!cacheDescription
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 247509 times by 19 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_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
1622-247509
337 cache = new QSGDefaultDistanceFieldGlyphCache(openglContext(), font);-
338 m_glyphCaches.insert(key, cache);-
339 }
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
340-
341 return cache;
executed 249131 times by 24 tests: return cache;
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
342}-
343-
344QT_END_NAMESPACE-
345-
346#include "moc_qsgdefaultrendercontext_p.cpp"-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0