From 3803b41eaecb6c1686aba88b4226486507aca094 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 14 May 2019 14:02:32 +0200 Subject: Revert "macOS: disable threaded OpenGL (unconditionally)" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/plugins/platforms/cocoa/qcocoaintegration.mm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/plugins/platforms') 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 -- cgit v1.2.3