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

Tomaž Vajngerl tomaz.vajngerl at collabora.com
Fri Nov 20 14:10:00 PST 2015


 officecfg/registry/data/org/openoffice/Office/Common.xcu |    7 
 vcl/inc/opengl/win/WinDeviceInfo.hxx                     |    1 
 vcl/opengl/opengl_blacklist_windows.xml                  |  160 ++++++++++++++-
 vcl/opengl/win/WinDeviceInfo.cxx                         |   19 -
 vcl/opengl/win/blocklist_parser.cxx                      |  150 ++++++++------
 vcl/opengl/win/blocklist_parser.hxx                      |    4 
 6 files changed, 262 insertions(+), 79 deletions(-)

New commits:
commit 9639fc200b5c0779b1e60d04aa15f8f2e7868724
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Fri Nov 20 23:01:11 2015 +0100

    enable opengl by default for Windows
    
    Change-Id: I8683db0b038e89c1c9b4b723f31a205e80d9be6a

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 29f81ae..7cf3e97 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -123,6 +123,13 @@
       <value>${DICT_REPO_URL}</value>
     </prop>
   </node>
+  <node oor:name="VCL">
+    <prop oor:name="UseOpenGL" oor:type="xs:boolean">
+      <value install:module="macosx">false</value>
+      <value install:module="unx">false</value>
+      <value install:module="wnt">true</value>
+    </prop>
+  </node>
   <node oor:name="I18N">
     <node oor:name="CTL">
       <prop oor:name="CTLFont" install:module="ctl">
commit b1878ab683adeff6d151617fcd8f4a4530366e0e
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Fri Nov 20 22:55:38 2015 +0100

    opengl: populate blocklist
    
    Change-Id: I815d4cefb6185865d48bdcec294f52a61f53241a

diff --git a/vcl/opengl/opengl_blacklist_windows.xml b/vcl/opengl/opengl_blacklist_windows.xml
index 310bae0..c9b07df 100644
--- a/vcl/opengl/opengl_blacklist_windows.xml
+++ b/vcl/opengl/opengl_blacklist_windows.xml
@@ -6,14 +6,166 @@
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 -->
+
+<!--
+    entry attributes:
+    os - "all", "xp", "server2003", "vista", "7", "8", "8_1", "10"
+    vendor - "all", "intel", "ati", "amd", "nvidia", "microsoft"
+    compare - "less", "less_equal", "greater", "greater_equal", "equal", "not_equal", "between_exclusive", "between_inclusive", "between_inclusive_start"
+    version
+    minVersion
+    maxVersion
+-->
+
 <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>
     <blacklist>
+        <entry os="all" vendor="intel" compare="greater" version="15.40.4.64.4256"> <!-- 15.40.4.64.4256 -->
+            <device id="all"/>
+        </entry>
+        <entry os="all" vendor="ati" compare="less" version="15.200.1062.1004"> <!-- 150.200 -->
+            <device id="all"/>
+        </entry>
+        <entry os="all" vendor="amd" compare="less" version="15.200.1062.1004"> <!-- 150.200 -->
+            <device id="all"/>
+        </entry>
+        <entry os="all" vendor="nvidia" compare="less" version="10.18.13.5362"> <!-- 353.62 -->
+            <device id="all"/>
+        </entry>
+        <entry os="all" vendor="microsoft" compare="less" version="6.2.0.0"> <!-- 6.2.0.0 -->
+            <device id="all"/>
+        </entry>
 
+        <entry os="xp" vendor="all">
+            <device id="all"/>
+        </entry>
+        <entry os="server2003" vendor="all">
+            <device id="all"/>
+        </entry>
+        <entry os="vista" vendor="all">
+            <device id="all"/>
+        </entry>
+
+        <entry os="all" vendor="intel">
+            <!-- IntelGMA500 -->
+            <device id="0x8108"/>
+            <device id="0x8109"/>
+
+            <!-- IntelGMA900 -->
+            <device id="0x2582"/> <!-- IntelGMA900_1 -->
+            <device id="0x2782"/> <!-- IntelGMA900_2 -->
+            <device id="0x2592"/> <!-- IntelGMA900_3 -->
+            <device id="0x2792"/> <!-- IntelGMA900_4 -->
+
+            <!-- IntelGMA950 -->
+            <device id="0x2772"/> <!-- Intel945G_1 -->
+            <device id="0x2776"/> <!-- Intel945G_2 -->
+            <device id="0x27a2"/> <!-- Intel945_1 -->
+            <device id="0x27a6"/> <!-- Intel945_2 -->
+            <device id="0x27ae"/> <!-- Intel945_3 -->
+
+            <!-- IntelGMA3150 -->
+            <device id="0xa001"/> <!-- IntelGMA3150_Nettop_1 -->
+            <device id="0xa002"/> <!-- IntelGMA3150_Nettop_2 -->
+            <device id="0xa011"/> <!-- IntelGMA3150_Netbook_1 -->
+            <device id="0xa012"/> <!-- IntelGMA3150_Netbook_2 -->
+
+            <!-- IntelGMAX3000 -->
+            <device id="0x2972"/> <!-- Intel946GZ_1 -->
+            <device id="0x2973"/> <!-- Intel946GZ_2 -->
+            <device id="0x2982"/> <!-- IntelG35_1 -->
+            <device id="0x2983"/> <!-- IntelG35_2 -->
+            <device id="0x2992"/> <!-- IntelQ965_1 -->
+            <device id="0x2993"/> <!-- IntelQ965_2 -->
+            <device id="0x29a2"/> <!-- IntelG965_1 -->
+            <device id="0x29a3"/> <!-- IntelG965_2 -->
+            <device id="0x29b2"/> <!-- IntelQ35_1 -->
+            <device id="0x29b3"/> <!-- IntelQ35_2 -->
+            <device id="0x29c2"/> <!-- IntelG33_1 -->
+            <device id="0x29c3"/> <!-- IntelG33_2 -->
+            <device id="0x29d2"/> <!-- IntelQ33_1 -->
+            <device id="0x29d3"/> <!-- IntelQ33_2 -->
+            <device id="0x2a02"/> <!-- IntelGL960_1 -->
+            <device id="0x2a03"/> <!-- IntelGL960_2 -->
+            <device id="0x2a12"/> <!-- IntelGM965_1 -->
+            <device id="0x2a13"/> <!-- IntelGM965_2 -->
+
+            <!-- IntelGMAX4500HD -->
+            <device id="0x2a42"/> <!-- IntelGMA4500MHD_1 -->
+            <device id="0x2a43"/> <!-- IntelGMA4500MHD_2 -->
+            <device id="0x2e42"/> <!-- IntelB43_1 -->
+            <device id="0x2e43"/> <!-- IntelB43_2 -->
+            <device id="0x2e92"/> <!-- IntelB43_3 -->
+            <device id="0x2e93"/> <!-- IntelB43_4 -->
+            <device id="0x2e32"/> <!-- IntelG41_1 -->
+            <device id="0x2e33"/> <!-- IntelG41_2 -->
+            <device id="0x2e22"/> <!-- IntelG45_1 -->
+            <device id="0x2e23"/> <!-- IntelG45_2 -->
+            <device id="0x2e12"/> <!-- IntelQ45_1 -->
+            <device id="0x2e13"/> <!-- IntelQ45_2 -->
+            <device id="0x0042"/> <!-- IntelHDGraphics -->
+            <device id="0x0046"/> <!-- IntelMobileHDGraphics -->
+            <device id="0x0102"/> <!-- IntelSandyBridge_1 -->
+            <device id="0x0106"/> <!-- IntelSandyBridge_2 -->
+            <device id="0x0112"/> <!-- IntelSandyBridge_3 -->
+            <device id="0x0116"/> <!-- IntelSandyBridge_4 -->
+            <device id="0x0122"/> <!-- IntelSandyBridge_5 -->
+            <device id="0x0126"/> <!-- IntelSandyBridge_6 -->
+            <device id="0x010a"/> <!-- IntelSandyBridge_7 -->
+            <device id="0x0080"/> <!-- IntelIvyBridge -->
+
+            <!-- IntelHD3000 -->
+            <device id="0x0126"/>
+
+            <!-- IntelMobileHDGraphics -->
+            <device id="0x0046"/>
+        </entry>
+
+        <entry os="all" vendor="ati">
+            <!-- RadeonX1000 -->
+            <device id="0x7187"/>
+            <device id="0x7210"/>
+            <device id="0x71de"/>
+            <device id="0x7146"/>
+            <device id="0x7142"/>
+            <device id="0x7109"/>
+            <device id="0x71c5"/>
+            <device id="0x71c0"/>
+            <device id="0x7240"/>
+            <device id="0x7249"/>
+            <device id="0x7291"/>
+        </entry>
+
+        <entry os="all" vendor="nvidia">
+            <!-- Geforce7300GT -->
+            <device id="0x0393"/>
+
+            <!-- Nvidia310M -->
+            <device id="0x0A70"/>
+
+            <!-- NvidiaBlockD3D9Layers -->
+            // Glitches whilst scrolling (see bugs 612007, 644787, 645872)
+            <device id="0x00f3"/> <!-- NV43 [GeForce 6200 (TM)] -->
+            <device id="0x0146"/> <!-- NV43 [Geforce Go 6600TE/6200TE (TM)] -->
+            <device id="0x014f"/> <!-- NV43 [GeForce 6200 (TM)] -->
+            <device id="0x0161"/> <!-- NV44 [GeForce 6200 TurboCache (TM)] -->
+            <device id="0x0162"/> <!-- NV44 [GeForce 6200SE TurboCache (TM)] -->
+            <device id="0x0163"/> <!-- NV44 [GeForce 6200 LE (TM)] -->
+            <device id="0x0164"/> <!-- NV44 [GeForce Go 6200 (TM)] -->
+            <device id="0x0167"/> <!-- NV43 [GeForce Go 6200/6400 (TM)] -->
+            <device id="0x0168"/> <!-- NV43 [GeForce Go 6200/6400 (TM)] -->
+            <device id="0x0169"/> <!-- NV44 [GeForce 6250 (TM)] -->
+            <device id="0x0222"/> <!-- NV44 [GeForce 6200 A-LE (TM)] -->
+            <device id="0x0240"/> <!-- C51PV [GeForce 6150 (TM)] -->
+            <device id="0x0241"/> <!-- C51 [GeForce 6150 LE (TM)] -->
+            <device id="0x0244"/> <!-- C51 [Geforce Go 6150 (TM)] -->
+            <device id="0x0245"/> <!-- C51 [Quadro NVS 210S/GeForce 6150LE (TM)] -->
+            <device id="0x0247"/> <!-- C51 [GeForce Go 6100 (TM)] -->
+            <device id="0x03d0"/> <!-- C61 [GeForce 6150SE nForce 430 (TM)] -->
+            <device id="0x03d1"/> <!-- C61 [GeForce 6100 nForce 405 (TM)] -->
+            <device id="0x03d2"/> <!-- C61 [GeForce 6100 nForce 400 (TM)] -->
+            <device id="0x03d5"/> <!-- C61 [GeForce 6100 nForce 420 (TM)] -->
+        </entry>
     </blacklist>
 </root>
commit 04ed83d65c00dd9896b80877bd867af52edad375
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Fri Nov 20 22:52:21 2015 +0100

    opengl: fix blocklist parsing
    
    Devices weren't copied correctly - delete copy constructor as
    it is not needed.
    
    Split parsing to more methods so it is more readable.
    
    Parse vendor name (ati, intel, ...) and convert to vendorId
    
    Change-Id: I91ed7d8c5713dec160e217defb27f25cd3e8178c

diff --git a/vcl/inc/opengl/win/WinDeviceInfo.hxx b/vcl/inc/opengl/win/WinDeviceInfo.hxx
index bbcd0b7..9954983 100644
--- a/vcl/inc/opengl/win/WinDeviceInfo.hxx
+++ b/vcl/inc/opengl/win/WinDeviceInfo.hxx
@@ -67,7 +67,6 @@ struct DriverInfo
             uint64_t driverVersion, bool bWhiteListed = false, const char *suggestedVersion = nullptr);
 
     DriverInfo();
-    DriverInfo(const DriverInfo&);
     ~DriverInfo();
 
     OperatingSystem meOperatingSystem;
diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index c524398..80f92a0 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -413,17 +413,6 @@ DriverInfo::DriverInfo(OperatingSystem os, const OUString& vendor,
         maSuggestedVersion = OStringToOUString(OString(suggestedVersion), RTL_TEXTENCODING_UTF8);
 }
 
-DriverInfo::DriverInfo(const DriverInfo& aOrig)
-    : meOperatingSystem(aOrig.meOperatingSystem),
-    mnOperatingSystemVersion(aOrig.mnOperatingSystemVersion),
-    maAdapterVendor(aOrig.maAdapterVendor),
-    mbWhitelisted(aOrig.mbWhitelisted),
-    meComparisonOp(aOrig.meComparisonOp),
-    mnDriverVersion(aOrig.mnDriverVersion),
-    mnDriverVersionMax(aOrig.mnDriverVersionMax)
-{
-}
-
 DriverInfo::~DriverInfo()
 {
 }
@@ -490,12 +479,10 @@ bool WinOpenGLDeviceInfo::FindBlocklistedDeviceInList()
             continue;
         }
 
-        if (std::none_of(maDriverInfo[i].maDevices.begin(), maDriverInfo[i].maDevices.end(), [](const OUString& rString){ return rString == "all"; } ))
+        if (std::none_of(maDriverInfo[i].maDevices.begin(), maDriverInfo[i].maDevices.end(), compareIgnoreAsciiCase("all")) &&
+            std::none_of(maDriverInfo[i].maDevices.begin(), maDriverInfo[i].maDevices.end(), compareIgnoreAsciiCase(maAdapterDeviceID)))
         {
-            if (std::none_of(maDriverInfo[i].maDevices.begin(), maDriverInfo[i].maDevices.end(), compareIgnoreAsciiCase(maAdapterDeviceID)))
-            {
-                continue;
-            }
+            continue;
         }
 
         switch (maDriverInfo[i].meComparisonOp)
diff --git a/vcl/opengl/win/blocklist_parser.cxx b/vcl/opengl/win/blocklist_parser.cxx
index dc113b7..7a8d012 100644
--- a/vcl/opengl/win/blocklist_parser.cxx
+++ b/vcl/opengl/win/blocklist_parser.cxx
@@ -105,6 +105,36 @@ wgl::VersionComparisonOp getComparison(const OString& rString)
     throw InvalidFileException();
 }
 
+OUString getVendor(const OString& rString)
+{
+    if (rString == "all")
+    {
+        return "";
+    }
+    else if (rString == "intel")
+    {
+        return "0x8086";
+    }
+    else if (rString == "nvidia")
+    {
+        return "0x10de";
+    }
+    else if (rString == "amd")
+    {
+        return "0x1022";
+    }
+    else if (rString == "ati")
+    {
+        return "0x1002";
+    }
+    else if (rString == "microsoft")
+    {
+        return "0x1414";
+    }
+
+    throw InvalidFileException();
+}
+
 uint64_t getVersion(const OString& rString)
 {
     OUString aString = OStringToOUString(rString, RTL_TEXTENCODING_UTF8);
@@ -121,7 +151,66 @@ uint64_t getVersion(const OString& rString)
 
 }
 
-void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlReader& rReader)
+void WinBlocklistParser::handleDevices(wgl::DriverInfo& rDriver, xmlreader::XmlReader& rReader)
+{
+    int nLevel = 1;
+    bool bInMsg = false;
+
+    while(true)
+    {
+        xmlreader::Span name;
+        int nsId;
+
+        xmlreader::XmlReader::Result res = rReader.nextItem(
+                xmlreader::XmlReader::TEXT_NORMALIZED, &name, &nsId);
+
+        OString aId(name.begin, name.length);
+
+        if (res == xmlreader::XmlReader::RESULT_BEGIN)
+        {
+            ++nLevel;
+            if (nLevel > 2)
+                throw InvalidFileException();
+
+            if (name.equals("msg"))
+            {
+                bInMsg = true;
+            }
+            else if (name.equals("device"))
+            {
+                int nsIdDeveice;
+                while (rReader.nextAttribute(&nsIdDeveice, &name))
+                {
+                    if (name.equals("id"))
+                    {
+                        name = rReader.getAttributeValue(false);
+                        OString aDeviceId(name.begin, name.length);
+                        rDriver.maDevices.push_back(OStringToOUString(aDeviceId, RTL_TEXTENCODING_UTF8));
+                    }
+                }
+            }
+            else
+                throw InvalidFileException();
+        }
+        else if (res == xmlreader::XmlReader::RESULT_END)
+        {
+            --nLevel;
+            bInMsg = false;
+            if (!nLevel)
+                break;
+        }
+        else if (res == xmlreader::XmlReader::RESULT_TEXT)
+        {
+            if (bInMsg)
+            {
+                OString sMsg(name.begin, name.length);
+                rDriver.maMsg = OStringToOUString(sMsg, RTL_TEXTENCODING_UTF8);
+            }
+        }
+    }
+}
+
+void WinBlocklistParser::handleEntry(wgl::DriverInfo& rDriver, xmlreader::XmlReader& rReader)
 {
     if (meBlockType == BlockType::WHITELIST)
     {
@@ -151,10 +240,7 @@ void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlRe
         {
             name = rReader.getAttributeValue(false);
             OString sVendor(name.begin, name.length);
-
-            // TODO: moggi: check that only valid vendors are imported
-            OUString aVendor = OStringToOUString(sVendor, RTL_TEXTENCODING_UTF8);
-            rDriver.maAdapterVendor = aVendor;
+            rDriver.maAdapterVendor = getVendor(sVendor);
         }
         else if (name.equals("compare"))
         {
@@ -187,55 +273,7 @@ void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlRe
         }
     }
 
-    int nLevel = 1;
-    bool bInMsg = false;
-    while(true)
-    {
-        xmlreader::Span name;
-        int nsId;
-
-        xmlreader::XmlReader::Result res = rReader.nextItem(
-                xmlreader::XmlReader::TEXT_NORMALIZED, &name, &nsId);
-
-        if (res == xmlreader::XmlReader::RESULT_BEGIN)
-        {
-            ++nLevel;
-            if (nLevel > 2)
-                throw InvalidFileException();
-
-            if (name.equals("msg"))
-            {
-                bInMsg = true;
-            }
-            else if (name.equals("device"))
-            {
-                bool bSuccess = rReader.nextAttribute(&nsId, &name);
-                if (!bSuccess || !name.equals("id"))
-                    throw InvalidFileException();
-
-                name = rReader.getAttributeValue(false);
-                OString aDeviceId(name.begin, name.length);
-                rDriver.maDevices.push_back(OStringToOUString(aDeviceId, RTL_TEXTENCODING_UTF8));
-            }
-            else
-                throw InvalidFileException();
-        }
-        else if (res == xmlreader::XmlReader::RESULT_END)
-        {
-            --nLevel;
-            bInMsg = false;
-            if (!nLevel)
-                break;
-        }
-        else if (res == xmlreader::XmlReader::RESULT_TEXT)
-        {
-            if (bInMsg)
-            {
-                OString sMsg(name.begin, name.length);
-                rDriver.maMsg = OStringToOUString(sMsg, RTL_TEXTENCODING_UTF8);
-            }
-        }
-    }
+    handleDevices(rDriver, rReader);
 }
 
 void WinBlocklistParser::handleList(xmlreader::XmlReader& rReader)
@@ -253,13 +291,13 @@ void WinBlocklistParser::handleList(xmlreader::XmlReader& rReader)
             if (name.equals("entry"))
             {
                 wgl::DriverInfo aDriver;
-                handleDevice(aDriver, rReader);
+                handleEntry(aDriver, rReader);
                 mrDriverList.push_back(aDriver);
             }
             else if (name.equals("entryRange"))
             {
                 wgl::DriverInfo aDriver;
-                handleDevice(aDriver, rReader);
+                handleEntry(aDriver, rReader);
                 mrDriverList.push_back(aDriver);
             }
             else
diff --git a/vcl/opengl/win/blocklist_parser.hxx b/vcl/opengl/win/blocklist_parser.hxx
index 6f0142b..bc2e2a1 100644
--- a/vcl/opengl/win/blocklist_parser.hxx
+++ b/vcl/opengl/win/blocklist_parser.hxx
@@ -24,8 +24,8 @@ public:
     void parse();
 
 private:
-    void handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlReader& rReader);
-
+    void handleEntry(wgl::DriverInfo& rDriver, xmlreader::XmlReader& rReader);
+    void handleDevices(wgl::DriverInfo& rDriver, xmlreader::XmlReader& rReader);
     void handleList(xmlreader::XmlReader& rReader);
     void handleContent(xmlreader::XmlReader& rReader);
 


More information about the Libreoffice-commits mailing list