summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-01 01:18:25 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-01 01:30:00 +0100
commit1fd34cd93faf13c30501635b41d01e0fc5606755 (patch)
tree221c1aa746aca8a0b9586faa90601f78438aa7ba /vcl
parent317b5bc5f801135b027e02d5acfc407cc2d05689 (diff)
introduce SAL_FORCEGL and document the variables
SAL_FORCEGL can force OpenGL even if the driver is blacklisted. Change-Id: Idc763d81fef6dbdf915154995205fbf2b1f060b4
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index daee089aaacf..3c08c0345025 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;