macOS: disable threaded OpenGL (unconditionally)
We can’t determine when the app will use layer-backed views without having access to the QWindow and NSView instance, so make the conservative choice of always returning false for ThreadedOpenGL. Task-number: QTBUG-74820 Change-Id: If2779b17eead78ce1929ccebc3bd8fc0eb00c4b5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
0b693175e4
commit
fc3e851414
@ -347,11 +347,13 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
|
||||
switch (cap) {
|
||||
#ifndef QT_NO_OPENGL
|
||||
case ThreadedOpenGL:
|
||||
// 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);
|
||||
// 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;
|
||||
case OpenGL:
|
||||
case BufferQueueingOpenGL:
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user