summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-05-29 14:19:13 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-05-31 15:50:33 +0000
commitc538a333db4b7526fb4d9a82c06296d2492bf000 (patch)
tree416a79c901abcbb0a3015eff2b973d77db993d7a
parentaf928dd16006729a6b9f0c3c866fd2e57b5bda01 (diff)
macOS: Make layer-backed mode the default
QWindows are still backed by NSViews, but these views render to a CoreAnimation layer instead of directly to the top level NSWindow. This is the direction Apple is going (and is the only available option on iOS/tvOS), so we want to move away from the existing code path as soon as possible. The default can be reversed by setting QT_MAC_WANTS_LAYER=0, or the _q_mac_wantsLayer property on QWindow. [ChangeLog][macOS] Layer-backed mode is now the default for QWindow. Change-Id: Ibb9cc7541b179cad215d0daee14aeb1b54be614c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
-rw-r--r--src/plugins/platforms/cocoa/qnsview_drawing.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_drawing.mm b/src/plugins/platforms/cocoa/qnsview_drawing.mm
index 88c5b595e9..4e6f71973f 100644
--- a/src/plugins/platforms/cocoa/qnsview_drawing.mm
+++ b/src/plugins/platforms/cocoa/qnsview_drawing.mm
@@ -147,12 +147,12 @@
// on and off is not a supported use-case, so this code is effectively
// returning a constant for the lifetime of our QSNSView, which means
// we don't care about emitting KVO signals for @"wantsLayer".
- bool layerRequested = qt_mac_resolveOption(false, m_platformWindow->window(),
+ bool wantsLayer = qt_mac_resolveOption(true, m_platformWindow->window(),
"_q_mac_wantsLayer", "QT_MAC_WANTS_LAYER");
bool layerForSurfaceType = [self shouldUseMetalLayer:m_platformWindow->window()->surfaceType()];
- return layerRequested || layerForSurfaceType;
+ return wantsLayer || layerForSurfaceType;
}
- (CALayer *)makeBackingLayer