summaryrefslogtreecommitdiff
path: root/vcl/source/opengl/OpenGLHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/opengl/OpenGLHelper.cxx')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 6ae47184ae2e..aa876ac60688 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -972,8 +972,6 @@ 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
*/
bSet = true;
@@ -989,17 +987,16 @@ bool OpenGLHelper::isVCLOpenGLEnabled()
else if (bSupportsVCLOpenGL)
{
static bool bEnableGLEnv = !!getenv("SAL_ENABLEGL");
+ static bool bHeadlessPlugin = (getenv("SAL_USE_VCLPLUGIN") &&
+ 0 == strcmp(getenv("SAL_USE_VCLPLUGIN"), "svp"));
bEnable = bEnableGLEnv;
- static bool bDuringBuild = getenv("VCL_HIDE_WINDOWS");
- if (bDuringBuild && !bEnable /* env. enable overrides */)
- bEnable = false;
- else if (officecfg::Office::Common::VCL::UseOpenGL::get())
+ if (officecfg::Office::Common::VCL::UseOpenGL::get())
bEnable = true;
- // Force disable in safe mode
- if (Application::IsSafeModeEnabled())
+ // Force disable in safe mode or when running with headless plugin
+ if (bHeadlessPlugin || Application::IsSafeModeEnabled())
bEnable = false;
bRet = bEnable;