summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-05-14 14:02:32 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2019-05-14 12:30:13 +0000
commit3803b41eaecb6c1686aba88b4226486507aca094 (patch)
tree2be6a444143c74c2195d42218a6405234c8e9878 /src
parent1c7b5c20a5f1c2fabf9df7ee636014f5ba0ab114 (diff)
Revert "macOS: disable threaded OpenGL (unconditionally)"
This reverts commit fc3e8514144535db22c431251bc0feea99cf72e2. The patch introduces a crash in Qt Quick in the test tst_QQuickWindow::multipleWindows() on macOS 10.12. Reverting this will cause dead locks on older macOS versions for users who opt in to using layer backed mode, so we should bring this back as soon as a fix can be found for the crash. But in order to proceed with qt5.git integration, we revert it for now. Task-number: QTBUG-75782 Change-Id: I57f6b2918c3fc4b4e58a8c39b24a19e2d796a4f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 855b42657d..fb3d05d3e4 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -347,13 +347,11 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
switch (cap) {
#ifndef QT_NO_OPENGL
case ThreadedOpenGL:
- // Qt's threaded OpenGL implementation does not work well for layer-backed
- // views, where we can easily end up in situations where rendering on secondary
- // threads will result in visual artifacts, bugs, or even deadlocks. It is
- // not possible to determine here if the the app will be using layer-backed
- // views (it can opt-in using SDK 10.14+ on macOS 10.4+, or by setting
- // NSWindow flags such as NSWindowStyleMaskFullSizeContentView).
- return false;
+ // AppKit expects rendering to happen on the main thread, and we can
+ // easily end up in situations where rendering on secondary threads
+ // will result in visual artifacts, bugs, or even deadlocks, when
+ // building with SDK 10.14 or higher which enbles view layer-backing.
+ return QMacVersion::buildSDK() < QOperatingSystemVersion(QOperatingSystemVersion::MacOSMojave);
case OpenGL:
case BufferQueueingOpenGL:
#endif