summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@digia.com>2014-07-30 18:39:36 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-19 16:56:37 +0200
commit33b4d6f1dffbec770bdc22d5952be52bdd0cc872 (patch)
tree9fade4dba8f49bb8912d0837698494ea49be1789
parenta1c82229631c15f889ffb698759e8b989bb6f723 (diff)
Tell ANGLE to enable multithread protection.
This is done on initialization of the Web Engine as this should happen before any contexts and Direct 3D devices are created. It makes D3D9 create a device with the D3DCREATE_MULTITHREADED flag and makes D3D11 enable multithread protection using the ID3D10Multithread interface. Depends on the appropriate counterpart in QtANGLE. Change-Id: I8204de2f8ebe993273ff9f11af55caacb1290e4e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
-rw-r--r--src/webengine/api/qtwebengineglobal.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webengine/api/qtwebengineglobal.cpp b/src/webengine/api/qtwebengineglobal.cpp
index f45f7663..11dbccfa 100644
--- a/src/webengine/api/qtwebengineglobal.cpp
+++ b/src/webengine/api/qtwebengineglobal.cpp
@@ -74,6 +74,10 @@ void initialize()
if (shareContext)
return;
+#ifdef Q_OS_WIN32
+ qputenv("QT_D3DCREATE_MULTITHREADED", "1");
+#endif
+
shareContext = new QOpenGLContext;
shareContext->create();
qAddPostRoutine(deleteShareContext);