include/vcl/opengl/OpenGLContext.hxx | 3 --- vcl/generic/app/geninst.cxx | 2 +- vcl/osx/salinst.cxx | 2 +- vcl/source/opengl/OpenGLContext.cxx | 16 ---------------- vcl/win/source/app/salinst.cxx | 2 +- 5 files changed, 3 insertions(+), 22 deletions(-)
New commits: commit 678a7225249619a57dc3225feaf527ed45c70736 Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Sat Jan 17 02:29:20 2015 +0100 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/13974 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Reviewed-by: Tor Lillqvist <t...@collabora.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 30e5261..7d72123 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -223,9 +223,6 @@ public: bool isCurrent(); static void clearCurrent(); - /// reset all contexts dis-associating them with their underlying - /// resources before a potential thread switch. - static void resetAllContexts(); /// make this GL context current - so it is implicit in subsequent GL calls void makeCurrent(); diff --git a/vcl/generic/app/geninst.cxx b/vcl/generic/app/geninst.cxx index 5ac4936..0310435 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 63735b9..8ee4351 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 81029c3..5cccd73 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 1091856..dcb81f0 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
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits