[Libreoffice-commits] core.git: vcl/inc vcl/opengl

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Jun 17 05:45:29 PDT 2015


 vcl/inc/opengl/win/WinDeviceInfo.hxx |    1 +
 vcl/opengl/win/backlist.xml          |    1 +
 vcl/opengl/win/blocklist_parser.cxx  |   18 +++++++++++++-----
 3 files changed, 15 insertions(+), 5 deletions(-)

New commits:
commit 72dca3022d3a82b59cf41b410c82fecf63c3c156
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jun 4 14:40:35 2015 +0200

    support multiple devices in the blacklist
    
    Change-Id: Ief0118d0845009bd8fd9cb1c7d51b76c09cc23b5
    Reviewed-on: https://gerrit.libreoffice.org/16329
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/vcl/inc/opengl/win/WinDeviceInfo.hxx b/vcl/inc/opengl/win/WinDeviceInfo.hxx
index 801329a..37779a5 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 31ca327..6ff92d0 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 4c0700a..83bf490 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();
         }


More information about the Libreoffice-commits mailing list