diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-05-20 15:20:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-05-21 15:43:56 +0000 |
commit | 56d2cab4704f079ca173d65619432665bc1a1c92 (patch) | |
tree | 18fc983d726c2ad5e77bceb78df4dc7abae54c8a /vcl/source/opengl/OpenGLContext.cxx | |
parent | 29428a5979ecf37eca7eb690a6acbc2897122753 (diff) |
split GLWindow into platform dependent parts and move to respective backends
Change-Id: I636d9bdac907000e4089aebdc5548ea89ec58083
Reviewed-on: https://gerrit.libreoffice.org/25252
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
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: */ |