diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-09-07 21:13:26 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-09-07 21:15:51 +0200 |
commit | 4ff0032528d7aebb0de5cf045a39972a2769029f (patch) | |
tree | 0811a99e061c25f61ee79195786b51b8af0bcd75 /vcl/source/opengl | |
parent | 442eb1ab9d8c1ad970993ef6c8a49e89601b7432 (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
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 83a1811519cd..a80d24b32010 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -1309,7 +1309,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 } |