[Libreoffice-commits] core.git: include/vcl

Tor Lillqvist tml at collabora.com
Mon Nov 16 12:50:25 PST 2015


 include/vcl/opengl/OpenGLHelper.hxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 43190248c9603a3038f2d35f825a07340ad04439
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Nov 16 20:39:17 2015 +0200

    If SAL_WARN() does nothing, no point in CHECK_GL_ERROR() either
    
    Earlier, CHECK_GL_ERROR() always called OpenGLHelper::checkGLError().
    That function looks up the OpenGL error status using glGetError(),
    which might be a not so light-weight operation, and outputs error
    information using SAL_WARN(). In a production build where SAL_WARN()
    is a no-op anyway, that is fairly pointless.
    
    Change-Id: I2d044bff6128a8ac7739020f8e414d7d3615e8d5

diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx
index 437b435..6c95f18 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -99,7 +99,11 @@ public:
 #endif
 };
 
+#ifdef SAL_LOG_WARN
 #define CHECK_GL_ERROR() OpenGLHelper::checkGLError(__FILE__, __LINE__)
+#else
+#define CHECK_GL_ERROR() do { } while (false)
+#endif
 
 #endif
 


More information about the Libreoffice-commits mailing list