summaryrefslogtreecommitdiff
path: root/vcl/win/source
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-01-06 16:09:09 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-01-06 16:13:30 +0000
commit0bea1d80d10a1e3e9bebf958d622ff2fb480e886 (patch)
treebea0a6365d149abb5c37b4baaa6ae128b4e9da32 /vcl/win/source
parent3b52c4492c468ee5dfbb97382f53a28bdf8c0f4c (diff)
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
Diffstat (limited to 'vcl/win/source')
-rw-r--r--vcl/win/source/app/salinst.cxx3
1 files changed, 3 insertions, 0 deletions
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 <vcl/apptypes.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
+#include <vcl/opengl/OpenGLContext.hxx>
#include <vcl/timer.hxx>
#include <opengl/salbmp.hxx>
@@ -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();