summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-09-21 12:54:13 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-11-12 14:57:58 +0000
commit396ca081d7b0d9dab7de14ebaec7943c3f857a24 (patch)
tree23183b1e96d18a2e8dfee0b1f46d7b146097cbd5 /src/core/render_widget_host_view_qt.cpp
parent7ebbd9e39106b3dfbac9de8f3305a7ca8712474d (diff)
Fix GPU compositing (and WebGL) to work with ANGLE on Windows
Given the changes that implement GPU compositing on the UI thread (and thus only a single thread accesses all OpenGL contexts) it is now possible to enable GPU compositing to work together with ANGLE, which did not work before due to ANGLE being thread-unsafe. This requires a couple of things: - Enable GPU compositing via kInProcessGPU switch when using ANGLE - A small fix in GLContextHelper::getEGLDisplay() to return a correct "egldisplay "handle - Improved logic when to pass the kDisableES3GLContext switch depending on which OpenGL ES version is requested (2 or 3) - Adjustments in RenderWidgetHostViewQtDelegateWidget() to set up a correct surface format which matches the shared context OpenGL ES major version - A recent enough version of ANGLE (due to bugs calling glTexImage2D with an unsupported internal texture format for GL_DEPTH_COMPONENT, from inside gpu::gles2::IsWebGLDrawBuffersSupported) By default if no special QSurfaceFormat is set as the default surface format, using ANGLE will create an OpenGL ES 2 context, and will thus provide support only for WebGL 1. To enable OpenGL ES 3 / WebGL 2 support, make sure to set a default QSurfaceFormat with major version set to 3, and enable ANGLE either via QT_OPENGL=angle or QGuiApplication::setAttribute(Qt::AA_UseOpenGLES). The default surface format must be set before the Q*App instance is created. Manual test "webgl" added. Task-number: QTBUG-53908 Task-number: QTBUG-55604 Task-number: QTBUG-69236 Change-Id: Ic31dfdff1ca22d4689db5cf64126d7d12790aa76 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
0 files changed, 0 insertions, 0 deletions