vcl/opengl/win/WinDeviceInfo.cxx    |   26 ++++++++++++++++++++++++++
 vcl/opengl/win/blocklist_parser.hxx |    1 +
 2 files changed, 27 insertions(+)

New commits:
commit 0f5b7dfea974c21b48843c3cbf7fdf344ad54a3a
Author: Markus Mohrhard <[email protected]>
Date:   Fri Jun 5 04:40:21 2015 +0200

    finally enable the blacklist parser
    
    Change-Id: I8346872a3e5bc7443524e5039f66eea0d3d381cd
    Reviewed-on: https://gerrit.libreoffice.org/16335
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Markus Mohrhard <[email protected]>

diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index 7d5398c..c202241 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>
@@ -886,8 +888,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 c34af0a..6f0142b 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();
 
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to