diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-11-16 14:51:28 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-11-16 17:24:59 +0000 |
commit | 9801b2c24c3115b52de3f6958eb462648d702491 (patch) | |
tree | d09b8f3f3756cf8808932b88cf31c19542a36b25 /vcl/source/opengl | |
parent | 4ad05823f6c2edb0f5fbf5794b2deb6c163686a2 (diff) |
opengl: remove unused mbPixmap & glPix members.
We use textures bound to FBO's for everything in recent times.
Change-Id: I7c9068d75b3653a2ceff0056e2ade1f27955422f
Reviewed-on: https://gerrit.libreoffice.org/19995
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 6929bbc5b825..6670489efce1 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -71,10 +71,6 @@ OpenGLContext::OpenGLContext(): { VCL_GL_INFO("vcl.opengl", "new context: " << this); -#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS) - mbPixmap = false; -#endif - ImplSVData* pSVData = ImplGetSVData(); if( pSVData->maGDIData.mpLastContext ) { @@ -727,7 +723,7 @@ bool OpenGLContext::ImplInit() pSharedCtx = g_vShareList.front(); #ifdef DBG_UTIL - if (!mbPixmap && glXCreateContextAttribsARB && !mbRequestLegacyContext) + if (glXCreateContextAttribsARB && !mbRequestLegacyContext) { int best_fbc = -1; GLXFBConfig* pFBC = getFBConfig(m_aGLWin.dpy, m_aGLWin.win, best_fbc, mbUseDoubleBufferedRendering, true); @@ -772,7 +768,7 @@ bool OpenGLContext::ImplInit() return false; } - if( !glXMakeCurrent( m_aGLWin.dpy, mbPixmap ? m_aGLWin.glPix : m_aGLWin.win, m_aGLWin.ctx ) ) + if( !glXMakeCurrent( m_aGLWin.dpy, m_aGLWin.win, m_aGLWin.ctx ) ) { SAL_WARN("vcl.opengl", "unable to select current GLX context"); return false; @@ -788,12 +784,7 @@ bool OpenGLContext::ImplInit() SAL_INFO("vcl.opengl", "available GL extensions: " << m_aGLWin.GLExtensions); XWindowAttributes xWinAttr; - if( mbPixmap ) - { - m_aGLWin.Width = 0; // FIXME: correct ? - m_aGLWin.Height = 0; - } - else if( !XGetWindowAttributes( m_aGLWin.dpy, m_aGLWin.win, &xWinAttr ) ) + if( !XGetWindowAttributes( m_aGLWin.dpy, m_aGLWin.win, &xWinAttr ) ) { SAL_WARN("vcl.opengl", "Failed to get window attributes on " << m_aGLWin.win); m_aGLWin.Width = 0; @@ -1278,9 +1269,6 @@ void OpenGLContext::reset() SAL_WARN("vcl.opengl", "glError: " << glGetError()); } glXDestroyContext(m_aGLWin.dpy, m_aGLWin.ctx); - - if (mbPixmap && m_aGLWin.glPix != None) - glXDestroyPixmap(m_aGLWin.dpy, m_aGLWin.glPix); m_aGLWin.ctx = nullptr; } #endif @@ -1350,17 +1338,16 @@ bool OpenGLContext::isCurrent() OpenGLZone aZone; #if defined( WNT ) - return (wglGetCurrentContext() == m_aGLWin.hRC && - wglGetCurrentDC() == m_aGLWin.hDC); + return wglGetCurrentContext() == m_aGLWin.hRC && + wglGetCurrentDC() == m_aGLWin.hDC; #elif defined( MACOSX ) (void) this; // loplugin:staticmethods return false; #elif defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) return false; #elif defined( UNX ) - GLXDrawable nDrawable = mbPixmap ? m_aGLWin.glPix : m_aGLWin.win; - return (m_aGLWin.ctx && glXGetCurrentContext() == m_aGLWin.ctx && - glXGetCurrentDrawable() == nDrawable); + return m_aGLWin.ctx && glXGetCurrentContext() == m_aGLWin.ctx && + glXGetCurrentDrawable() == m_aGLWin.win; #endif } @@ -1432,10 +1419,10 @@ void OpenGLContext::makeCurrent() if (m_aGLWin.dpy) { - GLXDrawable nDrawable = mbPixmap ? m_aGLWin.glPix : m_aGLWin.win; - if (!glXMakeCurrent( m_aGLWin.dpy, nDrawable, m_aGLWin.ctx )) + if (!glXMakeCurrent( m_aGLWin.dpy, m_aGLWin.win, m_aGLWin.ctx )) { - SAL_WARN("vcl.opengl", "OpenGLContext::makeCurrent failed on drawable " << nDrawable << " pixmap? " << mbPixmap); + SAL_WARN("vcl.opengl", "OpenGLContext::makeCurrent failed " + "on drawable " << m_aGLWin.win); return; } } @@ -1497,7 +1484,7 @@ void OpenGLContext::swapBuffers() #elif defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) // nothing #elif defined( UNX ) - glXSwapBuffers(m_aGLWin.dpy, mbPixmap ? m_aGLWin.glPix : m_aGLWin.win); + glXSwapBuffers(m_aGLWin.dpy, m_aGLWin.win); #endif } |