diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-07-01 18:24:48 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-07-01 19:02:57 +0000 |
commit | ef47ce2397d4ed453fe01d994d13a13f442ec3bb (patch) | |
tree | 8055cdc3a1fe6e60d61cbe0171f0ff0c60afd2ef /cui/source/options | |
parent | svx lok: add LOK_CALLBACK_GRAPHIC_VIEW_SELECTION (diff) | |
download | core-ef47ce2397d4ed453fe01d994d13a13f442ec3bb.tar.gz core-ef47ce2397d4ed453fe01d994d13a13f442ec3bb.zip |
tdf#90336 - further cleanup of OpenCL options page.
Still problematic; since we only show OpenCL as being available
if it has already been initialized and used.
Change-Id: I5e82a3f778f4f2025408330b6d9da51402d01e79
Reviewed-on: https://gerrit.libreoffice.org/26866
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/optopencl.cxx | 13 | ||||
-rw-r--r-- | cui/source/options/optopencl.hxx | 3 |
2 files changed, 7 insertions, 9 deletions
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index ec8f432816eb..cbe37dd6ed54 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -47,20 +47,17 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& rSet) { get(mpUseSwInterpreter, "useswinterpreter"); get(mpUseOpenCL, "useopencl"); - get(clUsed,"openclused"); + get(mpOclUsed,"openclused"); + get(mpOclNotUsed,"openclnotused"); mpUseSwInterpreter->Check(officecfg::Office::Common::Misc::UseSwInterpreter::get()); mpUseOpenCL->Check(maConfig.mbUseOpenCL); mpUseOpenCL->SetClickHdl(LINK(this, SvxOpenCLTabPage, EnableOpenCLHdl)); - cl_device_id idTest=opencl::gpuEnv.mpDevID; - if(!idTest) - { - clUsed->SetText("Yes"); - }else{ - clUsed->SetText("No"); - } + bool bCLUsed = opencl::GPUEnv::isOpenCLEnabled(); + mpOclUsed->Show(bCLUsed); + mpOclNotUsed->Show(!bCLUsed); } SvxOpenCLTabPage::~SvxOpenCLTabPage() diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx index d6379682c310..ab628932632f 100644 --- a/cui/source/options/optopencl.hxx +++ b/cui/source/options/optopencl.hxx @@ -34,7 +34,8 @@ private: VclPtr<CheckBox> mpUseSwInterpreter; VclPtr<CheckBox> mpUseOpenCL; - VclPtr<FixedText> clUsed; + VclPtr<FixedText> mpOclUsed; + VclPtr<FixedText> mpOclNotUsed; DECL_STATIC_LINK_TYPED(SvxOpenCLTabPage, EnableOpenCLHdl, Button*, void); |