From 9883dca4714c82079d390da18d1e3ff36f29b5a7 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 17 May 2017 16:56:30 +0200 Subject: [macOS] Use the OpenGL CoreProfile when the global shared context does Previously when a default QSurfaceFormat was set with an OpenGL Core profile, all the contexts created on the Qt side would obey the profile, but Chromium would still use the Compatibility profile for its contexts leading to warnings when trying to create shared contexts. The fix is to check which OpenGL profile is used in the Qt global shared context, and pass that information along to Chromium. Note that this works only on macOS for now, and the default non-Core profile is used on other platforms, even though Core was requested. Passing CoreProfile to Chromium on Windows and Linux currently leads to crashes. Task-number: QTBUG-60605 Change-Id: I27a77091923624d19ccc2019953a5b07f9282916 Reviewed-by: Peter Varga Reviewed-by: Kai Koehne --- .../tst_qquickwebenginedefaultsurfaceformat.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto/quick/qquickwebenginedefaultsurfaceformat') diff --git a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp index 3d44efa6a..2afaf03a3 100644 --- a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp +++ b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp @@ -110,6 +110,9 @@ QUrl tst_QQuickWebEngineDefaultSurfaceFormat::urlFromTestPath(const char *localF void tst_QQuickWebEngineDefaultSurfaceFormat::customDefaultSurfaceFormat() { +#if !defined(Q_OS_MACOSX) + QSKIP("OpenGL Core Profile is currently only supported on macOS."); +#endif // Setting a new default QSurfaceFormat with a core OpenGL profile, before // app instantiation should succeed, without abort() being called. int argc = 1; -- cgit v1.2.3