diff options
Diffstat (limited to 'vcl/source/opengl/OpenGLContext.cxx')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index b5e0a305d9f6..29e543611bf3 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -41,20 +41,11 @@ static sal_Int64 nBufferSwapCounter = 0; GLWindow::~GLWindow() { -#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS) - XFree(vi); -#endif } -bool GLWindow::Synchronize(bool bOnoff) const +bool GLWindow::Synchronize(bool /*bOnoff*/) const { -#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS) - XSynchronize(dpy, bOnoff); - return true; -#else - (void)bOnoff; return false; -#endif } OpenGLContext::OpenGLContext(): @@ -335,8 +326,9 @@ void OpenGLContext::setWinPosAndSize(const Point &rPos, const Size& rSize) if( m_pChildWindow ) m_pChildWindow->SetPosSizePixel(rPos, rSize); - m_aGLWin.Width = rSize.Width(); - m_aGLWin.Height = rSize.Height(); + GLWindow& rGLWin = getModifiableOpenGLWindow(); + rGLWin.Width = rSize.Width(); + rGLWin.Height = rSize.Height(); } void OpenGLContext::setWinSize(const Size& rSize) @@ -346,8 +338,9 @@ void OpenGLContext::setWinSize(const Size& rSize) if( m_pChildWindow ) m_pChildWindow->SetSizePixel(rSize); - m_aGLWin.Width = rSize.Width(); - m_aGLWin.Height = rSize.Height(); + GLWindow& rGLWin = getModifiableOpenGLWindow(); + rGLWin.Width = rSize.Width(); + rGLWin.Height = rSize.Height(); } void OpenGLContext::InitChildWindow(SystemChildWindow *pChildWindow) @@ -599,7 +592,7 @@ const SystemChildWindow* OpenGLContext::getChildWindow() const bool OpenGLContext::supportMultiSampling() const { - return m_aGLWin.bMultiSampleSupported; + return getOpenGLWindow().bMultiSampleSupported; } bool OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer ) @@ -836,9 +829,4 @@ void OpenGLContext::UseNoProgram() CHECK_GL_ERROR(); } -const GLWindow& OpenGLContext::getOpenGLWindow() const -{ - return m_aGLWin; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |