macOS: Don't set NSOpenGLPFANoRecovery for layer-backed views

The Apple software renderer is perfectly capable of being used when
compositing CA layers.

Change-Id: I3b78ff61a79869ecdb7bd431388041f2c124472e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-10-23 13:21:32 +02:00
parent 312793f28e
commit f2edc6cb3a

View File

@ -229,14 +229,6 @@ NSOpenGLPixelFormat *QCocoaGLContext::pixelFormatForSurfaceFormat(const QSurface
attrs << NSOpenGLPFARendererID << kCGLRendererGenericFloatID; attrs << NSOpenGLPFARendererID << kCGLRendererGenericFloatID;
} }
// FIXME: Pull this information out of the NSView
QByteArray useLayer = qgetenv("QT_MAC_WANTS_LAYER");
if (!useLayer.isEmpty() && useLayer.toInt() > 0) {
// Disable the software rendering fallback. This makes compositing
// OpenGL and raster NSViews using Core Animation layers possible.
attrs << NSOpenGLPFANoRecovery;
}
attrs << 0; // 0-terminate array attrs << 0; // 0-terminate array
return [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs.constData()]; return [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs.constData()];
} }