Kaydet (Commit) 1fd34cd9 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

introduce SAL_FORCEGL and document the variables

SAL_FORCEGL can force OpenGL even if the driver is blacklisted.

Change-Id: Idc763d81fef6dbdf915154995205fbf2b1f060b4
üst 317b5bc5
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment