Kaydet (Commit) d2009225 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

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
üst 5f6bdce0
......@@ -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();
......
......@@ -55,7 +55,7 @@ void SalYieldMutex::release()
{
if ( mnCount == 1 )
{
OpenGLContext::resetAllContexts();
OpenGLContext::clearCurrent();
mnThreadId = 0;
}
mnCount--;
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment