[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - vcl/opengl vcl/qa
Tor Lillqvist
tml at collabora.com
Fri Jun 3 08:14:50 UTC 2016
vcl/opengl/win/blocklist_parser.cxx | 8 ++++++--
vcl/qa/cppunit/blocklistparsertest.cxx | 7 ++++++-
vcl/qa/cppunit/test_blocklist_parse.xml | 6 ++++++
3 files changed, 18 insertions(+), 3 deletions(-)
New commits:
commit 27d381f6c0fdf3240950f5906ae78fa340ad9d6f
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Jun 2 15:21:39 2016 +0300
Accept also hex vendor id in opengl_blacklist_windows.xml
(And not just names from the hardcoded list.) Surely we want it to be
possible to add a blacklist entry for a hitherto unhandled vendor to
the file at a user site without having to modify the parsing code and
rebuilding LO.
(cherry picked from commit 44e89fa6151434be24dca38c32b8cb952455f372)
Change-Id: I01ca45cb91df06e1634a565b3e469fb85fe4e116
Reviewed-on: https://gerrit.libreoffice.org/25823
Tested-by: Jenkins <ci at libreoffice.org>
Tested-by: Tor Lillqvist <tml at collabora.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/vcl/opengl/win/blocklist_parser.cxx b/vcl/opengl/win/blocklist_parser.cxx
index 7c4a526..eb140a1 100644
--- a/vcl/opengl/win/blocklist_parser.cxx
+++ b/vcl/opengl/win/blocklist_parser.cxx
@@ -131,8 +131,12 @@ OUString getVendor(const OString& rString)
{
return "0x1414";
}
-
- throw InvalidFileException();
+ else
+ {
+ // Allow having simply the hex number as such there, too. After all, it's hex numbers that
+ // are output to opengl_device.log.
+ return OStringToOUString(rString, RTL_TEXTENCODING_UTF8);
+ }
}
uint64_t getVersion(const OString& rString)
diff --git a/vcl/qa/cppunit/blocklistparsertest.cxx b/vcl/qa/cppunit/blocklistparsertest.cxx
index 93817fd..ddad53b 100644
--- a/vcl/qa/cppunit/blocklistparsertest.cxx
+++ b/vcl/qa/cppunit/blocklistparsertest.cxx
@@ -40,7 +40,7 @@ void BlocklistParserTest::testParse()
aBlocklistParser.parse();
size_t const n = aDriveInfos.size();
- CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(20), n);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(22), n);
size_t i = 0;
@@ -81,6 +81,11 @@ void BlocklistParserTest::testParse()
aDriveInfo = aDriveInfos[i++];
CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
+ CPPUNIT_ASSERT_EQUAL(OUString("0xcafe"), aDriveInfo.maAdapterVendor);
+ CPPUNIT_ASSERT_EQUAL(wgl::VersionComparisonOp::DRIVER_NOT_EQUAL, aDriveInfo.meComparisonOp);
+
+ aDriveInfo = aDriveInfos[i++];
+ CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
CPPUNIT_ASSERT_EQUAL(WinOpenGLDeviceInfo::GetDeviceVendor(wgl::VendorAll), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(wgl::VersionComparisonOp::DRIVER_BETWEEN_EXCLUSIVE, aDriveInfo.meComparisonOp);
diff --git a/vcl/qa/cppunit/test_blocklist_parse.xml b/vcl/qa/cppunit/test_blocklist_parse.xml
index 6564668..72ba405 100755
--- a/vcl/qa/cppunit/test_blocklist_parse.xml
+++ b/vcl/qa/cppunit/test_blocklist_parse.xml
@@ -27,6 +27,9 @@
<entry os="8" vendor="microsoft" compare="not_equal" version="10.20.30.40">
<device id="all"/>
</entry>
+ <entry os="8" vendor="0xcafe" compare="not_equal" version="10.20.30.40">
+ <device id="all"/>
+ </entry>
<entry os="8_1" compare="between_exclusive" version="10.20.30.40">
<device id="all"/>
</entry>
@@ -59,6 +62,9 @@
<entry os="8" vendor="microsoft" compare="not_equal" version="10.20.30.40">
<device id="all"/>
</entry>
+ <entry os="8" vendor="0xcafe" compare="not_equal" version="10.20.30.40">
+ <device id="all"/>
+ </entry>
<entry os="8_1" compare="between_exclusive" version="10.20.30.40">
<device id="all"/>
</entry>
More information about the Libreoffice-commits
mailing list