OpenCoverage

qsgsoftwarecontext.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9const QLoggingCategory &QSG_RASTER_LOG_INFO() { static const QLoggingCategory category("qt.scenegraph.info"); return
never executed: return category;
category;
never executed: return category;
}
0
10-
11-
12-
13const QLoggingCategory &QSG_RASTER_LOG_RENDERLOOP() { static const QLoggingCategory category("qt.scenegraph.renderloop"); return
never executed: return category;
category;
never executed: return category;
}
0
14-
15-
16const QLoggingCategory &QSG_RASTER_LOG_TIME_COMPILATION() { static const QLoggingCategory category("qt.scenegraph.time.compilation"); return
never executed: return category;
category;
never executed: return category;
}
0
17-
18-
19const QLoggingCategory &QSG_RASTER_LOG_TIME_RENDERLOOP() { static const QLoggingCategory category("qt.scenegraph.time.renderloop"); return
executed 48 times by 1 test: return category;
Executed by:
  • tst_qquickshape
category;
executed 48 times by 1 test: return category;
Executed by:
  • tst_qquickshape
}
48
20-
21-
22const QLoggingCategory &QSG_RASTER_LOG_TIME_TEXTURE() { static const QLoggingCategory category("qt.scenegraph.time.texture"); return
never executed: return category;
category;
never executed: return category;
}
0
23-
24-
25const QLoggingCategory &QSG_RASTER_LOG_TIME_GLYPH() { static const QLoggingCategory category("qt.scenegraph.time.glyph"); return
never executed: return category;
category;
never executed: return category;
}
0
26-
27-
28const QLoggingCategory &QSG_RASTER_LOG_TIME_RENDERER() { static const QLoggingCategory category("qt.scenegraph.time.renderer"); return
never executed: return category;
category;
never executed: return category;
}
0
29-
30-
31-
32QSGSoftwareRenderContext::QSGSoftwareRenderContext(QSGContext *ctx)-
33 : QSGRenderContext(ctx)-
34 , m_initialized(false)-
35 , m_activePainter(nullptr)-
36{-
37}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickshape
2
38-
39QSGSoftwareContext::QSGSoftwareContext(QObject *parent)-
40 : QSGContext(parent)-
41{-
42}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickshape
2
43-
44QSGInternalRectangleNode *QSGSoftwareContext::createInternalRectangleNode()-
45{-
46 return
never executed: return new QSGSoftwareInternalRectangleNode();
new QSGSoftwareInternalRectangleNode();
never executed: return new QSGSoftwareInternalRectangleNode();
0
47}-
48-
49QSGInternalImageNode *QSGSoftwareContext::createInternalImageNode()-
50{-
51 return
never executed: return new QSGSoftwareInternalImageNode();
new QSGSoftwareInternalImageNode();
never executed: return new QSGSoftwareInternalImageNode();
0
52}-
53-
54QSGPainterNode *QSGSoftwareContext::createPainterNode(QQuickPaintedItem *item)-
55{-
56 return
never executed: return new QSGSoftwarePainterNode(item);
new QSGSoftwarePainterNode(item);
never executed: return new QSGSoftwarePainterNode(item);
0
57}-
58-
59QSGGlyphNode *QSGSoftwareContext::createGlyphNode(QSGRenderContext *rc, bool preferNativeGlyphNode)-
60{-
61 (void)rc;;-
62 (void)preferNativeGlyphNode;;-
63 return
never executed: return new QSGSoftwareGlyphNode();
new QSGSoftwareGlyphNode();
never executed: return new QSGSoftwareGlyphNode();
0
64}-
65-
66QSGLayer *QSGSoftwareContext::createLayer(QSGRenderContext *renderContext)-
67{-
68 return
never executed: return new QSGSoftwareLayer(renderContext);
new QSGSoftwareLayer(renderContext);
never executed: return new QSGSoftwareLayer(renderContext);
0
69}-
70-
71QSurfaceFormat QSGSoftwareContext::defaultSurfaceFormat() const-
72{-
73 QSurfaceFormat format = QSurfaceFormat::defaultFormat();-
74 format.setRenderableType(QSurfaceFormat::DefaultRenderableType);-
75 format.setMajorVersion(0);-
76 format.setMinorVersion(0);-
77 return
executed 12 times by 1 test: return format;
Executed by:
  • tst_qquickshape
format;
executed 12 times by 1 test: return format;
Executed by:
  • tst_qquickshape
12
78}-
79-
80void QSGSoftwareRenderContext::initializeIfNeeded()-
81{-
82 if (m_initialized
m_initializedDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickshape
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickshape
)
2-22
83 return;
executed 22 times by 1 test: return;
Executed by:
  • tst_qquickshape
22
84 m_initialized = true;-
85 initialized();-
86}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickshape
2
87-
88void QSGSoftwareRenderContext::invalidate()-
89{-
90 m_sg->renderContextInvalidated(this);-
91 invalidated();-
92}
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickshape
12
93-
94QSGTexture *QSGSoftwareRenderContext::createTexture(const QImage &image, uint flags) const-
95{-
96 return
never executed: return new QSGSoftwarePixmapTexture(image, flags);
new QSGSoftwarePixmapTexture(image, flags);
never executed: return new QSGSoftwarePixmapTexture(image, flags);
0
97}-
98-
99QSGRenderer *QSGSoftwareRenderContext::createRenderer()-
100{-
101 return
executed 8 times by 1 test: return new QSGSoftwareRenderer(this);
Executed by:
  • tst_qquickshape
new QSGSoftwareRenderer(this);
executed 8 times by 1 test: return new QSGSoftwareRenderer(this);
Executed by:
  • tst_qquickshape
8
102}-
103-
104-
105void QSGSoftwareRenderContext::renderNextFrame(QSGRenderer *renderer, uint fbo)-
106{-
107 renderer->renderScene(fbo);-
108}
executed 24 times by 1 test: end of block
Executed by:
  • tst_qquickshape
