diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-07-07 18:24:43 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-07-11 09:35:34 +0000 |
commit | c2f786d59c8171c05cc7ff8c98b8a85175e5e5a2 (patch) | |
tree | e01e062ab0e5c474220b653a8d12fffc4768c90d | |
parent | 9883dca4714c82079d390da18d1e3ff36f29b5a7 (diff) |
Fix "Could not share GL contexts" warnings on Windows
Make sure that a non-Core Profile OpenGL Context is created on the
Chromium side, so that sharing between the Qt global context and the
Chromium ones works.
Change-Id: Ifc5f39268395615fe50c8aa9467f833c0de233a8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
-rw-r--r-- | src/core/web_engine_context.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 56dbb84b7..9d993b7f4 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -332,6 +332,17 @@ WebEngineContext::WebEngineContext() parsedCommandLine->AppendSwitch(switches::kDisablePepper3DImageChromium); #endif +#if defined(Q_OS_WIN) + // This switch is used in Chromium's gl_context_wgl.cc file to determine whether to create + // an OpenGL Core Profile context. If the switch is not set, it would always try to create a + // Core Profile context, even if Qt uses a legacy profile, which causes + // "Could not share GL contexts" warnings, because it's not possible to share between Core and + // legacy profiles. + // Given that Core profile is not currently supported on Windows anyway, pass this switch to + // get rid of the warnings. + parsedCommandLine->AppendSwitch(switches::kDisableES3GLContext); +#endif + if (useEmbeddedSwitches) { // Inspired by the Android port's default switches if (!parsedCommandLine->HasSwitch(switches::kDisableOverlayScrollbar)) |