diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-11-22 20:47:07 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2014-12-12 09:41:07 +0100 |
commit | f9a00808991b01f5c3b473e9ec5d309b25b230b9 (patch) | |
tree | db6e749ef685d842c76d3bd46fa9d3e33b163564 /src/quick/scenegraph/qsgrenderloop.cpp | |
parent | 88508e9f4081a9b0008793dbe90c65f6b96c0f0f (diff) |
Default to threaded when using opengl32
This appplies only when using opengl32.dll. When using ANGLE or
when using another non-opengl32 DLL, the "windows" single-threaded
loop is chosen, just like before.
One badly written autotest is fixed. We must never assume that
performing some QQuickWindow related work will leave a context
current on the main thread. The assumption worked by accident with
the single-threaded render loop.
[ChangeLog][QtQuick] Changed to use the threaded render loop by
default on Windows when running with desktop OpenGL (opengl32.dll).
Change-Id: I21798622c19ca510a97a96c19c1e70e29f086e3a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/quick/scenegraph/qsgrenderloop.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgrenderloop.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index ecfbe0323c..985be8591f 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -169,7 +169,12 @@ QSGRenderLoop *QSGRenderLoop::instance() RenderLoopType loopType = BasicRenderLoop; #ifdef Q_OS_WIN - loopType = WindowsRenderLoop; + // With desktop OpenGL (opengl32.dll), use threaded. Otherwise (ANGLE) use windows. + if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL + && QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)) + loopType = ThreadedRenderLoop; + else + loopType = WindowsRenderLoop; #else if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)) loopType = ThreadedRenderLoop; |