summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-09-07 21:13:26 +0200
committerTomaž Vajngerl <quikee@gmail.com>2015-09-11 08:57:33 +0000
commitb308e5f45e36ec102c4388983ca8aaceb97d8da4 (patch)
treefaf484dbffeab2063fdbfd658b35d819884eeffb
parent3dae249c7bb0919d39dc88816d6ec38fb2b54e09 (diff)
avoid some OpenGL calls when vcl OpenGL is not enabled
There are even more and it is causing a number of performance issues. This just fixes the most obvious place. Change-Id: Id85c13b5b7f4bb0bc077e62c39258067e17c0094 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/18441 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 978fdd7f28c1..5893cf613d2f 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1397,7 +1397,7 @@ bool OpenGLContext::isCurrent()
return false;
#elif defined( UNX )
GLXDrawable nDrawable = mbPixmap ? m_aGLWin.glPix : m_aGLWin.win;
- return (glXGetCurrentContext() == m_aGLWin.ctx &&
+ return (m_aGLWin.ctx && glXGetCurrentContext() == m_aGLWin.ctx &&
glXGetCurrentDrawable() == nDrawable);
#endif
}