diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-08-05 11:07:45 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-08-18 00:35:21 +0200 |
commit | 1fc7ca091b3fdda52381a383318a3a752ec21132 (patch) | |
tree | bc794ba56de848a543c9167856fe9cf60b938de2 /src/plugins/platforms/cocoa/qcocoaintegration.mm | |
parent | d1111632e29124531d5b4512e0492314caaae396 (diff) |
macOS: Remove support for surface-backed views
Our deployment target is 10.14, which enables layer-backing by default,
and our layer-backing support nowadays is stable enough that we don't
need to maintain any of the old code paths for compatibility.
The wantsBestResolutionOpenGLSurface property on NSView is only relevant
for surface-backed views, so we no longer need to deal with it.
Change-Id: I8aef4ac99371113d463ac35eee648a8a2fd1ea72
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.mm | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 4f4373fbac..250d9fc6e5 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -259,8 +259,8 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons // 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); + // layer-backed. + return false; case OpenGL: case BufferQueueingOpenGL: #endif @@ -333,13 +333,7 @@ QPlatformBackingStore *QCocoaIntegration::createPlatformBackingStore(QWindow *wi return nullptr; } - QPlatformBackingStore *backingStore = nullptr; - if (platformWindow->view().layer) - backingStore = new QCALayerBackingStore(window); - else - backingStore = new QNSWindowBackingStore(window); - - return backingStore; + return new QCALayerBackingStore(window); } QAbstractEventDispatcher *QCocoaIntegration::createEventDispatcher() const |