| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickgraphicsinfo_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 QQUICKGRAPHICSINFO_P_H | - |
| 41 | #define QQUICKGRAPHICSINFO_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 <QtCore/qobject.h> | - |
| 55 | #include <QtCore/qpointer.h> | - |
| 56 | #include <QtQml/qqml.h> | - |
| 57 | #include <QtGui/qsurfaceformat.h> | - |
| 58 | #include <QtQuick/qsgrendererinterface.h> | - |
| 59 | - | |
| 60 | QT_BEGIN_NAMESPACE | - |
| 61 | - | |
| 62 | class QQuickItem; | - |
| 63 | class QQuickWindow; | - |
| 64 | - | |
| 65 | class QQuickGraphicsInfo : public QObject | - |
| 66 | { | - |
| 67 | Q_OBJECT | - |
| 68 | Q_PROPERTY(GraphicsApi api READ api NOTIFY apiChanged FINAL) | - |
| 69 | Q_PROPERTY(ShaderType shaderType READ shaderType NOTIFY shaderTypeChanged FINAL) | - |
| 70 | Q_PROPERTY(ShaderCompilationType shaderCompilationType READ shaderCompilationType NOTIFY shaderCompilationTypeChanged FINAL) | - |
| 71 | Q_PROPERTY(ShaderSourceType shaderSourceType READ shaderSourceType NOTIFY shaderSourceTypeChanged FINAL) | - |
| 72 | - | |
| 73 | Q_PROPERTY(int majorVersion READ majorVersion NOTIFY majorVersionChanged FINAL) | - |
| 74 | Q_PROPERTY(int minorVersion READ minorVersion NOTIFY minorVersionChanged FINAL) | - |
| 75 | Q_PROPERTY(OpenGLContextProfile profile READ profile NOTIFY profileChanged FINAL) | - |
| 76 | Q_PROPERTY(RenderableType renderableType READ renderableType NOTIFY renderableTypeChanged FINAL) | - |
| 77 | - | |
| 78 | public: | - |
| 79 | enum GraphicsApi { | - |
| 80 | Unknown = QSGRendererInterface::Unknown, | - |
| 81 | Software = QSGRendererInterface::Software, | - |
| 82 | OpenGL = QSGRendererInterface::OpenGL, | - |
| 83 | Direct3D12 = QSGRendererInterface::Direct3D12 | - |
| 84 | }; | - |
| 85 | Q_ENUM(GraphicsApi) | - |
| 86 | - | |
| 87 | enum ShaderType { | - |
| 88 | UnknownShadingLanguage = QSGRendererInterface::UnknownShadingLanguage, | - |
| 89 | GLSL = QSGRendererInterface::GLSL, | - |
| 90 | HLSL = QSGRendererInterface::HLSL | - |
| 91 | }; | - |
| 92 | Q_ENUM(ShaderType) | - |
| 93 | - | |
| 94 | enum ShaderCompilationType { | - |
| 95 | RuntimeCompilation = QSGRendererInterface::RuntimeCompilation, | - |
| 96 | OfflineCompilation = QSGRendererInterface::OfflineCompilation | - |
| 97 | }; | - |
| 98 | Q_ENUM(ShaderCompilationType) | - |
| 99 | - | |
| 100 | enum ShaderSourceType { | - |
| 101 | ShaderSourceString = QSGRendererInterface::ShaderSourceString, | - |
| 102 | ShaderSourceFile = QSGRendererInterface::ShaderSourceFile, | - |
| 103 | ShaderByteCode = QSGRendererInterface::ShaderByteCode | - |
| 104 | }; | - |
| 105 | Q_ENUM(ShaderSourceType) | - |
| 106 | - | |
| 107 | enum OpenGLContextProfile { | - |
| 108 | OpenGLNoProfile = QSurfaceFormat::NoProfile, | - |
| 109 | OpenGLCoreProfile = QSurfaceFormat::CoreProfile, | - |
| 110 | OpenGLCompatibilityProfile = QSurfaceFormat::CompatibilityProfile | - |
| 111 | }; | - |
| 112 | Q_ENUM(OpenGLContextProfile) | - |
| 113 | - | |
| 114 | enum RenderableType { | - |
| 115 | SurfaceFormatUnspecified = QSurfaceFormat::DefaultRenderableType, | - |
| 116 | SurfaceFormatOpenGL = QSurfaceFormat::OpenGL, | - |
| 117 | SurfaceFormatOpenGLES = QSurfaceFormat::OpenGLES | - |
| 118 | }; | - |
| 119 | Q_ENUM(RenderableType) | - |
| 120 | - | |
| 121 | QQuickGraphicsInfo(QQuickItem *item = 0); | - |
| 122 | - | |
| 123 | static QQuickGraphicsInfo *qmlAttachedProperties(QObject *object); | - |
| 124 | - | |
| 125 | GraphicsApi api() const { return m_api; } executed 4 times by 1 test: return m_api;Executed by:
| 4 |
| 126 | ShaderType shaderType() const { return m_shaderType; } executed 4 times by 1 test: return m_shaderType;Executed by:
| 4 |
| 127 | ShaderCompilationType shaderCompilationType() const { return m_shaderCompilationType; } executed 4 times by 1 test: return m_shaderCompilationType;Executed by:
| 4 |
| 128 | ShaderSourceType shaderSourceType() const { return m_shaderSourceType; } executed 4 times by 1 test: return m_shaderSourceType;Executed by:
| 4 |
| 129 | - | |
| 130 | int majorVersion() const { return m_majorVersion; } executed 2 times by 1 test: return m_majorVersion;Executed by:
| 2 |
| 131 | int minorVersion() const { return m_minorVersion; } executed 2 times by 1 test: return m_minorVersion;Executed by:
| 2 |
| 132 | OpenGLContextProfile profile() const { return m_profile; } executed 2 times by 1 test: return m_profile;Executed by:
| 2 |
| 133 | RenderableType renderableType() const { return m_renderableType; } executed 2 times by 1 test: return m_renderableType;Executed by:
| 2 |
| 134 | - | |
| 135 | Q_SIGNALS: | - |
| 136 | void apiChanged(); | - |
| 137 | void shaderTypeChanged(); | - |
| 138 | void shaderCompilationTypeChanged(); | - |
| 139 | void shaderSourceTypeChanged(); | - |
| 140 | - | |
| 141 | void majorVersionChanged(); | - |
| 142 | void minorVersionChanged(); | - |
| 143 | void profileChanged(); | - |
| 144 | void renderableTypeChanged(); | - |
| 145 | - | |
| 146 | private Q_SLOTS: | - |
| 147 | void updateInfo(); | - |
| 148 | void setWindow(QQuickWindow *window); | - |
| 149 | - | |
| 150 | private: | - |
| 151 | QPointer<QQuickWindow> m_window; | - |
| 152 | GraphicsApi m_api; | - |
| 153 | ShaderType m_shaderType; | - |
| 154 | ShaderCompilationType m_shaderCompilationType; | - |
| 155 | ShaderSourceType m_shaderSourceType; | - |
| 156 | int m_majorVersion; | - |
| 157 | int m_minorVersion; | - |
| 158 | OpenGLContextProfile m_profile; | - |
| 159 | RenderableType m_renderableType; | - |
| 160 | }; | - |
| 161 | - | |
| 162 | QT_END_NAMESPACE | - |
| 163 | - | |
| 164 | QML_DECLARE_TYPEINFO(QQuickGraphicsInfo, QML_HAS_ATTACHED_PROPERTIES) | - |
| 165 | - | |
| 166 | #endif // QQUICKGRAPHICSINFO_P_H | - |
| Source code | Switch to Preprocessed file |