Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | const QLoggingCategory &lcPixmapRenderer() { static const QLoggingCategory category("qt.scenegraph.softwarecontext.pixmapRenderer"); return never executed: category;return category; never executed: }return category; | 0 | ||||||||||||
5 | - | |||||||||||||
6 | - | |||||||||||||
7 | - | |||||||||||||
8 | QSGSoftwarePixmapRenderer::QSGSoftwarePixmapRenderer(QSGRenderContext *context) | - | ||||||||||||
9 | : QSGAbstractSoftwareRenderer(context) | - | ||||||||||||
10 | { | - | ||||||||||||
11 | - | |||||||||||||
12 | } never executed: end of block | 0 | ||||||||||||
13 | - | |||||||||||||
14 | QSGSoftwarePixmapRenderer::~QSGSoftwarePixmapRenderer() | - | ||||||||||||
15 | { | - | ||||||||||||
16 | - | |||||||||||||
17 | } | - | ||||||||||||
18 | - | |||||||||||||
19 | void QSGSoftwarePixmapRenderer::renderScene(uint) | - | ||||||||||||
20 | { | - | ||||||||||||
21 | class B : public QSGBindable | - | ||||||||||||
22 | { | - | ||||||||||||
23 | public: | - | ||||||||||||
24 | void bind() const override { } | - | ||||||||||||
25 | } bindable; | - | ||||||||||||
26 | QSGRenderer::renderScene(bindable); | - | ||||||||||||
27 | } never executed: end of block | 0 | ||||||||||||
28 | - | |||||||||||||
29 | void QSGSoftwarePixmapRenderer::render() | - | ||||||||||||
30 | { | - | ||||||||||||
31 | - | |||||||||||||
32 | } | - | ||||||||||||
33 | - | |||||||||||||
34 | void QSGSoftwarePixmapRenderer::render(QPaintDevice *target) | - | ||||||||||||
35 | { | - | ||||||||||||
36 | QElapsedTimer renderTimer; | - | ||||||||||||
37 | - | |||||||||||||
38 | - | |||||||||||||
39 | setBackgroundRect(m_projectionRect.normalized()); | - | ||||||||||||
40 | setBackgroundColor(clearColor()); | - | ||||||||||||
41 | - | |||||||||||||
42 | renderTimer.start(); | - | ||||||||||||
43 | buildRenderList(); | - | ||||||||||||
44 | qint64 buildRenderListTime = renderTimer.restart(); | - | ||||||||||||
45 | - | |||||||||||||
46 | - | |||||||||||||
47 | - | |||||||||||||
48 | - | |||||||||||||
49 | - | |||||||||||||
50 | - | |||||||||||||
51 | optimizeRenderList(); | - | ||||||||||||
52 | qint64 optimizeRenderListTime = renderTimer.restart(); | - | ||||||||||||
53 | - | |||||||||||||
54 | if (!isOpaque()
| 0 | ||||||||||||
55 | - | |||||||||||||
56 | - | |||||||||||||
57 | static_cast<QPixmap *>(target)->fill(Qt::transparent); | - | ||||||||||||
58 | } never executed: end of block | 0 | ||||||||||||
59 | - | |||||||||||||
60 | QPainter painter(target); | - | ||||||||||||
61 | painter.setRenderHint(QPainter::Antialiasing); | - | ||||||||||||
62 | painter.setWindow(m_projectionRect); | - | ||||||||||||
63 | auto rc = static_cast<QSGSoftwareRenderContext *>(context()); | - | ||||||||||||
64 | QPainter *prevPainter = rc->m_activePainter; | - | ||||||||||||
65 | rc->m_activePainter = &painter; | - | ||||||||||||
66 | - | |||||||||||||
67 | QRegion paintedRegion = renderNodes(&painter); | - | ||||||||||||
68 | qint64 renderTime = renderTimer.elapsed(); | - | ||||||||||||
69 | - | |||||||||||||
70 | rc->m_activePainter = prevPainter; | - | ||||||||||||
71 | for (bool qt_category_enabled = lcPixmapRenderer().isDebugEnabled(); qt_category_enabled
never executed: QMessageLogger(__FILE__, 114, __PRETTY_FUNCTION__, lcPixmapRenderer().categoryName()).debug() << "pixmapRender" << paintedRegion << buildRenderListTime << optimizeRenderListTime << renderTime; | 0 | ||||||||||||
72 | } never executed: end of block | 0 | ||||||||||||
73 | - | |||||||||||||
74 | void QSGSoftwarePixmapRenderer::setProjectionRect(const QRect &projectionRect) | - | ||||||||||||
75 | { | - | ||||||||||||
76 | m_projectionRect = projectionRect; | - | ||||||||||||
77 | } never executed: end of block | 0 | ||||||||||||
78 | - | |||||||||||||
79 | - | |||||||||||||
Switch to Source code | Preprocessed file |