vcl/source/opengl/OpenGLContext.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 56e49887e0c348297f9c75bb9eb5497b39f9fbfa Author: Jan Holesovsky <[email protected]> Date: Wed Sep 2 11:37:17 2015 +0200 windows opengl: Avoid an unnecessary wglMakeCurrent() call. Change-Id: I1c1287a29067c053565c49c0ce96918a2d27d87f Reviewed-on: https://gerrit.libreoffice.org/18260 Reviewed-by: Michael Meeks <[email protected]> Tested-by: Michael Meeks <[email protected]> diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 84d8a79..16e499d 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -1278,7 +1278,6 @@ void OpenGLContext::reset() // destroy all programs if( !maPrograms.empty() ) { - makeCurrent(); maPrograms.clear(); } @@ -1296,7 +1295,8 @@ void OpenGLContext::reset() if (itr != g_vShareList.end()) g_vShareList.erase(itr); - wglMakeCurrent(NULL, NULL); + if (wglGetCurrentContext() != NULL) + wglMakeCurrent(NULL, NULL); wglDeleteContext( m_aGLWin.hRC ); ReleaseDC( m_aGLWin.hWnd, m_aGLWin.hDC ); } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
