diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-05-17 16:56:30 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-07-11 09:35:32 +0000 |
commit | 9883dca4714c82079d390da18d1e3ff36f29b5a7 (patch) | |
tree | 2118481825e551a3e0bc301ad5982cac636259be /tests | |
parent | 630f7b24f67646b05a2222761b192316123d8931 (diff) |
[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 <pvarga@inf.u-szeged.hu>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'tests')
2 files changed, 5 insertions, 2 deletions
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; diff --git a/tests/auto/widgets/qwebenginedefaultsurfaceformat/tst_qwebenginedefaultsurfaceformat.cpp b/tests/auto/widgets/qwebenginedefaultsurfaceformat/tst_qwebenginedefaultsurfaceformat.cpp index 3757a7842..1e8cc74e2 100644 --- a/tests/auto/widgets/qwebenginedefaultsurfaceformat/tst_qwebenginedefaultsurfaceformat.cpp +++ b/tests/auto/widgets/qwebenginedefaultsurfaceformat/tst_qwebenginedefaultsurfaceformat.cpp @@ -51,8 +51,8 @@ private Q_SLOTS: void tst_QWebEngineDefaultSurfaceFormat::customDefaultSurfaceFormat() { -#if defined(Q_OS_WIN) - QSKIP("Crashes on Windows"); +#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. |