24
109-
110int QSGSoftwareRenderContext::maxTextureSize() const-
111{-
112 return
never executed: return 2048;
2048;
never executed: return 2048;
0
113}-
114-
115QSGRendererInterface *QSGSoftwareContext::rendererInterface(QSGRenderContext *renderContext)-
116{-
117 (void)renderContext;;-
118 return
executed 24 times by 1 test: return this;
Executed by:
  • tst_qquickshape
this;
executed 24 times by 1 test: return this;
Executed by:
  • tst_qquickshape
24
119}-
120-
121QSGRectangleNode *QSGSoftwareContext::createRectangleNode()-
122{-
123 return
never executed: return new QSGSoftwareRectangleNode;
new QSGSoftwareRectangleNode;
never executed: return new QSGSoftwareRectangleNode;
0
124}-
125-
126QSGImageNode *QSGSoftwareContext::createImageNode()-
127{-
128 return
never executed: return new QSGSoftwareImageNode;
new QSGSoftwareImageNode;
never executed: return new QSGSoftwareImageNode;
0
129}-
130-
131QSGNinePatchNode *QSGSoftwareContext::createNinePatchNode()-
132{-
133 return
never executed: return new QSGSoftwareNinePatchNode;
new QSGSoftwareNinePatchNode;
never executed: return new QSGSoftwareNinePatchNode;
0
134}-
135-
136-
137QSGSpriteNode *QSGSoftwareContext::createSpriteNode()-
138{-
139 return
never executed: return new QSGSoftwareSpriteNode;
new QSGSoftwareSpriteNode;
never executed: return new QSGSoftwareSpriteNode;
0
140}-
141-
142-
143QSGRendererInterface::GraphicsApi QSGSoftwareContext::graphicsApi() const-
144{-
145 return
executed 16 times by 1 test: return Software;
Executed by:
  • tst_qquickshape
Software;
executed 16 times by 1 test: return Software;
Executed by:
  • tst_qquickshape
16
146}-
147-
148QSGRendererInterface::ShaderType QSGSoftwareContext::shaderType() const-
149{-
150 return
never executed: return UnknownShadingLanguage;
UnknownShadingLanguage;
never executed: return UnknownShadingLanguage;
0
151}-
152-
153QSGRendererInterface::ShaderCompilationTypes QSGSoftwareContext::shaderCompilationType() const-
154{-
155 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
156}-
157-
158QSGRendererInterface::ShaderSourceTypes QSGSoftwareContext::shaderSourceType() const-
159{-
160 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
161}-
162-
163void *QSGSoftwareContext::getResource(QQuickWindow *window, Resource resource) const-
164{-
165 if (resource == PainterResource
resource == PainterResourceDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickshape
FALSEnever evaluated
&& window
windowDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickshape
FALSEnever evaluated
&& window->isSceneGraphInitialized()
window->isScen...hInitialized()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickshape
FALSEnever evaluated
)
0-8
166 return
executed 8 times by 1 test: return static_cast<QSGSoftwareRenderContext *>(QQuickWindowPrivate::get(window)->context)->m_activePainter;
Executed by:
  • tst_qquickshape
static_cast<QSGSoftwareRenderContext *>(QQuickWindowPrivate::get(window)->context)->m_activePainter;
executed 8 times by 1 test: return static_cast<QSGSoftwareRenderContext *>(QQuickWindowPrivate::get(window)->context)->m_activePainter;
Executed by:
  • tst_qquickshape
8
167-
168 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
169}-
170-
171-
172-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0