OpenCoverage

qsgatlastexture.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgatlastexture.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12int qt_sg_envInt(const char *name, int defaultValue);-
13-
14static QElapsedTimer qsg_renderer_timer;-
15-
16static bool qsgEnableCompressedAtlas() { static enum { Yes, No, Unknown } status = Unknown; if (status == Unknown
status == UnknownDescription
TRUEnever evaluated
FALSEnever evaluated
) { status = No; if (__builtin_expect(!!(!qEnvironmentVariableIsEmpty("QSG_ENABLE_COMPRESSED_ATLAS")), false)
__builtin_expe...LAS")), false)Description
TRUEnever evaluated
FALSEnever evaluated
) { const QByteArray v = qgetenv("QSG_ENABLE_COMPRESSED_ATLAS"); if (v != "0"
v != "0"Description
TRUEnever evaluated
FALSEnever evaluated
&& v != "false"
v != "false"Description
TRUEnever evaluated
FALSEnever evaluated
) status = Yes;
never executed: status = Yes;
}
never executed: end of block
}
never executed: end of block
return
never executed: return status == Yes;
status == Yes;
never executed: return status == Yes;
}
0
17-
18namespace QSGAtlasTexture-
19{-
20-
21Manager::Manager()-
22 : m_atlas(nullptr)-
23{-
24 QOpenGLContext *gl = QOpenGLContext::currentContext();-
25 ((gl) ? static_cast<void>(0) : qt_assert("gl", __FILE__, 81));-
26 QSurface *surface = gl->surface();-
27 QSize surfaceSize = surface->size();-
28 int max;-
29 gl->functions()->glGetIntegerv(-
30 0x0D33-
31 , &max);-
32-
33 int w = qMin(max, qt_sg_envInt("QSG_ATLAS_WIDTH", qMax(512U, qNextPowerOfTwo(surfaceSize.width() - 1))));-
34 int h = qMin(max, qt_sg_envInt("QSG_ATLAS_HEIGHT", qMax(512U, qNextPowerOfTwo(surfaceSize.height() - 1))));-
35-
36 if (surface->surfaceClass() == QSurface::Window
surface->surfa...urface::WindowDescription
TRUEevaluated 3010 times by 74 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
  • ...
FALSEevaluated 114 times by 3 tests
Evaluated by:
  • tst_nodestest
  • tst_qquickshortcut
  • tst_qquickwidget
) {
114-3010
37 QWindow *window = static_cast<QWindow *>(surface);-
38-
39 if ((
(window->type(...t::CoverWindowDescription
TRUEnever evaluated
FALSEevaluated 3010 times by 74 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
  • ...
window->type() & Qt::CoverWindow) == Qt::CoverWindow
(window->type(...t::CoverWindowDescription
TRUEnever evaluated
FALSEevaluated 3010 times by 74 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-3010
40 w /= 2;-
41 h /= 2;-
42 }
never executed: end of block
0
43 }
executed 3010 times by 74 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
  • ...
3010
44-
45 m_atlas_size_limit = qt_sg_envInt("QSG_ATLAS_SIZE_LIMIT", qMax(w, h) / 2);-
46 m_atlas_size = QSize(w, h);-
47-
48 for (bool qt_category_enabled = QSG_LOG_INFO().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
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
  • ...
; qt_category_enabled = false) QMessageLogger(__FILE__, 102, __PRETTY_FUNCTION__, QSG_LOG_INFO().categoryName()).debug("texture atlas dimensions: %dx%d", w, h);
never executed: QMessageLogger(__FILE__, 102, __PRETTY_FUNCTION__, QSG_LOG_INFO().categoryName()).debug("texture atlas dimensions: %dx%d", w, h);
0-3124
49}
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
50-
51-
52Manager::~Manager()-
53{-
54 ((m_atlas == nullptr) ? static_cast<void>(0) : qt_assert("m_atlas == nullptr", __FILE__, 108));-
55 ((m_atlases.isEmpty()) ? static_cast<void>(0) : qt_assert("m_atlases.isEmpty()", __FILE__, 109));-
56}
executed 3098 times by 70 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • 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_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • tst_qquickimage
  • ...
3098
57-
58void Manager::invalidate()-
59{-
60 if (m_atlas
m_atlasDescription
TRUEevaluated 137 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 2987 times by 71 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmlcomponent
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
) {
137-2987
61 m_atlas->invalidate();-
62 m_atlas->deleteLater();-
63 m_atlas = nullptr;-
64 }
executed 137 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
137
65-
66 QHash<unsigned int, QSGCompressedAtlasTexture::Atlas*>::iterator i = m_atlases.begin();-
67 while (i != m_atlases.end()
i != m_atlases.end()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
68 i.value()->invalidate();-
69 i.value()->deleteLater();-
70 ++i;-
71 }
never executed: end of block
0
72 m_atlases.clear();-
73}
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
74-
75QSGTexture *Manager::create(const QImage &image, bool hasAlphaChannel)-
76{-
77 Texture *t = nullptr;-
78 if (image.width() < m_atlas_size_limit
image.width() ...las_size_limitDescription
TRUEevaluated 307 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 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_scenegraph
&& image.height() < m_atlas_size_limit
image.height()...las_size_limitDescription
TRUEevaluated 301 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
) {
6-307
79 if (!m_atlas
!m_atlasDescription
TRUEevaluated 137 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 164 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickimage
)
137-164
80 m_atlas = new Atlas(m_atlas_size);
executed 137 times by 8 tests: m_atlas = new Atlas(m_atlas_size);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
137
81-
82 t = m_atlas->create(image);-
83 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 12 times by 1 test
Evaluated by:
  • tst_examples
&& !hasAlphaChannel
!hasAlphaChannelDescription
TRUEnever evaluated
FALSEevaluated 289 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
&& t->hasAlphaChannel()
t->hasAlphaChannel()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-289
84 t->setHasAlphaChannel(false);
never executed: t->setHasAlphaChannel(false);
0
85 }
executed 301 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
301
86 return
executed 367 times by 8 tests: return t;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
t;
executed 367 times by 8 tests: return t;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
367
87}-
88-
89QSGTexture *Manager::create(const QSGCompressedTextureFactory *factory)-
90{-
91 QSGTexture *t = nullptr;-
92 if (!qsgEnableCompressedAtlas()
!qsgEnableCompressedAtlas()Description
TRUEnever evaluated
FALSEnever evaluated
|| !factory->m_textureData
!factory->m_textureDataDescription
TRUEnever evaluated
FALSEnever evaluated
|| !factory->m_textureData->isValid()
!factory->m_te...ata->isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
93 return
never executed: return t;
t;
never executed: return t;
0
94-
95-
96 unsigned int format = factory->m_textureData->format;-
97 switch (format) {-
98 case
never executed: case QOpenGLTexture::RGB8_ETC1:
QOpenGLTexture::RGB8_ETC1:
never executed: case QOpenGLTexture::RGB8_ETC1:
0
99 case
never executed: case QOpenGLTexture::RGB8_ETC2:
QOpenGLTexture::RGB8_ETC2:
never executed: case QOpenGLTexture::RGB8_ETC2:
0
100 case
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
QOpenGLTexture::RGBA8_ETC2_EAC:
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
0
101 case
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
0
102 break;
never executed: break;
0
103 default
never executed: default:
:
never executed: default:
0
104 return
never executed: return t;
t;
never executed: return t;
0
105 }-
106-
107 QSize size = factory->m_textureData->size;-
108 if (size.width() < m_atlas_size_limit
size.width() <...las_size_limitDescription
TRUEnever evaluated
FALSEnever evaluated
&& size.height() < m_atlas_size_limit
size.height() ...las_size_limitDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
109 QHash<unsigned int, QSGCompressedAtlasTexture::Atlas*>::iterator i = m_atlases.find(format);-
110 if (i == m_atlases.end()
i == m_atlases.end()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
111 i = m_atlases.insert(format, new QSGCompressedAtlasTexture::Atlas(m_atlas_size, format));
never executed: i = m_atlases.insert(format, new QSGCompressedAtlasTexture::Atlas(m_atlas_size, format));
0
112-
113 QSize paddedSize(((size.width() + 3) / 4) * 4, ((size.height() + 3) / 4) * 4);-
114 QByteArray data = factory->m_textureData->data;-
115 t = i.value()->create(data, factory->m_textureData->sizeInBytes(), factory->m_textureData->dataOffset, size, paddedSize);-
116 }
never executed: end of block
0
117 return
never executed: return t;
t;
never executed: return t;
0
118}-
119-
120AtlasBase::AtlasBase(const QSize &size)-
121 : m_allocator(size)-
122 , m_texture_id(0)-
123 , m_size(size)-
124 , m_allocated(false)-
125{-
126}
executed 137 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
137
127-
128AtlasBase::~AtlasBase()-
129{-
130 ((!m_texture_id) ? static_cast<void>(0) : qt_assert("!m_texture_id", __FILE__, 184));-
131}
executed 135 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
135
132-
133void AtlasBase::invalidate()-
134{-
135 if (m_texture_id
m_texture_idDescription
TRUEevaluated 113 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 24 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickshadereffect
  • tst_scenegraph
&& QOpenGLContext::currentContext()
QOpenGLContext...rrentContext()Description
TRUEevaluated 113 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-113
136 QOpenGLContext::currentContext()->functions()->glDeleteTextures(1, &m_texture_id);
executed 113 times by 8 tests: QOpenGLContext::currentContext()->functions()->glDeleteTextures(1, &m_texture_id);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
113
137 m_texture_id = 0;-
138}
executed 137 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
137
139-
140int AtlasBase::textureId() const-
141{-
142 if (!m_texture_id
!m_texture_idDescription
TRUEevaluated 68 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickitemparticle
  • tst_scenegraph
FALSEevaluated 86668 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickitemparticle
  • tst_scenegraph
) {
68-86668
143 ((QOpenGLContext::currentContext()) ? static_cast<void>(0) : qt_assert("QOpenGLContext::currentContext()", __FILE__, 197));-
144 QOpenGLContext::currentContext()->functions()->glGenTextures(1, &const_cast<AtlasBase *>(this)->m_texture_id);-
145 }
executed 68 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickitemparticle
  • tst_scenegraph
68
146-
147 return
executed 86736 times by 4 tests: return m_texture_id;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickitemparticle
  • tst_scenegraph
m_texture_id;
executed 86736 times by 4 tests: return m_texture_id;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickitemparticle
  • tst_scenegraph
86736
148}-
149-
150void AtlasBase::bind(QSGTexture::Filtering filtering)-
151{-
152 QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();-
153 if (!m_allocated
!m_allocatedDescription
TRUEevaluated 113 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 1324 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) {
113-1324
154 m_allocated = true;-
155-
156 while (funcs->glGetError() !=
funcs->glGetError() != 0Description
TRUEnever evaluated
FALSEevaluated 113 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-113
157 0
funcs->glGetError() != 0Description
TRUEnever evaluated
FALSEevaluated 113 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-113
158 ) ;
never executed: ;
0
159-
160 funcs->glGenTextures(1, &m_texture_id);-
161 funcs->glBindTexture(-
162 0x0DE1-
163 , m_texture_id);-
164 funcs->glTexParameteri(-
165 0x0DE1-
166 , -
167 0x2801-
168 , -
169 0x2601-
170 );-
171 funcs->glTexParameteri(-
172 0x0DE1-
173 , -
174 0x2800-
175 , -
176 0x2601-
177 );-
178 funcs->glTexParameteri(-
179 0x0DE1-
180 , -
181 0x2802-
182 , -
183 0x812F-
184 );-
185 funcs->glTexParameteri(-
186 0x0DE1-
187 , -
188 0x2803-
189 , -
190 0x812F-
191 );-
192-
193 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEevaluated 113 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-113
194 funcs->glTexParameteri(
executed 113 times by 8 tests: funcs->glTexParameteri( 0x0DE1 , 0x813D , 0);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
113
195 0x0DE1
executed 113 times by 8 tests: funcs->glTexParameteri( 0x0DE1 , 0x813D , 0);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
113
196 ,
executed 113 times by 8 tests: funcs->glTexParameteri( 0x0DE1 , 0x813D , 0);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
113
197 0x813D
executed 113 times by 8 tests: funcs->glTexParameteri( 0x0DE1 , 0x813D , 0);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
113
198 , 0);
executed 113 times by 8 tests: funcs->glTexParameteri( 0x0DE1 , 0x813D , 0);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
113
199-
200 generateTexture();-
201-
202 GLenum errorCode = funcs->glGetError();-
203 if (errorCode ==
errorCode == 0x0505Description
TRUEnever evaluated
FALSEevaluated 113 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-113
204 0x0505
errorCode == 0x0505Description
TRUEnever evaluated
FALSEevaluated 113 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-113
205 ) {-
206 QMessageLogger(__FILE__, 226, __PRETTY_FUNCTION__).debug("QSGTextureAtlas: texture atlas allocation failed, out of memory");-
207 funcs->glDeleteTextures(1, &m_texture_id);-
208 m_texture_id = 0;-
209 }
never executed: end of block
else if (errorCode !=
errorCode != 0Description
TRUEnever evaluated
FALSEevaluated 113 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-113
210 0
errorCode != 0Description
TRUEnever evaluated
FALSEevaluated 113 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-113
211 ) {-
212 QMessageLogger(__FILE__, 230, __PRETTY_FUNCTION__).debug("QSGTextureAtlas: texture atlas allocation failed, code=%x", errorCode);-
213 funcs->glDeleteTextures(1, &m_texture_id);-
214 m_texture_id = 0;-
215 }
never executed: end of block
0
216 }
executed 113 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
else {
113
217 funcs->glBindTexture(-
218 0x0DE1-
219 , m_texture_id);-
220 }
executed 1324 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
1324
221-
222 if (m_texture_id == 0
m_texture_id == 0Description
TRUEnever evaluated
FALSEevaluated 1437 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
)
0-1437
223 return;
never executed: return;
0
224-
225-
226 for (int i=0; i<m_pending_uploads.size()
i<m_pending_uploads.size()Description
TRUEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 1437 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
; ++i) {
263-1437
227-
228 bool profileFrames = QSG_LOG_TIME_TEXTURE().isDebugEnabled();-
229 if (profileFrames
profileFramesDescription
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
)
0-263
230 qsg_renderer_timer.start();
never executed: qsg_renderer_timer.start();
0
231-
232 if (QQuickProfiler::featuresEnabled & (1 << QQuickProfiler::ProfileSceneGraph)
QQuickProfiler...ileSceneGraph)Description
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) { (QQuickProfiler::startSceneGraphFrame<QQuickProfiler::SceneGraphTexturePrepare>()); }
never executed: end of block
else (
executed 263 times by 8 tests: (void)0;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
void)0;
executed 263 times by 8 tests: (void)0;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-263
233-
234-
235 if (QQuickProfiler::featuresEnabled & (1 << QQuickProfiler::ProfileSceneGraph)
QQuickProfiler...ileSceneGraph)Description
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) { (QQuickProfiler::skipSceneGraphTimestamps<QQuickProfiler::SceneGraphTexturePrepare, 3>(QQuickProfiler::SceneGraphTexturePrepareStart)); }
never executed: end of block
else (
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
void)0
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-263
236 ;
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
263
237-
238 uploadPendingTexture(i);-
239-
240 if (QQuickProfiler::featuresEnabled & (1 << QQuickProfiler::ProfileSceneGraph)
QQuickProfiler...ileSceneGraph)Description
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) { (QQuickProfiler::recordSceneGraphTimestamp<QQuickProfiler::SceneGraphTexturePrepare>(QQuickProfiler::SceneGraphTexturePrepareUpload)); }
never executed: end of block
else (
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
void)0
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-263
241 ;
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
263
242-
243-
244 if (QQuickProfiler::featuresEnabled & (1 << QQuickProfiler::ProfileSceneGraph)
QQuickProfiler...ileSceneGraph)Description
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) { (QQuickProfiler::skipSceneGraphTimestamps<QQuickProfiler::SceneGraphTexturePrepare, 1>(QQuickProfiler::SceneGraphTexturePrepareUpload)); }
never executed: end of block
else (
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
void)0
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-263
245 ;
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
263
246 if (QQuickProfiler::featuresEnabled & (1 << QQuickProfiler::ProfileSceneGraph)
QQuickProfiler...ileSceneGraph)Description
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) { (QQuickProfiler::reportSceneGraphFrame<QQuickProfiler::SceneGraphTexturePrepare, false>(QQuickProfiler::SceneGraphTexturePrepareMipmap)); }
never executed: end of block
else (
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
void)0
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-263
247 ;
executed 263 times by 8 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
263
248 }-
249-
250 GLenum f = filtering == QSGTexture::Nearest
filtering == Q...xture::NearestDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 1405 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
?
32-1405
251 0x2600 -
252 : -
253 0x2601-
254 ;-
255 funcs->glTexParameteri(-
256 0x0DE1-
257 , -
258 0x2801-
259 , f);-
260 funcs->glTexParameteri(-
261 0x0DE1-
262 , -
263 0x2800-
264 , f);-
265-
266 m_pending_uploads.clear();-
267}
executed 1437 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
1437
268-
269void AtlasBase::remove(TextureBase *t)-
270{-
271 QRect atlasRect = t->atlasSubRect();-
272 m_allocator.deallocate(atlasRect);-
273 m_pending_uploads.removeOne(t);-
274}
executed 289 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
289
275-
276Atlas::Atlas(const QSize &size)-
277 : AtlasBase(size)-
278 , m_atlas_transient_image_threshold(0)-
279{-
280-
281 m_internalFormat = -
282 0x1908-
283 ;-
284 m_externalFormat = -
285 0x80E1-
286 ;-
287-
288-
289 if (QOpenGLContext::currentContext()->isOpenGLES()
QOpenGLContext...->isOpenGLES()Description
TRUEnever evaluated
FALSEevaluated 137 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) {
0-137
290 static bool wrongfullyReportsBgra8888Support = false;-
291-
292 const GLubyte *renderer = QOpenGLContext::currentContext()->functions()->glGetString(-
293 0x1F01-
294 );-
295 if (renderer
rendererDescription
TRUEnever evaluated
FALSEnever evaluated
&& strstr((const char *) renderer, "VideoCore IV")
strstr((const ...VideoCore IV")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
296 wrongfullyReportsBgra8888Support = true;
never executed: wrongfullyReportsBgra8888Support = true;
0
297-
298-
299 if (qEnvironmentVariableIsSet("QSG_ATLAS_NO_BGRA_WORKAROUNDS")
qEnvironmentVa..._WORKAROUNDS")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
300 wrongfullyReportsBgra8888Support = false;
never executed: wrongfullyReportsBgra8888Support = false;
0
301-
302 const char *ext = (const char *) QOpenGLContext::currentContext()->functions()->glGetString(-
303 0x1F03-
304 );-
305 if (ext
extDescription
TRUEnever evaluated
FALSEnever evaluated
&& !wrongfullyReportsBgra8888Support
!wrongfullyRep...gra8888SupportDescription
TRUEnever evaluated
FALSEnever evaluated
0
306 && (strstr(ext, "GL_EXT_bgra")
strstr(ext, "GL_EXT_bgra")Description
TRUEnever evaluated
FALSEnever evaluated
0
307 || strstr(ext, "GL_EXT_texture_format_BGRA8888")
strstr(ext, "G...mat_BGRA8888")Description
TRUEnever evaluated
FALSEnever evaluated
0
308 || strstr(ext, "GL_IMG_texture_format_BGRA8888")
strstr(ext, "G...mat_BGRA8888")Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
309 m_internalFormat = m_externalFormat = -
310 0x80E1-
311 ;-
312-
313-
314-
315-
316-
317 }
never executed: end of block
else {
0
318 m_internalFormat = m_externalFormat = -
319 0x1908-
320 ;-
321 }
never executed: end of block
0
322-
323-
324 }-
325-
326-
327 m_use_bgra_fallback = qEnvironmentVariableIsSet("QSG_ATLAS_USE_BGRA_FALLBACK");-
328 m_debug_overlay = qEnvironmentVariableIsSet("QSG_ATLAS_OVERLAY");-
329-
330-
331-
332-
333 m_atlas_transient_image_threshold = qt_sg_envInt("QSG_ATLAS_TRANSIENT_IMAGE_THRESHOLD", 0);-
334}
executed 137 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
137
335-
336Atlas::~Atlas()-
337{-
338}-
339-
340Texture *Atlas::create(const QImage &image)-
341{-
342-
343 QRect rect = m_allocator.allocate(QSize(image.width() + 2, image.height() + 2));-
344 if (rect.width() > 0
rect.width() > 0Description
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 12 times by 1 test
Evaluated by:
  • tst_examples
&& rect.height() > 0
rect.height() > 0Description
TRUEevaluated 289 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-289
345 Texture *t = new Texture(this, rect, image);-
346 m_pending_uploads << t;-
347 return
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
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
348 }-
349 return
executed 12 times by 1 test: return nullptr;
Executed by:
  • tst_examples
nullptr;
executed 12 times by 1 test: return nullptr;
Executed by:
  • tst_examples
12
350}-
351-
352static void swizzleBGRAToRGBA(QImage *image)-
353{-
354 const int width = image->width();-
355 const int height = image->height();-
356 uint *p = (uint *) image->bits();-
357 int stride = image->bytesPerLine() / 4;-
358 for (int i = 0; i < height
i < heightDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
359 for (int x = 0; x < width
x < widthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++x)
0
360 p[x] = ((p[x] << 16) & 0xff0000) | ((p[x] >> 16) & 0xff) | (p[x] & 0xff00ff00);
never executed: p[x] = ((p[x] << 16) & 0xff0000) | ((p[x] >> 16) & 0xff) | (p[x] & 0xff00ff00);
0
361 p += stride;-
362 }
never executed: end of block
0
363}
never executed: end of block
0
364-
365void Atlas::upload(Texture *texture)-
366{-
367 const QImage &image = texture->image();-
368 const QRect &r = texture->atlasSubRect();-
369-
370 QImage tmp(r.width(), r.height(), QImage::Format_ARGB32_Premultiplied);-
371 {-
372 QPainter p(&tmp);-
373 p.setCompositionMode(QPainter::CompositionMode_Source);-
374-
375 int w = r.width();-
376 int h = r.height();-
377 int iw = image.width();-
378 int ih = image.height();-
379-
380 p.drawImage(1, 1, image);-
381 p.drawImage(1, 0, image, 0, 0, iw, 1);-
382 p.drawImage(1, h - 1, image, 0, ih - 1, iw, 1);-
383 p.drawImage(0, 1, image, 0, 0, 1, ih);-
384 p.drawImage(w - 1, 1, image, iw - 1, 0, 1, ih);-
385 p.drawImage(0, 0, image, 0, 0, 1, 1);-
386 p.drawImage(0, h - 1, image, 0, ih - 1, 1, 1);-
387 p.drawImage(w - 1, 0, image, iw - 1, 0, 1, 1);-
388 p.drawImage(w - 1, h - 1, image, iw - 1, ih - 1, 1, 1);-
389 if (m_debug_overlay
m_debug_overlayDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
390 p.setCompositionMode(QPainter::CompositionMode_SourceAtop);-
391 p.fillRect(0, 0, iw, ih, QBrush(QColor::fromRgbF(1, 0, 1, 0.5)));-
392 }
never executed: end of block
0
393 }-
394-
395 if (m_externalFormat ==
m_externalFormat == 0x1908Description
TRUEnever evaluated
FALSEnever evaluated
0
396 0x1908
m_externalFormat == 0x1908Description
TRUEnever evaluated
FALSEnever evaluated
0
397 )-
398 swizzleBGRAToRGBA(&tmp);
never executed: swizzleBGRAToRGBA(&tmp);
0
399 QOpenGLContext::currentContext()->functions()->glTexSubImage2D(-
400 0x0DE1-
401 , 0,-
402 r.x(), r.y(), r.width(), r.height(),-
403 m_externalFormat, -
404 0x1401-
405 , tmp.constBits());-
406}
never executed: end of block
0
407-
408void Atlas::uploadBgra(Texture *texture)-
409{-
410 QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();-
411 const QRect &r = texture->atlasSubRect();-
412 QImage image = texture->image();-
413-
414 if (image.isNull()
image.isNull()Description
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
)
0-263
415 return;
never executed: return;
0
416-
417 if (image.format() != QImage::Format_ARGB32_Premultiplied
image.format()..._PremultipliedDescription
TRUEevaluated 72 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickimage
  • tst_scenegraph
FALSEevaluated 191 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
72-191
418 && image.format() != QImage::Format_RGB32
image.format()...::Format_RGB32Description
TRUEnever evaluated
FALSEevaluated 72 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickimage
  • tst_scenegraph
) {
0-72
419 image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);-
420 }
never executed: end of block
0
421-
422 if (m_debug_overlay
m_debug_overlayDescription
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) {
0-263
423 QPainter p(&image);-
424 p.setCompositionMode(QPainter::CompositionMode_SourceAtop);-
425 p.fillRect(0, 0, image.width(), image.height(), QBrush(QColor::fromRgbF(0, 1, 1, 0.5)));-
426 }
never executed: end of block
0
427-
428 QVarLengthArray<quint32, 512> tmpBits(qMax(image.width() + 2, image.height() + 2));-
429 int iw = image.width();-
430 int ih = image.height();-
431 int bpl = image.bytesPerLine() / 4;-
432 const quint32 *src = (const quint32 *) image.constBits();-
433 quint32 *dst = tmpBits.data();-
434-
435-
436 dst[0] = src[0];-
437 memcpy(dst + 1, src, iw * sizeof(quint32));-
438 dst[1 + iw] = src[iw-1];-
439 funcs->glTexSubImage2D(-
440 0x0DE1-
441 , 0, r.x(), r.y(), iw + 2, 1, m_externalFormat, -
442 0x1401-
443 , dst);-
444-
445-
446 const quint32 *lastRow = src + bpl * (ih - 1);-
447 dst[0] = lastRow[0];-
448 memcpy(dst + 1, lastRow, iw * sizeof(quint32));-
449 dst[1 + iw] = lastRow[iw-1];-
450 funcs->glTexSubImage2D(-
451 0x0DE1-
452 , 0, r.x(), r.y() + ih + 1, iw + 2, 1, m_externalFormat, -
453 0x1401-
454 , dst);-
455-
456-
457 for (int i=0; i<ih
i<ihDescription
TRUEevaluated 20294 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
; ++i)
263-20294
458 dst[i] = src[i * bpl];
executed 20294 times by 8 tests: dst[i] = src[i * bpl];
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
20294
459 funcs->glTexSubImage2D(-
460 0x0DE1-
461 , 0, r.x(), r.y() + 1, 1, ih, m_externalFormat, -
462 0x1401-
463 , dst);-
464-
465-
466 for (int i=0; i<ih
i<ihDescription
TRUEevaluated 20294 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
; ++i)
263-20294
467 dst[i] = src[i * bpl + iw - 1];
executed 20294 times by 8 tests: dst[i] = src[i * bpl + iw - 1];
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
20294
468 funcs->glTexSubImage2D(-
469 0x0DE1-
470 , 0, r.x() + iw + 1, r.y() + 1, 1, ih, m_externalFormat, -
471 0x1401-
472 , dst);-
473-
474-
475 if (bpl != iw
bpl != iwDescription
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) {
0-263
476 int sy = r.y() + 1;-
477 int ey = sy + r.height() - 2;-
478 for (int y = sy; y < ey
y < eyDescription
TRUEnever evaluated
FALSEnever evaluated
; ++y) {
0
479 funcs->glTexSubImage2D(-
480 0x0DE1-
481 , 0, r.x() + 1, y, r.width() - 2, 1, m_externalFormat, -
482 0x1401-
483 , src);-
484 src += bpl;-
485 }
never executed: end of block
0
486 }
never executed: end of block
else {
0
487 funcs->glTexSubImage2D(-
488 0x0DE1-
489 , 0, r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, m_externalFormat, -
490 0x1401-
491 , src);-
492 }
executed 263 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
263
493}-
494-
495void Atlas::generateTexture()-
496{-
497 QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();-
498 funcs->glTexImage2D(-
499 0x0DE1-
500 , 0, m_internalFormat, m_size.width(), m_size.height(), 0, m_externalFormat, -
501 0x1401-
502 , nullptr);-
503}
executed 113 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
113
504-
505void Atlas::uploadPendingTexture(int i)-
506{-
507 Texture *t = static_cast<Texture*>(m_pending_uploads.at(i));-
508 if (m_externalFormat ==
m_externalFormat == 0x80E1Description
TRUEevaluated 263 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-263
509 0x80E1
m_externalFormat == 0x80E1Description
TRUEevaluated 263 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-263
510 &&-
511 !m_use_bgra_fallback
!m_use_bgra_fallbackDescription
TRUEevaluated 263 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-263
512 uploadBgra(t);-
513 }
executed 263 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
else {
263
514 upload(t);-
515 }
never executed: end of block
0
516 const QSize textureSize = t->textureSize();-
517 if (textureSize.width() > m_atlas_transient_image_threshold
textureSize.wi...mage_thresholdDescription
TRUEevaluated 263 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-263
518 textureSize.height() > m_atlas_transient_image_threshold
textureSize.he...mage_thresholdDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
519 t->releaseImage();
executed 263 times by 8 tests: t->releaseImage();
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
263
520-
521 for (bool qt_category_enabled = QSG_LOG_TIME_TEXTURE().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 263 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 508 , __PRETTY_FUNCTION__, QSG_LOG_TIME_TEXTURE().categoryName()).debug("atlastexture uploaded in: %lldms (%dx%d)", qsg_renderer_timer.elapsed(), t->textureSize().width(), t->textureSize().height()) ;
0-263
5220
5230
524 __FILE__
never executed: QMessageLogger( __FILE__ , 508 , __PRETTY_FUNCTION__, QSG_LOG_TIME_TEXTURE().categoryName()).debug("atlastexture uploaded in: %lldms (%dx%d)", qsg_renderer_timer.elapsed(), t->textureSize().width(), t->textureSize().height()) ;
0
525 ,
never executed: QMessageLogger( __FILE__ , 508 , __PRETTY_FUNCTION__, QSG_LOG_TIME_TEXTURE().categoryName()).debug("atlastexture uploaded in: %lldms (%dx%d)", qsg_renderer_timer.elapsed(), t->textureSize().width(), t->textureSize().height()) ;
0
5260
5270
528 508
never executed: QMessageLogger( __FILE__ , 508 , __PRETTY_FUNCTION__, QSG_LOG_TIME_TEXTURE().categoryName()).debug("atlastexture uploaded in: %lldms (%dx%d)", qsg_renderer_timer.elapsed(), t->textureSize().width(), t->textureSize().height()) ;
0
529 , __PRETTY_FUNCTION__, QSG_LOG_TIME_TEXTURE().categoryName()).debug("atlastexture uploaded in: %lldms (%dx%d)", qsg_renderer_timer.elapsed(), t->textureSize().width(), t->textureSize().height())
never executed: QMessageLogger( __FILE__ , 508 , __PRETTY_FUNCTION__, QSG_LOG_TIME_TEXTURE().categoryName()).debug("atlastexture uploaded in: %lldms (%dx%d)", qsg_renderer_timer.elapsed(), t->textureSize().width(), t->textureSize().height()) ;
0
5300
5310
532 ;
never executed: QMessageLogger( __FILE__ , 508 , __PRETTY_FUNCTION__, QSG_LOG_TIME_TEXTURE().categoryName()).debug("atlastexture uploaded in: %lldms (%dx%d)", qsg_renderer_timer.elapsed(), t->textureSize().width(), t->textureSize().height()) ;
0
533}
executed 263 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
263
534-
535TextureBase::TextureBase(AtlasBase *atlas, const QRect &textureRect)-
536 : m_allocated_rect(textureRect)-
537 , m_atlas(atlas)-
538{-
539}
executed 289 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
289
540-
541TextureBase::~TextureBase()-
542{-
543 m_atlas->remove(this);-
544}
executed 289 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
289
545-
546void TextureBase::bind()-
547{-
548 m_atlas->bind(filtering());-
549}
executed 1437 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
1437
550-
551Texture::Texture(Atlas *atlas, const QRect &textureRect, const QImage &image)-
552 : TextureBase(atlas, textureRect)-
553 , m_image(image)-
554 , m_nonatlas_texture(nullptr)-
555 , m_has_alpha(image.hasAlphaChannel())-
556{-
557 float w = atlas->size().width();-
558 float h = atlas->size().height();-
559 QRect nopad = atlasSubRectWithoutPadding();-
560 m_texture_coords_rect = QRectF(nopad.x() / w,-
561 nopad.y() / h,-
562 nopad.width() / w,-
563 nopad.height() / h);-
564}
executed 289 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
289
565-
566Texture::~Texture()-
567{-
568 if (m_nonatlas_texture
m_nonatlas_textureDescription
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_scenegraph
FALSEevaluated 275 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
)
14-275
569 delete m_nonatlas_texture;
executed 14 times by 3 tests: delete m_nonatlas_texture;
Executed by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_scenegraph
14
570}
executed 289 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
289
571-
572QSGTexture *Texture::removedFromAtlas() const-
573{-
574 if (m_nonatlas_texture
m_nonatlas_textureDescription
TRUEnever evaluated
FALSEevaluated 14 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_scenegraph
) {
0-14
575 m_nonatlas_texture->setMipmapFiltering(mipmapFiltering());-
576 m_nonatlas_texture->setFiltering(filtering());-
577 return
never executed: return m_nonatlas_texture;
m_nonatlas_texture;
never executed: return m_nonatlas_texture;
0
578 }-
579-
580 if (!m_image.isNull()
!m_image.isNull()Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_scenegraph
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickborderimage
) {
2-12
581 m_nonatlas_texture = new QSGPlainTexture();-
582 m_nonatlas_texture->setImage(m_image);-
583 m_nonatlas_texture->setFiltering(filtering());-
584-
585 }
executed 12 times by 2 tests: end of block
Executed by:
  • tst_qquickimage
  • tst_scenegraph
else {
12
586 QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();-
587-
588-
589-
590 GLint currentFbo;-
591 f->glGetIntegerv(0x8CA6, &currentFbo);-
592-
593-
594 GLuint fbo;-
595 f->glGenFramebuffers(1, &fbo);-
596 f->glBindFramebuffer(0x8D40, fbo);-
597 f->glFramebufferTexture2D(0x8D40, 0x8CE0, -
598 0x0DE1-
599 , m_atlas->textureId(), 0);-
600-
601-
602-
603 GLuint texture;-
604 f->glGenTextures(1, &texture);-
605 f->glBindTexture(-
606 0x0DE1-
607 , texture);-
608 QRect r = atlasSubRectWithoutPadding();-
609-
610 while (f->glGetError() !=
f->glGetError() != 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickborderimage
0-2
611 0
f->glGetError() != 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickborderimage
0-2
612 ) ;
never executed: ;
0
613 f->glCopyTexImage2D(-
614 0x0DE1-
615 , 0, static_cast<Atlas*>(m_atlas)->internalFormat(), r.x(), r.y(), r.width(), r.height(), 0);-
616-
617 if (f->glGetError() !=
f->glGetError() != 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickborderimage
0-2
618 0
f->glGetError() != 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickborderimage
0-2
619 )-
620 f->glCopyTexImage2D(
never executed: f->glCopyTexImage2D( 0x0DE1 , 0, 0x1908 , r.x(), r.y(), r.width(), r.height(), 0);
0
621 0x0DE1
never executed: f->glCopyTexImage2D( 0x0DE1 , 0, 0x1908 , r.x(), r.y(), r.width(), r.height(), 0);
0
622 , 0,
never executed: f->glCopyTexImage2D( 0x0DE1 , 0, 0x1908 , r.x(), r.y(), r.width(), r.height(), 0);
0
623 0x1908
never executed: f->glCopyTexImage2D( 0x0DE1 , 0, 0x1908 , r.x(), r.y(), r.width(), r.height(), 0);
0
624 , r.x(), r.y(), r.width(), r.height(), 0);
never executed: f->glCopyTexImage2D( 0x0DE1 , 0, 0x1908 , r.x(), r.y(), r.width(), r.height(), 0);
0
625-
626 m_nonatlas_texture = new QSGPlainTexture();-
627 m_nonatlas_texture->setTextureId(texture);-
628 m_nonatlas_texture->setOwnsTexture(true);-
629 m_nonatlas_texture->setHasAlphaChannel(m_has_alpha);-
630 m_nonatlas_texture->setTextureSize(r.size());-
631-
632-
633 f->glFramebufferTexture2D(0x8D40, 0x8CE0, -
634 0x0DE1-
635 , 0, 0);-
636 f->glBindFramebuffer(0x8D40, (GLuint) currentFbo);-
637 f->glDeleteFramebuffers(1, &fbo);-
638 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickborderimage
2
639-
640 m_nonatlas_texture->setMipmapFiltering(mipmapFiltering());-
641 m_nonatlas_texture->setFiltering(filtering());-
642 return
executed 14 times by 3 tests: return m_nonatlas_texture;
Executed by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_scenegraph
m_nonatlas_texture;
executed 14 times by 3 tests: return m_nonatlas_texture;
Executed by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_scenegraph
14
643}-
644-
645}-
646-
647-
648-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0