diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-06-04 14:40:35 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-06-17 12:45:10 +0000 |
commit | 72dca3022d3a82b59cf41b410c82fecf63c3c156 (patch) | |
tree | e3a4aef04ac882026609eaa23bed10ea0a0e1aa2 /vcl | |
parent | aa62c86fbc7d192ad01de4bf771c6a9644853d5e (diff) |
support multiple devices in the blacklist
Change-Id: Ief0118d0845009bd8fd9cb1c7d51b76c09cc23b5
Reviewed-on: https://gerrit.libreoffice.org/16329
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/opengl/win/WinDeviceInfo.hxx | 1 | ||||
-rw-r--r-- | vcl/opengl/win/backlist.xml | 1 | ||||
-rw-r--r-- | vcl/opengl/win/blocklist_parser.cxx | 18 |
3 files changed, 15 insertions, 5 deletions
diff --git a/vcl/inc/opengl/win/WinDeviceInfo.hxx b/vcl/inc/opengl/win/WinDeviceInfo.hxx index 801329ae7073..37779a56e83c 100644 --- a/vcl/inc/opengl/win/WinDeviceInfo.hxx +++ b/vcl/inc/opengl/win/WinDeviceInfo.hxx @@ -98,6 +98,7 @@ struct DriverInfo static DeviceFamilyVector* const allDevices; DeviceFamilyVector* mpDevices; + std::vector<OUString> maDevices; // Whether the mDevices array should be deleted when this structure is // deallocated. False by default. diff --git a/vcl/opengl/win/backlist.xml b/vcl/opengl/win/backlist.xml index 31ca327cfbc5..6ff92d049e54 100644 --- a/vcl/opengl/win/backlist.xml +++ b/vcl/opengl/win/backlist.xml @@ -1,6 +1,7 @@ <root> <whitelist> <entry os="7" vendor="intel" compare="equal" version="10.18.10.3412"> + <device id="all"/> <msg>Moggi's Windows OpenGL driver</msg> </entry> </whitelist> diff --git a/vcl/opengl/win/blocklist_parser.cxx b/vcl/opengl/win/blocklist_parser.cxx index 4c0700a2fd74..83bf490f4d95 100644 --- a/vcl/opengl/win/blocklist_parser.cxx +++ b/vcl/opengl/win/blocklist_parser.cxx @@ -147,11 +147,6 @@ void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlRe OUString aVendor = OStringToOUString(sVendor, RTL_TEXTENCODING_UTF8); rDriver.maAdapterVendor = aVendor; } - else if (name.equals("device")) - { - name = rReader.getAttributeValue(false); - OString sDevice(name.begin, name.length); - } else if (name.equals("compare")) { name = rReader.getAttributeValue(false); @@ -176,6 +171,10 @@ void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlRe OString sMaxVersion(name.begin, name.length); rDriver.mnDriverVersionMax = getVersion(sMaxVersion); } + else + { + SAL_WARN("vcl.opengl.win", "unsupported attribute"); + } } int nLevel = 1; @@ -198,6 +197,15 @@ void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlRe { bInMsg = true; } + else if (name.equals("device")) + { + bool bSuccess = rReader.nextAttribute(&nsId, &name); + if (!bSuccess || !name.equals("id")) + throw InvalidFileException(); + + OString aDeviceId(name.begin, name.length); + rDriver.maDevices.push_back(OStringToOUString(aDeviceId, RTL_TEXTENCODING_UTF8)); + } else throw InvalidFileException(); } |