diff options
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgabstractrenderer.h | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h | 8 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgnode.h | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgrenderer.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgrenderer_p.h | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgcontext.cpp | 6 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgcontextplugin.cpp | 8 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgcontextplugin_p.h | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdefaultlayer.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdefaultlayer_p.h | 44 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdefaultspritenode.cpp | 6 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgengine.h | 2 |
14 files changed, 48 insertions, 46 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp index 2954f591ad..bd5d8f72c0 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp @@ -50,7 +50,7 @@ QSGSoftwareLayer::QSGSoftwareLayer(QSGRenderContext *renderContext) , m_renderer(0) , m_device_pixel_ratio(1) , m_mirrorHorizontal(false) - , m_mirrorVertical(false) + , m_mirrorVertical(true) , m_live(true) , m_grab(true) , m_recursive(false) diff --git a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h index eb9e7cea7c..304dc008d5 100644 --- a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h +++ b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h @@ -90,7 +90,7 @@ Q_SIGNALS: void sceneGraphChanged(); protected: - explicit QSGAbstractRenderer(QObject *parent = Q_NULLPTR); + explicit QSGAbstractRenderer(QObject *parent = nullptr); virtual void nodeChanged(QSGNode *node, QSGNode::DirtyState state) = 0; private: diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h index b0a14d23b9..5c39242029 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h @@ -627,9 +627,9 @@ public: }; protected: - void nodeChanged(QSGNode *node, QSGNode::DirtyState state) Q_DECL_OVERRIDE; - void render() Q_DECL_OVERRIDE; - void releaseCachedResources() Q_DECL_OVERRIDE; + void nodeChanged(QSGNode *node, QSGNode::DirtyState state) override; + void render() override; + void releaseCachedResources() override; private: enum ClipTypeBit @@ -698,7 +698,7 @@ private: void visualizeOverdraw(); void visualizeOverdraw_helper(Node *node); void visualizeDrawGeometry(const QSGGeometry *g); - void setCustomRenderMode(const QByteArray &mode) Q_DECL_OVERRIDE; + void setCustomRenderMode(const QByteArray &mode) override; QSGDefaultRenderContext *m_context; QSet<Node *> m_taggedRoots; diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h index 1467f2233d..f2708b2b96 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.h +++ b/src/quick/scenegraph/coreapi/qsgnode.h @@ -151,7 +151,7 @@ public: QT_DEPRECATED void clearDirty() { } void markDirty(DirtyState bits); - QT_DEPRECATED DirtyState dirtyState() const { return Q_NULLPTR; } + QT_DEPRECATED DirtyState dirtyState() const { return nullptr; } virtual bool isSubtreeBlocked() const; diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp index 8fbd402a2f..3ae79a933f 100644 --- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp @@ -50,7 +50,9 @@ QT_BEGIN_NAMESPACE +#if QT_CONFIG(opengl) static const bool qsg_sanity_check = qEnvironmentVariableIntValue("QSG_SANITY_CHECK"); +#endif static QElapsedTimer frameTimer; static qint64 preprocessTime; diff --git a/src/quick/scenegraph/coreapi/qsgrenderer_p.h b/src/quick/scenegraph/coreapi/qsgrenderer_p.h index 1cb4c56316..b890728fd8 100644 --- a/src/quick/scenegraph/coreapi/qsgrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgrenderer_p.h @@ -86,8 +86,8 @@ public: bool isMirrored() const; void renderScene(const QSGBindable &bindable); - virtual void renderScene(uint fboId = 0) Q_DECL_OVERRIDE; - virtual void nodeChanged(QSGNode *node, QSGNode::DirtyState state) Q_DECL_OVERRIDE; + void renderScene(uint fboId = 0) override; + void nodeChanged(QSGNode *node, QSGNode::DirtyState state) override; QSGNodeUpdater *nodeUpdater() const; void setNodeUpdater(QSGNodeUpdater *updater); diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp index d460794573..fb66a6ebb1 100644 --- a/src/quick/scenegraph/qsgcontext.cpp +++ b/src/quick/scenegraph/qsgcontext.cpp @@ -143,7 +143,7 @@ public: qCDebug(QSG_LOG_INFO, "Animation Driver: using walltime"); } - void start() Q_DECL_OVERRIDE + void start() override { m_time = 0; m_timer.start(); @@ -151,14 +151,14 @@ public: QAnimationDriver::start(); } - qint64 elapsed() const Q_DECL_OVERRIDE + qint64 elapsed() const override { return m_mode == VSyncMode ? qint64(m_time) : qint64(m_time) + m_wallTime.elapsed(); } - void advance() Q_DECL_OVERRIDE + void advance() override { qint64 delta = m_timer.restart(); diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index bd311d3b46..6583883d0c 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -122,14 +122,14 @@ QSGAdaptationBackendData *contextFactory() } } - if (requestedBackend.isEmpty() && qEnvironmentVariableIsSet("QMLSCENE_DEVICE")) - requestedBackend = QString::fromLocal8Bit(qgetenv("QMLSCENE_DEVICE")); + if (requestedBackend.isEmpty()) + requestedBackend = qEnvironmentVariable("QMLSCENE_DEVICE"); // A modern alternative. Scenegraph adaptations can represent backends // for different graphics APIs as well, instead of being specific to // some device or platform. - if (requestedBackend.isEmpty() && qEnvironmentVariableIsSet("QT_QUICK_BACKEND")) - requestedBackend = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND")); + if (requestedBackend.isEmpty()) + requestedBackend = qEnvironmentVariable("QT_QUICK_BACKEND"); // If this platform does not support OpenGL, and no backend has been set // default to the software renderer diff --git a/src/quick/scenegraph/qsgcontextplugin_p.h b/src/quick/scenegraph/qsgcontextplugin_p.h index 5914b42809..02d4b79b76 100644 --- a/src/quick/scenegraph/qsgcontextplugin_p.h +++ b/src/quick/scenegraph/qsgcontextplugin_p.h @@ -90,7 +90,7 @@ public: explicit QSGContextPlugin(QObject *parent = 0); virtual ~QSGContextPlugin(); - virtual QStringList keys() const override = 0; + QStringList keys() const override = 0; QQuickTextureFactory *createTextureFactoryFromImage(const QImage &) override { return 0; } QSGRenderLoop *createWindowManager() override { return 0; } diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp index edb6e92a0d..0169f097bc 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp @@ -301,7 +301,7 @@ public: setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/32bitcolortext.frag")); } - void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) Q_DECL_OVERRIDE; + void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override; }; void QSG32BitColorTextShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) @@ -310,7 +310,7 @@ void QSG32BitColorTextShader::updateState(const RenderState &state, QSGMaterial QSGTextMaskMaterial *material = static_cast<QSGTextMaskMaterial *>(newEffect); QSGTextMaskMaterial *oldMaterial = static_cast<QSGTextMaskMaterial *>(oldEffect); - if (oldMaterial == Q_NULLPTR || material->color() != oldMaterial->color() || state.isOpacityDirty()) { + if (oldMaterial == nullptr || material->color() != oldMaterial->color() || state.isOpacityDirty()) { float opacity = material->color().w() * state.opacity(); program()->setUniformValue(m_color_id, opacity); } diff --git a/src/quick/scenegraph/qsgdefaultlayer.cpp b/src/quick/scenegraph/qsgdefaultlayer.cpp index 86d74acf54..cd9c4a9a90 100644 --- a/src/quick/scenegraph/qsgdefaultlayer.cpp +++ b/src/quick/scenegraph/qsgdefaultlayer.cpp @@ -60,7 +60,7 @@ namespace public: BindableFbo(QOpenGLFramebufferObject *fbo, QSGDepthStencilBuffer *depthStencil); virtual ~BindableFbo(); - void bind() const Q_DECL_OVERRIDE; + void bind() const override; private: QOpenGLFramebufferObject *m_fbo; QSGDepthStencilBuffer *m_depthStencil; diff --git a/src/quick/scenegraph/qsgdefaultlayer_p.h b/src/quick/scenegraph/qsgdefaultlayer_p.h index 7b09293095..06355e0c21 100644 --- a/src/quick/scenegraph/qsgdefaultlayer_p.h +++ b/src/quick/scenegraph/qsgdefaultlayer_p.h @@ -69,56 +69,56 @@ public: QSGDefaultLayer(QSGRenderContext *context); ~QSGDefaultLayer(); - bool updateTexture() Q_DECL_OVERRIDE; + bool updateTexture() override; // The item's "paint node", not effect node. QSGNode *item() const { return m_item; } - void setItem(QSGNode *item) Q_DECL_OVERRIDE; + void setItem(QSGNode *item) override; QRectF rect() const { return m_rect; } - void setRect(const QRectF &rect) Q_DECL_OVERRIDE; + void setRect(const QRectF &rect) override; QSize size() const { return m_size; } - void setSize(const QSize &size) Q_DECL_OVERRIDE; + void setSize(const QSize &size) override; - void setHasMipmaps(bool mipmap) Q_DECL_OVERRIDE; + void setHasMipmaps(bool mipmap) override; - void bind() Q_DECL_OVERRIDE; + void bind() override; - bool hasAlphaChannel() const Q_DECL_OVERRIDE; - bool hasMipmaps() const Q_DECL_OVERRIDE; - int textureId() const Q_DECL_OVERRIDE; - QSize textureSize() const Q_DECL_OVERRIDE { return m_size; } + bool hasAlphaChannel() const override; + bool hasMipmaps() const override; + int textureId() const override; + QSize textureSize() const override { return m_size; } GLenum format() const { return m_format; } - void setFormat(GLenum format) Q_DECL_OVERRIDE; + void setFormat(GLenum format) override; bool live() const { return bool(m_live); } - void setLive(bool live) Q_DECL_OVERRIDE; + void setLive(bool live) override; bool recursive() const { return bool(m_recursive); } - void setRecursive(bool recursive) Q_DECL_OVERRIDE; + void setRecursive(bool recursive) override; - void setDevicePixelRatio(qreal ratio) Q_DECL_OVERRIDE { m_device_pixel_ratio = ratio; } + void setDevicePixelRatio(qreal ratio) override { m_device_pixel_ratio = ratio; } bool mirrorHorizontal() const { return bool(m_mirrorHorizontal); } - void setMirrorHorizontal(bool mirror) Q_DECL_OVERRIDE; + void setMirrorHorizontal(bool mirror) override; bool mirrorVertical() const { return bool(m_mirrorVertical); } - void setMirrorVertical(bool mirror) Q_DECL_OVERRIDE; + void setMirrorVertical(bool mirror) override; - void scheduleUpdate() Q_DECL_OVERRIDE; + void scheduleUpdate() override; - QImage toImage() const Q_DECL_OVERRIDE; + QImage toImage() const override; - QRectF normalizedTextureSubRect() const Q_DECL_OVERRIDE; + QRectF normalizedTextureSubRect() const override; int samples() const { return m_samples; } - void setSamples(int samples) Q_DECL_OVERRIDE { m_samples = samples; } + void setSamples(int samples) override { m_samples = samples; } public Q_SLOTS: - void markDirtyTexture() Q_DECL_OVERRIDE; - void invalidated() Q_DECL_OVERRIDE; + void markDirtyTexture() override; + void invalidated() override; private: void grab(); diff --git a/src/quick/scenegraph/qsgdefaultspritenode.cpp b/src/quick/scenegraph/qsgdefaultspritenode.cpp index 5eb8fb6e08..7fe6048d59 100644 --- a/src/quick/scenegraph/qsgdefaultspritenode.cpp +++ b/src/quick/scenegraph/qsgdefaultspritenode.cpp @@ -109,7 +109,7 @@ public: setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/sprite.frag")); } - void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *) Q_DECL_OVERRIDE + void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *) override { QQuickSpriteMaterial *m = static_cast<QQuickSpriteMaterial *>(newEffect); m->texture->bind(); @@ -122,14 +122,14 @@ public: program()->setUniformValue(m_matrix_id, state.combinedMatrix()); } - void initialize() Q_DECL_OVERRIDE { + void initialize() override { m_matrix_id = program()->uniformLocation("qt_Matrix"); m_opacity_id = program()->uniformLocation("qt_Opacity"); m_animData_id = program()->uniformLocation("animData"); m_animPos_id = program()->uniformLocation("animPos"); } - char const *const *attributeNames() const Q_DECL_OVERRIDE { + char const *const *attributeNames() const override { static const char *attr[] = { "vPos", "vTex", diff --git a/src/quick/scenegraph/util/qsgengine.h b/src/quick/scenegraph/util/qsgengine.h index 3c8b61852e..514e6e8c2b 100644 --- a/src/quick/scenegraph/util/qsgengine.h +++ b/src/quick/scenegraph/util/qsgengine.h @@ -67,7 +67,7 @@ public: }; Q_DECLARE_FLAGS(CreateTextureOptions, CreateTextureOption) - explicit QSGEngine(QObject *parent = Q_NULLPTR); + explicit QSGEngine(QObject *parent = nullptr); ~QSGEngine(); void initialize(QOpenGLContext *context); |