aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgrenderloop.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-03-08 18:35:03 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2018-03-08 18:35:03 +0100
commitd9ea4917ca97aeee050a86151fbfa069771b498d (patch)
tree21fd6960d8a866bf6f5a5a8f9db9be801f8065c1 /src/quick/scenegraph/qsgrenderloop.cpp
parentf9beafddd256cd0b79bf2478a812053ef61241fc (diff)
parentc6a26c248e8abc421b87c3dd6b2466d490ea902e (diff)
Merge remote-tracking branch 'gerrit/5.11' into wip/webassembly
Diffstat (limited to 'src/quick/scenegraph/qsgrenderloop.cpp')
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index 58450d7a50..9e5cc27cd8 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
@@ -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; }
@@ -282,7 +282,7 @@ void QSGRenderLoop::handleContextCreationFailure(QQuickWindow *window,
}
#if QT_CONFIG(opengl)
QSGGuiThreadRenderLoop::QSGGuiThreadRenderLoop()
- : gl(0)
+ : gl(nullptr)
{
if (qsg_useConsistentTiming()) {
QUnifiedTimer::instance(true)->setConsistentTiming(true);
@@ -334,7 +334,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();
@@ -344,7 +344,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();
}
@@ -371,7 +371,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);