diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-01-17 02:29:20 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-01-17 21:15:11 +0000 |
commit | 2495314b93b91a966dfce4ace558c7b9e21841fe (patch) | |
tree | 3dc51c7e597543ed3f8dd54497827ab2a58e532d /vcl | |
parent | 6240e598f29ee5e95c56e5885f539ce470d9afd6 (diff) |
no need to do that for all contexts
This fixes a crash as we would need to make each context current before
calling ReleaseFramebuffers.
However this is totally unnecessary as only the current context can have
bound framebuffers.
Change-Id: I8b1496bb890982742b3d2ebf60fdce47db642d70
Reviewed-on: https://gerrit.libreoffice.org/13973
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/app/geninst.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/salinst.cxx | 2 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 16 | ||||
-rw-r--r-- | vcl/win/source/app/salinst.cxx | 2 |
4 files changed, 3 insertions, 19 deletions
diff --git a/vcl/generic/app/geninst.cxx b/vcl/generic/app/geninst.cxx index 5ac4936c7b1e..031043532679 100644 --- a/vcl/generic/app/geninst.cxx +++ b/vcl/generic/app/geninst.cxx @@ -55,7 +55,7 @@ void SalYieldMutex::release() { if ( mnCount == 1 ) { - OpenGLContext::resetAllContexts(); + OpenGLContext::clearCurrent(); mnThreadId = 0; } mnCount--; diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 63735b9102eb..8ee435124a4a 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -271,7 +271,7 @@ void SalYieldMutex::release() { if ( mnCount == 1 ) { - OpenGLContext::resetAllContexts(); + // TODO: add OpenGLContext::clearCurrent with vcl OpenGL support mnThreadId = 0; } mnCount--; diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 81029c31bcc8..5cccd73bc78a 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -1293,22 +1293,6 @@ void OpenGLContext::clearCurrent() pCurrentCtx->ReleaseFramebuffers(); } -void OpenGLContext::resetAllContexts() -{ - ImplSVData* pSVData = ImplGetSVData(); - - // release all framebuffers from the old context so we can re-attach the - // texture in the new context - for (OpenGLContext* l = pSVData->maGDIData.mpLastContext; l; - l = l->mpPrevContext) - { - l->ReleaseFramebuffers(); - if (l->isCurrent()) - l->resetCurrent(); - assert (!l->mpNextContext || l->mpNextContext->mpPrevContext == l); - } -} - void OpenGLContext::makeCurrent() { ImplSVData* pSVData = ImplGetSVData(); diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index 1091856fd962..dcb81f0bf286 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -149,7 +149,7 @@ void SalYieldMutex::release() { if ( mnCount == 1 ) { - OpenGLContext::resetAllContexts(); + OpenGLContext::clearCurrent(); // If we don't call these message, the Output from the // Java clients doesn't come in the right order |