summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-06-05 04:40:21 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-06-05 04:41:16 +0200
commit756d7898166ebf40720d2f483ee17669e5841d63 (patch)
treec30939666540df5c9981c96ea643b41a6c881bc7
parentd82eaaec2e1cd4c2def22301b134ece27e93b283 (diff)
finally enable the blacklist parserprivate/moggi/opengl-preparation
Change-Id: I8346872a3e5bc7443524e5039f66eea0d3d381cd
-rw-r--r--vcl/opengl/win/WinDeviceInfo.cxx26
-rw-r--r--vcl/opengl/win/blocklist_parser.hxx1
2 files changed, 27 insertions, 0 deletions
diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index 047935885ee6..670d3c250f12 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -9,6 +9,8 @@
#include "opengl/win/WinDeviceInfo.hxx"
+#include "blocklist_parser.hxx"
+
#include <windows.h>
#include <setupapi.h>
#include <algorithm>
@@ -884,8 +886,32 @@ OUString WinOpenGLDeviceInfo::GetDeviceVendor(wgl::DeviceVendor id)
return *mpDeviceVendors[id];
}
+namespace {
+
+
+OUString getBlacklistFile()
+{
+ OUString url("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/user/config/opengl_blacklist_windows.xml");
+ rtl::Bootstrap::expandMacros(url);
+
+ return url;
+}
+
+
+}
+
void WinOpenGLDeviceInfo::FillBlacklist()
{
+ OUString aURL = getBlacklistFile();
+ WinBlocklistParser aParser(aURL, maDriverInfo);
+ try {
+ aParser.parse();
+ }
+ catch (...)
+ {
+ SAL_WARN("vcl.opengl.win", "error parsing blacklist");
+ maDriverInfo.clear();
+ }
}
diff --git a/vcl/opengl/win/blocklist_parser.hxx b/vcl/opengl/win/blocklist_parser.hxx
index c34af0ad3403..6f0142b84d8f 100644
--- a/vcl/opengl/win/blocklist_parser.hxx
+++ b/vcl/opengl/win/blocklist_parser.hxx
@@ -19,6 +19,7 @@ class InvalidFileException
class WinBlocklistParser
{
+public:
WinBlocklistParser(const OUString& rURL, std::vector<wgl::DriverInfo>& rDriverList);
void parse();