summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2017-04-25 22:24:04 -0400
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-26 11:24:59 +0200
commitb4f341389ce7fa889e8a668be0233d1dbbd814c2 (patch)
tree6212b26d9c901f094aff8e3311cb06c8482801ee /opencl
parent7bd87eb30ca5df683fa3bd94ca5be9dbca362c03 (diff)
Revert the wrong "cleanup" change.
Introduced by 63df0796f5ec500f3b6fb34510d4bc79c009e76d. Change-Id: I2481bcef144bd30571e69130d22f6d313dbddfea Reviewed-on: https://gerrit.libreoffice.org/36968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'opencl')
-rw-r--r--opencl/source/openclwrapper.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index 8660dd744816..892c2dd1bcf0 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -791,7 +791,10 @@ void findDeviceInfoFromDeviceId(cl_device_id aDeviceId, size_t& rDeviceId, size_
bool canUseOpenCL()
{
- return !getenv("SAL_DISABLE_OPENCL") || !officecfg::Office::Common::Misc::UseOpenCL::get();
+ if (getenv("SAL_DISABLE_OPENCL") || !officecfg::Office::Common::Misc::UseOpenCL::get())
+ return false;
+
+ return true;
}
bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEvaluation, OUString& rOutSelectedDeviceVersionIDString)