[Libreoffice-commits] core.git: include/vcl vcl/generic vcl/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Fri Jan 16 17:35:09 PST 2015
include/vcl/opengl/OpenGLContext.hxx | 3 ---
vcl/generic/app/geninst.cxx | 2 +-
vcl/source/opengl/OpenGLContext.cxx | 16 ----------------
3 files changed, 1 insertion(+), 20 deletions(-)
New commits:
commit d20092259c7ea63885a539f911788715f8147ee9
Author: Markus Mohrhard <markus.mohrhard at 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
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index 67570c1..5ef30cd 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -200,9 +200,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/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 9d681ff..4317d56 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1292,22 +1292,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();
More information about the Libreoffice-commits
mailing list