diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-10-18 23:53:44 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-10-24 16:42:40 +0000 |
commit | 5f36c66183049522977a386d9afce462ac5d3ec0 (patch) | |
tree | 7bb98672d190c6bb857fe87949e265d6ae6ad790 /desktop | |
parent | 3f373500282c926031eed4f995ca8d51402ed187 (diff) |
tdf#103395 opencl: don't initialize OpenCL when disabled
If SAL_DISABLE_OPENCL is set we don't want to do any kind of
OpenCL initialization. Put an extra guard in fillOpenCLInfo
(and similar methods in opencl package) to prevent that.
Put the check if OpenCL can be used into one place which checks
SAL_DISABLE_OPENCL and UseOpenCL in configuration.
Reviewed-on: https://gerrit.libreoffice.org/30025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 21e8ed8b5f032f63012a7ee84bce64fac218154f)
Change-Id: Icc216d4299d3a7942843117ab9b9411de8075b11
Reviewed-on: https://gerrit.libreoffice.org/30220
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/opencl.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/desktop/source/app/opencl.cxx b/desktop/source/app/opencl.cxx index 13161f3a299f..791b7a91649e 100644 --- a/desktop/source/app/opencl.cxx +++ b/desktop/source/app/opencl.cxx @@ -117,8 +117,7 @@ bool testOpenCLCompute(const Reference< XDesktop2 > &xDesktop, const OUString &r void Desktop::CheckOpenCLCompute(const Reference< XDesktop2 > &xDesktop) { - if (getenv("SAL_DISABLE_OPENCL") || - !officecfg::Office::Common::Misc::UseOpenCL::get()) + if (!opencl::canUseOpenCL()) return; SAL_INFO("opencl", "Initiating test of OpenCL device"); |