summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-07-25 13:58:44 +0900
committerTomaž Vajngerl <quikee@gmail.com>2016-07-25 14:35:15 +0000
commit1b7ef90fba218b27f3757d117f5e2d3c872c5da8 (patch)
tree9eca8f1004f64ee61d35f13fd129e35d8b3598cb /vcl/source/opengl
parenteb09e512ae8283f52114c29f4a7d481fa82ab372 (diff)
opengl: add VCL_GL_WARN to write warnings into api trace file
Change-Id: I416de926a769dccdf1c53072c1f7dda817c5402a Reviewed-on: https://gerrit.libreoffice.org/27496 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 5dff6894494d..2060b35cf6d5 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -1018,11 +1018,15 @@ bool OpenGLWrapper::isVCLOpenGLEnabled()
void OpenGLHelper::debugMsgStream(std::ostringstream const &pStream)
{
- debugMsgPrint ("%x: %s", osl_getThreadIdentifier(nullptr),
- pStream.str().c_str());
+ debugMsgPrint(0, "%x: %s", osl_getThreadIdentifier(nullptr), pStream.str().c_str());
}
-void OpenGLHelper::debugMsgPrint(const char *pFormat, ...)
+void OpenGLHelper::debugMsgStreamWarn(std::ostringstream const &pStream)
+{
+ debugMsgPrint(1, "%x: %s", osl_getThreadIdentifier(nullptr), pStream.str().c_str());
+}
+
+void OpenGLHelper::debugMsgPrint(const int nType, const char *pFormat, ...)
{
va_list aArgs;
va_start (aArgs, pFormat);
@@ -1038,7 +1042,14 @@ void OpenGLHelper::debugMsgPrint(const char *pFormat, ...)
if (!bHasContext)
strcat(pStr, "- no GL context");
- SAL_INFO("vcl.opengl", pStr);
+ if (nType == 0)
+ {
+ SAL_INFO("vcl.opengl", pStr);
+ }
+ else if (nType == 1)
+ {
+ SAL_WARN("vcl.opengl", pStr);
+ }
if (bHasContext)
{