From 1fc7ca091b3fdda52381a383318a3a752ec21132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 5 Aug 2020 11:07:45 +0200 Subject: macOS: Remove support for surface-backed views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoaintegration.mm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.mm') 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 -- cgit v1.2.3