macOS: Minor metal support nits/cleanups

Change-Id: I840426ebf35b0fec64e92386fc3e1cabd91ced25
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2018-05-29 14:36:01 +02:00
parent b92db8a4ad
commit b6fcc86101

View File

@ -157,8 +157,7 @@
- (CALayer *)makeBackingLayer
{
bool makeMetalLayer = [self shouldUseMetalLayer:m_platformWindow->window()->surfaceType()];
if (makeMetalLayer) {
if ([self shouldUseMetalLayer:m_platformWindow->window()->surfaceType()]) {
// Check if Metal is supported. If it isn't then it's most likely
// too late at this point and the QWindow will be non-functional,
// but we can at least print a warning.
@ -183,7 +182,7 @@
- (NSViewLayerContentsRedrawPolicy)layerContentsRedrawPolicy
{
// We need to set this this excplicitly since the super implementation
// We need to set this explicitly since the super implementation
// returns LayerContentsRedrawNever for custom layers like CAMetalLayer.
return NSViewLayerContentsRedrawDuringViewResize;
}