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>
This commit is contained in:
parent
af928dd160
commit
c538a333db
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user