[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/source
Jan Holesovsky
kendy at collabora.com
Wed Sep 2 03:46:00 PDT 2015
vcl/source/opengl/OpenGLContext.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 56e49887e0c348297f9c75bb9eb5497b39f9fbfa
Author: Jan Holesovsky <kendy at collabora.com>
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 <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
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 );
}
More information about the Libreoffice-commits
mailing list