summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-07-08 18:10:48 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-08-05 19:55:41 +0200
commit5821cd3b98e2e830bdf107cecc7138854822764b (patch)
treebff7f37343339d7eacd0ae4100f81f83c82b58cd /src
parent2ef8e66ffd61e18a2ce6933cc3b8d53f954b2a4a (diff)
Remove setting surface format for qquickwidget
QQuickWidget uses QSGDefaultContext::defaultSurfaceFormat() in initialization, which is based on QSurfaceFormat::defaultFormat() Removed code was overriding format based on shared context format for some cases. However defaultFormat is always a requested format and not actual supported one by hardware. Since we always create share context simplify the logic and try to catch all the surface format related issues in QWebEngineCore::initialize() and abort. Change-Id: I940601b5cd873ab5273baa863aa4e7277be448a6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp32
1 files changed, 0 insertions, 32 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 49cc08da5..af30c54b8 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -169,38 +169,6 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
, m_isPopup(false)
{
setFocusPolicy(Qt::StrongFocus);
-
- QSurfaceFormat format;
- format.setDepthBufferSize(24);
- format.setStencilBufferSize(8);
-
-#if QT_CONFIG(opengl)
- QOpenGLContext *globalSharedContext = QOpenGLContext::globalShareContext();
- if (globalSharedContext) {
- QSurfaceFormat sharedFormat = globalSharedContext->format();
- int major;
- int minor;
- QSurfaceFormat::OpenGLContextProfile profile;
- major = sharedFormat.majorVersion();
- minor = sharedFormat.minorVersion();
- profile = sharedFormat.profile();
- // Make sure the OpenGL profile of the QQuickWidget matches the shared context profile.
- // It covers the following cases:
- // 1) Desktop OpenGL Core Profile.
- // 2) Windows ANGLE OpenGL ES profile.
- if (sharedFormat.profile() == QSurfaceFormat::CoreProfile
-#ifdef Q_OS_WIN
- || globalSharedContext->isOpenGLES()
-#endif
- ) {
- format.setMajorVersion(major);
- format.setMinorVersion(minor);
- format.setProfile(profile);
- }
- }
-
- setFormat(format);
-#endif
setMouseTracking(true);
setAttribute(Qt::WA_AcceptTouchEvents);
setAttribute(Qt::WA_OpaquePaintEvent);