diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-12-01 01:18:25 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-12-02 15:47:39 +0100 |
commit | dcf988aca5e7f19f995b9e4d1c6fd799bc304da7 (patch) | |
tree | a64adfd6954fad4fe199670d443c8b895947a27d | |
parent | 5d879e4a174054f3aa103b933e940b6bbd1c5076 (diff) |
introduce SAL_FORCEGL and document the variables
SAL_FORCEGL can force OpenGL even if the driver is blacklisted.
Change-Id: Idc763d81fef6dbdf915154995205fbf2b1f060b4
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 12 |
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; |