vcl/source/opengl/OpenGLContext.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
New commits: commit 406883895bee90358f7840bde569abf885ca2712 Author: Michael Stahl <mst...@redhat.com> Date: Wed Nov 26 15:59:28 2014 +0100 vcl: prefix global variable g_vShareList Change-Id: I13ecc76d8bd75ee65e626670995d7c93efc953ca diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 534ce88..fb0e4ed 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -33,9 +33,9 @@ using namespace com::sun::star; // TODO use rtl::Static instead of 'static' #if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID -static std::vector<GLXContext> vShareList; +static std::vector<GLXContext> g_vShareList; #elif defined(WNT) -static std::vector<HGLRC> vShareList; +static std::vector<HGLRC> g_vShareList; #endif GLWindow::~GLWindow() @@ -77,7 +77,7 @@ OpenGLContext::~OpenGLContext() #if defined( WNT ) if (m_aGLWin.hRC) { - vShareList.erase(std::remove(vShareList.begin(), vShareList.end(), m_aGLWin.hRC), vShareList.end()); + g_vShareList.erase(std::remove(g_vShareList.begin(), g_vShareList.end(), m_aGLWin.hRC), g_vShareList.end()); wglMakeCurrent( m_aGLWin.hDC, 0 ); wglDeleteContext( m_aGLWin.hRC ); @@ -90,7 +90,7 @@ OpenGLContext::~OpenGLContext() #elif defined( UNX ) if(m_aGLWin.ctx) { - vShareList.erase(std::remove( vShareList.begin(), vShareList.end(), m_aGLWin.ctx), vShareList.end()); + g_vShareList.erase(std::remove( g_vShareList.begin(), g_vShareList.end(), m_aGLWin.ctx), g_vShareList.end()); glXMakeCurrent(m_aGLWin.dpy, None, NULL); if( glGetError() != GL_NO_ERROR ) @@ -696,8 +696,8 @@ bool OpenGLContext::ImplInit() SAL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start"); - if( !vShareList.empty() ) - pSharedCtx = vShareList.front(); + if (!g_vShareList.empty()) + pSharedCtx = g_vShareList.front(); #ifdef DBG_UTIL if (!mbPixmap && glXCreateContextAttribsARB && !mbRequestLegacyContext) @@ -737,7 +737,7 @@ bool OpenGLContext::ImplInit() if( m_aGLWin.ctx ) { - vShareList.push_back( m_aGLWin.ctx ); + g_vShareList.push_back( m_aGLWin.ctx ); } else { @@ -903,8 +903,8 @@ bool OpenGLContext::ImplInit() return false; HGLRC hSharedCtx = 0; - if (!vShareList.empty()) - hSharedCtx = vShareList.front(); + if (!g_vShareList.empty()) + hSharedCtx = g_vShareList.front(); // now setup the shared context; this needs a temporary context already // set up in order to work @@ -926,7 +926,7 @@ bool OpenGLContext::ImplInit() return false; } - vShareList.push_back(m_aGLWin.hRC); + g_vShareList.push_back(m_aGLWin.hRC); RECT clientRect; GetClientRect(WindowFromDC(m_aGLWin.hDC), &clientRect); commit bfaf877421bff1db74d1ba84a039075baf9d5800 Author: Michael Stahl <mst...@redhat.com> Date: Wed Nov 26 15:58:02 2014 +0100 vcl: fix STL asserts in ~OpenGLContext(), calling wrong erase() overload Change-Id: Ia830ac1e70f74859dff871f24538af3f2f83fd9d diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index a93185f..534ce88 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -77,7 +77,7 @@ OpenGLContext::~OpenGLContext() #if defined( WNT ) if (m_aGLWin.hRC) { - vShareList.erase(std::remove(vShareList.begin(), vShareList.end(), m_aGLWin.hRC)); + vShareList.erase(std::remove(vShareList.begin(), vShareList.end(), m_aGLWin.hRC), vShareList.end()); wglMakeCurrent( m_aGLWin.hDC, 0 ); wglDeleteContext( m_aGLWin.hRC ); @@ -90,7 +90,7 @@ OpenGLContext::~OpenGLContext() #elif defined( UNX ) if(m_aGLWin.ctx) { - vShareList.erase(std::remove( vShareList.begin(), vShareList.end(), m_aGLWin.ctx )); + vShareList.erase(std::remove( vShareList.begin(), vShareList.end(), m_aGLWin.ctx), vShareList.end()); glXMakeCurrent(m_aGLWin.dpy, None, NULL); if( glGetError() != GL_NO_ERROR ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits