| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgdefaultpainternode_p.h |
| Source code | Switch to Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 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 | #ifndef QSGDEFAULTPAINTERNODE_P_H | - |
| 41 | #define QSGDEFAULTPAINTERNODE_P_H | - |
| 42 | - | |
| 43 | // | - |
| 44 | // W A R N I N G | - |
| 45 | // ------------- | - |
| 46 | // | - |
| 47 | // This file is not part of the Qt API. It exists purely as an | - |
| 48 | // implementation detail. This header file may change from version to | - |
| 49 | // version without notice, or even be removed. | - |
| 50 | // | - |
| 51 | // We mean it. | - |
| 52 | // | - |
| 53 | - | |
| 54 | #include <private/qsgadaptationlayer_p.h> | - |
| 55 | #include "qsgtexturematerial.h" | - |
| 56 | #include "qsgtexture_p.h" | - |
| 57 | - | |
| 58 | #include <QtQuick/qquickpainteditem.h> | - |
| 59 | - | |
| 60 | #include <QtGui/qcolor.h> | - |
| 61 | - | |
| 62 | QT_BEGIN_NAMESPACE | - |
| 63 | - | |
| 64 | class QOpenGLFramebufferObject; | - |
| 65 | class QOpenGLPaintDevice; | - |
| 66 | class QSGDefaultRenderContext; | - |
| 67 | - | |
| 68 | class Q_QUICK_PRIVATE_EXPORT QSGPainterTexture : public QSGPlainTexture | - |
| 69 | { | - |
| 70 | public: | - |
| 71 | QSGPainterTexture(); | - |
| 72 | - | |
| 73 | void setDirtyRect(const QRect &rect) { m_dirty_rect = rect; } executed 50 times by 1 test: end of blockExecuted by:
| 50 |
| 74 | - | |
| 75 | void bind() override; | - |
| 76 | - | |
| 77 | private: | - |
| 78 | QRect m_dirty_rect; | - |
| 79 | }; | - |
| 80 | - | |
| 81 | class Q_QUICK_PRIVATE_EXPORT QSGDefaultPainterNode : public QSGPainterNode | - |
| 82 | { | - |
| 83 | public: | - |
| 84 | QSGDefaultPainterNode(QQuickPaintedItem *item); | - |
| 85 | virtual ~QSGDefaultPainterNode(); | - |
| 86 | - | |
| 87 | void setPreferredRenderTarget(QQuickPaintedItem::RenderTarget target) override; | - |
| 88 | - | |
| 89 | void setSize(const QSize &size) override; | - |
| 90 | QSize size() const { return m_size; } executed 8 times by 1 test: return m_size;Executed by:
| 8 |
| 91 | - | |
| 92 | void setDirty(const QRect &dirtyRect = QRect()) override; | - |
| 93 | - | |
| 94 | void setOpaquePainting(bool opaque) override; | - |
| 95 | bool opaquePainting() const { return m_opaquePainting; } executed 6 times by 1 test: return m_opaquePainting;Executed by:
| 6 |
| 96 | - | |
| 97 | void setLinearFiltering(bool linearFiltering) override; | - |
| 98 | bool linearFiltering() const { return m_linear_filtering; } never executed: return m_linear_filtering; | 0 |
| 99 | - | |
| 100 | void setMipmapping(bool mipmapping) override; | - |
| 101 | bool mipmapping() const { return m_mipmapping; } executed 6 times by 1 test: return m_mipmapping;Executed by:
| 6 |
| 102 | - | |
| 103 | void setSmoothPainting(bool s) override; | - |
| 104 | bool smoothPainting() const { return m_smoothPainting; } executed 6 times by 1 test: return m_smoothPainting;Executed by:
| 6 |
| 105 | - | |
| 106 | void setFillColor(const QColor &c) override; | - |
| 107 | QColor fillColor() const { return m_fillColor; } executed 6 times by 1 test: return m_fillColor;Executed by:
| 6 |
| 108 | - | |
| 109 | void setContentsScale(qreal s) override; | - |
| 110 | qreal contentsScale() const { return m_contentsScale; } executed 6 times by 1 test: return m_contentsScale;Executed by:
| 6 |
| 111 | - | |
| 112 | void setFastFBOResizing(bool fastResizing) override; | - |
| 113 | bool fastFBOResizing() const { return m_fastFBOResizing; } executed 6 times by 1 test: return m_fastFBOResizing;Executed by:
| 6 |
| 114 | - | |
| 115 | void setTextureSize(const QSize &textureSize) override; | - |
| 116 | QSize textureSize() const { return m_textureSize; } never executed: return m_textureSize; | 0 |
| 117 | - | |
| 118 | QImage toImage() const override; | - |
| 119 | void update() override; | - |
| 120 | - | |
| 121 | void paint(); | - |
| 122 | - | |
| 123 | QSGTexture *texture() const override { return m_texture; } never executed: return m_texture; | 0 |
| 124 | - | |
| 125 | private: | - |
| 126 | void updateTexture(); | - |
| 127 | void updateGeometry(); | - |
| 128 | void updateRenderTarget(); | - |
| 129 | void updateFBOSize(); | - |
| 130 | - | |
| 131 | QSGDefaultRenderContext *m_context; | - |
| 132 | - | |
| 133 | QQuickPaintedItem::RenderTarget m_preferredRenderTarget; | - |
| 134 | QQuickPaintedItem::RenderTarget m_actualRenderTarget; | - |
| 135 | - | |
| 136 | QQuickPaintedItem *m_item; | - |
| 137 | - | |
| 138 | QOpenGLFramebufferObject *m_fbo; | - |
| 139 | QOpenGLFramebufferObject *m_multisampledFbo; | - |
| 140 | QImage m_image; | - |
| 141 | - | |
| 142 | QSGOpaqueTextureMaterial m_material; | - |
| 143 | QSGTextureMaterial m_materialO; | - |
| 144 | QSGGeometry m_geometry; | - |
| 145 | QSGPainterTexture *m_texture; | - |
| 146 | QOpenGLPaintDevice *m_gl_device; | - |
| 147 | - | |
| 148 | QSize m_size; | - |
| 149 | QSize m_fboSize; | - |
| 150 | QSize m_textureSize; | - |
| 151 | QRect m_dirtyRect; | - |
| 152 | QColor m_fillColor; | - |
| 153 | #if QT_VERSION >= 0x060000 | - |
| 154 | #warning "Remove m_contentsScale and assume 1 everywhere" | - |
| 155 | #endif | - |
| 156 | qreal m_contentsScale; | - |
| 157 | - | |
| 158 | bool m_dirtyContents : 1; | - |
| 159 | bool m_opaquePainting : 1; | - |
| 160 | bool m_linear_filtering : 1; | - |
| 161 | bool m_mipmapping : 1; | - |
| 162 | bool m_smoothPainting : 1; | - |
| 163 | bool m_extensionsChecked : 1; | - |
| 164 | bool m_multisamplingSupported : 1; | - |
| 165 | bool m_fastFBOResizing : 1; | - |
| 166 | bool m_dirtyGeometry : 1; | - |
| 167 | bool m_dirtyRenderTarget : 1; | - |
| 168 | bool m_dirtyTexture : 1; | - |
| 169 | }; | - |
| 170 | - | |
| 171 | QT_END_NAMESPACE | - |
| 172 | - | |
| 173 | #endif // QSGDEFAULTPAINTERNODE_P_H | - |
| Source code | Switch to Preprocessed file |