[Libreoffice-commits] core.git: vcl/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Sun Nov 30 16:30:11 PST 2014
vcl/source/opengl/OpenGLHelper.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 1fd34cd93faf13c30501635b41d01e0fc5606755
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Dec 1 01:18:25 2014 +0100
introduce SAL_FORCEGL and document the variables
SAL_FORCEGL can force OpenGL even if the driver is blacklisted.
Change-Id: Idc763d81fef6dbdf915154995205fbf2b1f060b4
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index daee089..3c08c03 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -401,6 +401,17 @@ bool OpenGLHelper::supportsVCLOpenGL()
bool OpenGLHelper::isVCLOpenGLEnabled()
{
+ /*
+ * There are a number of cases that these environment variables cover:
+ * * SAL_FORCEGL forces OpenGL independent of any other option
+ * * SAL_DISABLEGL or a blacklisted driver avoid the use of OpenGL if SAL_FORCEGL is not set
+ * * SAL_ENABLEGL overrides VCL_HIDE_WINDOWS and the configuration variable
+ * * the configuration variable is checked if no environment variable is set
+ */
+ static bool bForceOpenGL = !!getenv("SAL_FORCEGL");
+ if (bForceOpenGL)
+ return true;
+
if (!supportsVCLOpenGL())
return false;
@@ -411,7 +422,6 @@ bool OpenGLHelper::isVCLOpenGLEnabled()
static bool bDuringBuild = getenv("VCL_HIDE_WINDOWS");
if (bDuringBuild && !bEnable /* env. enable overrides */)
bEnable = false;
-
else if (officecfg::Office::Common::VCL::UseOpenGL::get())
bEnable = true;
More information about the Libreoffice-commits
mailing list