From 33b4d6f1dffbec770bdc22d5952be52bdd0cc872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= <michael.bruning@digia.com> Date: Wed, 30 Jul 2014 18:39:36 +0200 Subject: [PATCH] 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> --- src/webengine/api/qtwebengineglobal.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webengine/api/qtwebengineglobal.cpp b/src/webengine/api/qtwebengineglobal.cpp index f45f7663f..11dbccfac 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); -- GitLab