summaryrefslogtreecommitdiffstats
path: root/src/core/gl_surface_qt.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-08-22 19:08:15 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2017-09-13 16:04:16 +0000
commitc7d46325e635d1fb4482b53dce866e2c55026a7e (patch)
treeb517b5ce12d52b1f1577b08f3d3ded1b8f04bdef /src/core/gl_surface_qt.cpp
parentab0603f2a2e59d8a671326f659d1c316c7383606 (diff)
Allow WebGL to work with a software OpenGL implementation on Windows
A user can explicitly request software OpenGL rendering via opengl32sw.dll instead of Skia rendering, by passing the --enable-webgl-software-rendering command line argument. This will make sure not to disable GPU processing if and only if software OpenGL rendering is used on Windows (via QT_OPENGL=software environment variable, or the Qt::AA_UseSoftwareOpenGL attribute), so that WebGL is not disabled. Software OpenGL rendering will still use Skia on platforms other than Windows. Change-Id: I8b3601b144e09e3a732abfb74dbbf6f924889b5a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/gl_surface_qt.cpp')
-rw-r--r--src/core/gl_surface_qt.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp
index 766c14738..930fc23a3 100644
--- a/src/core/gl_surface_qt.cpp
+++ b/src/core/gl_surface_qt.cpp
@@ -48,6 +48,7 @@
#include <QGuiApplication>
#include "gl_context_qt.h"
#include "qtwebenginecoreglobal_p.h"
+#include "web_engine_context.h"
#include "base/logging.h"
#include "gpu/ipc/service/image_transport_surface.h"
@@ -618,6 +619,11 @@ bool InitializeGLOneOffPlatform()
return false;
}
+bool usingSoftwareDynamicGL()
+{
+ return QtWebEngineCore::usingSoftwareDynamicGL();
+}
+
scoped_refptr<GLSurface>
CreateOffscreenGLSurface(const gfx::Size& size)
{