[Libreoffice-commits] core.git: 2 commits - include/vcl
Tor Lillqvist
tml at collabora.com
Fri Sep 4 07:35:47 PDT 2015
include/vcl/opengl/OpenGLHelper.hxx | 8 +++++---
include/vcl/opengl/OpenGLWrapper.hxx | 6 ++++--
2 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit da26fa240994377eec0a1b1cdb777ef49b36826f
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Sep 4 17:13:30 2015 +0300
Avoid OpenGL information logging when not using OpenGL
Change-Id: I7ce9b5cedc620c14e6315acde66aefe60e8bd5ab
diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx
index 9f725e6..a4729a7 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -26,7 +26,7 @@
/// Helper to do a SAL_INFO as well as a GL log.
#define VCL_GL_INFO(area,stream) \
do { \
- if (SAL_DETAIL_ENABLE_LOG_INFO) \
+ if (SAL_DETAIL_ENABLE_LOG_INFO && OpenGLHelper::isVCLOpenGLEnabled()) \
{ \
::std::ostringstream detail_stream; \
detail_stream << stream; \
commit 20f1ba114c56b13659bb3ccd3dfdbcfc15a3d10e
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Sep 4 16:51:26 2015 +0300
Add explanation and enforce non-instantiability
Change-Id: I3ea699dcda21b695a486c86d7f7b7a8abc2a8fbe
diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx
index 646a2d3..9f725e6 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -34,9 +34,11 @@
} \
} while (false)
-class VCL_DLLPUBLIC OpenGLHelper
+// All member functions static and VCL_DLLPUBLIC. Basically a glorified namespace.
+struct VCL_DLLPUBLIC OpenGLHelper
{
-public:
+ OpenGLHelper() SAL_DELETED_FUNCTION; // Should not be instantiated
+
static GLint LoadShaders(const OUString& rVertexShaderName, const OUString& rFragmentShaderName, const OString& preamble = "" );
/**
diff --git a/include/vcl/opengl/OpenGLWrapper.hxx b/include/vcl/opengl/OpenGLWrapper.hxx
index c2f44c0..4d3a9e9 100644
--- a/include/vcl/opengl/OpenGLWrapper.hxx
+++ b/include/vcl/opengl/OpenGLWrapper.hxx
@@ -14,9 +14,11 @@
#include <vcl/dllapi.h>
-class VCL_DLLPUBLIC OpenGLWrapper
+// All member functions static and VCL_DLLPUBLIC. Basically a glorified namespace.
+struct VCL_DLLPUBLIC OpenGLWrapper
{
-public:
+ OpenGLWrapper() SAL_DELETED_FUNCTION; // Should not be instantiated
+
/**
* Returns true if VCL has OpenGL rendering enabled
*/
More information about the Libreoffice-commits
mailing list