From 0bea1d80d10a1e3e9bebf958d622ff2fb480e886 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 6 Jan 2015 16:09:09 +0000 Subject: vcl: reset OpenGLContext(s) when yielding the last SolarMutex. This should make OpenGL thread-safe to allow multiple threads to render using VCL's OpenGL backend, and fix misc. associated driver horrors, will give some performance cost for tight Yield loops. Change-Id: Ib23702262fd9f0925a5ed8c642d0a26e92136b37 --- vcl/win/source/app/salinst.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vcl/win/source') diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index 9e284eb819c9..1091856fd962 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -148,6 +149,8 @@ void SalYieldMutex::release() { if ( mnCount == 1 ) { + OpenGLContext::resetAllContexts(); + // If we don't call these message, the Output from the // Java clients doesn't come in the right order GdiFlush(); -- cgit