summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2016-02-10 16:24:40 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2016-02-12 05:56:55 +0000
commitf3330812f8b15dabd5628ac9e40178f20180d8cf (patch)
tree7dd19d6b8d227f4514eb70b1f5c871b0c49e8e86
parent87cc80fd8182b24ff42f0f5458cb82f139730536 (diff)
Fix rendering with default OpenGL surface on Linux
Commit 32929885 led to rendering blank pages in QWebEngineView. Set the OpenGL version only if the core profile is requested. Change-Id: Ie05c7804afbce26aee63455e27c23219484f535d Task-number: QTBUG-51032 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index 7eca835d..92d0c6de 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -83,9 +83,11 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
#endif
// Make sure the OpenGL profile of the QOpenGLWidget matches the shared context profile.
- format.setMajorVersion(sharedFormat.majorVersion());
- format.setMinorVersion(sharedFormat.minorVersion());
- format.setProfile(sharedFormat.profile());
+ if (sharedFormat.profile() == QSurfaceFormat::CoreProfile) {
+ format.setMajorVersion(sharedFormat.majorVersion());
+ format.setMinorVersion(sharedFormat.minorVersion());
+ format.setProfile(sharedFormat.profile());
+ }
}
setFormat(format);