From b733c37522abeb33f2e14f7a8fdefaf15acf42b5 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 13 Feb 2018 09:57:29 +0100 Subject: ScenGraph: Prefer printf style logging This generates more compact code, saving 20480 bytes on disk (Linux 64 bit, release build). Change-Id: I73d6d88b7b61b87a5d714e131fcf86ee80c83f38 Reviewed-by: Ulf Hermann --- src/quick/scenegraph/qsgrenderloop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/scenegraph/qsgrenderloop.cpp') diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index 88899c400c..ca1fb9ba5c 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -327,7 +327,7 @@ void QSGGuiThreadRenderLoop::windowDestroyed(QQuickWindow *window) current = gl->makeCurrent(surface); } if (Q_UNLIKELY(!current)) - qCDebug(QSG_LOG_RENDERLOOP) << "cleanup without an OpenGL context"; + qCDebug(QSG_LOG_RENDERLOOP, "cleanup without an OpenGL context"); #if QT_CONFIG(quick_shadereffect) && QT_CONFIG(opengl) QQuickOpenGLShaderEffectMaterial::cleanupMaterialCache(); -- cgit v1.2.3 From a025b7ece6909696b6d6cd3565138b81c7f2763b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 12 Feb 2018 15:24:42 +0100 Subject: doc: Fix remaining "Can't tie this..." errors This update mostly removes qdoc comment markers from comments that should not have been qdoc comments. Change-Id: I8ccaa7fd4ae610371e25066e048fcba6cfba8038 Reviewed-by: Martin Smith --- src/quick/scenegraph/qsgrenderloop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/scenegraph/qsgrenderloop.cpp') diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index ca1fb9ba5c..e74ba83e7f 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE extern bool qsg_useConsistentTiming(); extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha); #if QT_CONFIG(opengl) -/*! +/* expectations for this manager to work: - one opengl context to render multiple windows - OpenGL pipeline will not block for vsync in swap -- cgit v1.2.3 From 499ec43937e926e4f2fa57a9baa455fcb3862262 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 21 Feb 2018 10:41:54 +0100 Subject: use nullptr consistently (clang-tidy) From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann --- src/quick/scenegraph/qsgrenderloop.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/quick/scenegraph/qsgrenderloop.cpp') diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index e74ba83e7f..60f3538662 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -88,7 +88,7 @@ extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_ DEFINE_BOOL_CONFIG_OPTION(qmlNoThreadedRenderer, QML_BAD_GUI_RENDER_LOOP); DEFINE_BOOL_CONFIG_OPTION(qmlForceThreadedRenderer, QML_FORCE_THREADED_RENDERER); // Might trigger graphics driver threading bugs, use at own risk #endif -QSGRenderLoop *QSGRenderLoop::s_instance = 0; +QSGRenderLoop *QSGRenderLoop::s_instance = nullptr; QSGRenderLoop::~QSGRenderLoop() { @@ -107,11 +107,11 @@ void QSGRenderLoop::cleanup() QQuickWindowPrivate *wd = QQuickWindowPrivate::get(w); if (wd->windowManager == s_instance) { s_instance->windowDestroyed(w); - wd->windowManager = 0; + wd->windowManager = nullptr; } } delete s_instance; - s_instance = 0; + s_instance = nullptr; } /*! @@ -155,7 +155,7 @@ public: void releaseResources(QQuickWindow *) override; - QAnimationDriver *animationDriver() const override { return 0; } + QAnimationDriver *animationDriver() const override { return nullptr; } QSGContext *sceneGraphContext() const override; QSGRenderContext *createRenderContext(QSGContext *) const override { return rc; } @@ -275,7 +275,7 @@ void QSGRenderLoop::handleContextCreationFailure(QQuickWindow *window, } #if QT_CONFIG(opengl) QSGGuiThreadRenderLoop::QSGGuiThreadRenderLoop() - : gl(0) + : gl(nullptr) { if (qsg_useConsistentTiming()) { QUnifiedTimer::instance(true)->setConsistentTiming(true); @@ -337,7 +337,7 @@ void QSGGuiThreadRenderLoop::windowDestroyed(QQuickWindow *window) if (m_windows.size() == 0) { rc->invalidate(); delete gl; - gl = 0; + gl = nullptr; } else if (gl && window == gl->surface() && current) { gl->doneCurrent(); } @@ -364,7 +364,7 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) if (!gl->create()) { const bool isEs = gl->isOpenGLES(); delete gl; - gl = 0; + gl = nullptr; handleContextCreationFailure(window, isEs); } else { cd->fireOpenGLContextCreated(gl); -- cgit v1.2.3