Backed out changeset faa8b3f0c677
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 28 Jan 2011 22:02:25 -0500
changeset 61572 2bd0a1ff78f3bf3b63192e377c08acca406ed599
parent 61568 faa8b3f0c677cadaf90c1e9dc17a613a9fb9d1d7
child 61573 4b0d8f4ec88d52b012cb983211d9c6c59ce7e155
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0b11pre
backs outfaa8b3f0c677cadaf90c1e9dc17a613a9fb9d1d7
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset faa8b3f0c677
widget/src/windows/GfxInfo.cpp
widget/src/xpwidgets/GfxDriverInfo.cpp
widget/src/xpwidgets/GfxDriverInfo.h
--- a/widget/src/windows/GfxInfo.cpp
+++ b/widget/src/windows/GfxInfo.cpp
@@ -62,21 +62,16 @@ using namespace mozilla::widget;
 NS_IMPL_ISUPPORTS_INHERITED1(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
 #endif
 
 static const PRUint32 allWindowsVersions = 0xffffffff;
 static const PRUint64 allDriverVersions = 0xffffffffffffffffULL;
 
 static const PRUint32 vendorIntel = 0x8086;
 
-static const PRUint32 vendorNVIDIA = 0x10de;
-
-static const PRUint32 vendorAMD = 0x1022;
-static const PRUint32 vendorATI = 0x1002;
-
 #define V(a,b,c,d) GFX_DRIVER_VERSION(a,b,c,d)
 
 
 GfxInfo::GfxInfo()
   : mAdapterVendorID(0),
     mAdapterDeviceID(0),
     mWindowsVersion(0)
 {
@@ -595,37 +590,16 @@ static const PRUint32 deviceFamilyIntelG
 };
 
 static const GfxDriverInfo gDriverInfo[] = {
   /*
    * Notice that the first match defines the result. So always implement special cases firsts and general case last.
    */
 
   /*
-   * NVIDIA entries
-   */
-  GfxDriverInfo( DRIVER_OS_ALL,
-    vendorNVIDIA, GfxDriverInfo::allDevices,
-    GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
-    DRIVER_LESS_THAN, V(8,17,12,5721), "257.21" ),
-
-  /*
-   * AMD/ATI entries
-   */
-  GfxDriverInfo( DRIVER_OS_ALL,
-    vendorATI, GfxDriverInfo::allDevices,
-    GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
-    DRIVER_LESS_THAN, V(8,741,0,0), "10.6" ),
-  GfxDriverInfo( DRIVER_OS_ALL,
-    vendorAMD, GfxDriverInfo::allDevices,
-    GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
-    DRIVER_LESS_THAN, V(8,741,0,0), "10.6" ),
-
-
-  /*
    * Intel entries
    */
 
   /*
    * Implement special Direct2D blocklist from bug 595364
    */
   GfxDriverInfo( DRIVER_OS_ALL,
     vendorIntel, (GfxDeviceFamily) deviceFamilyIntelBlockDirect2D,
@@ -722,16 +696,18 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
     return NS_ERROR_FAILURE;
   }
 
   PRUint64 driverVersion;
   if (!ParseDriverVersion(adapterDriverVersionString, &driverVersion)) {
     return NS_ERROR_FAILURE;
   }
   
+  PRUint64 suggestedDriverVersion = 0;
+
   if (aFeature == FEATURE_DIRECT3D_9_LAYERS &&
       mWindowsVersion < gfxWindowsPlatform::kWindowsXP)
   {
     *aStatus = FEATURE_BLOCKED_OS_VERSION;
     return NS_OK;
   }
 
   OperatingSystem os = WindowsVersionToOperatingSystem(mWindowsVersion);
@@ -782,16 +758,17 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
         }
     }
 
     bool match = false;
 
     switch (info->mComparisonOp) {
     case DRIVER_LESS_THAN:
       match = driverVersion < info->mDriverVersion;
+      suggestedDriverVersion = info->mDriverVersion;
       break;
     case DRIVER_LESS_THAN_OR_EQUAL:
       match = driverVersion <= info->mDriverVersion;
       break;
     case DRIVER_GREATER_THAN:
       match = driverVersion > info->mDriverVersion;
       break;
     case DRIVER_GREATER_THAN_OR_EQUAL:
@@ -826,28 +803,22 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
       }
     }
 
     info++;
   }
 
   *aStatus = status;
 
-  if (status == FEATURE_BLOCKED_DRIVER_VERSION) {
-      if (info->mSuggestedVersion) {
-          aSuggestedDriverVersion.AppendPrintf("%s", info->mSuggestedVersion);
-      } else if (info->mComparisonOp == DRIVER_LESS_THAN &&
-                 info->mDriverVersion != allDriverVersions)
-      {
-          aSuggestedDriverVersion.AppendPrintf("%lld.%lld.%lld.%lld",
-                                               (info->mDriverVersion & 0xffff000000000000) >> 48,
-                                               (info->mDriverVersion & 0x0000ffff00000000) >> 32,
-                                               (info->mDriverVersion & 0x00000000ffff0000) >> 16,
-                                               (info->mDriverVersion & 0x000000000000ffff));
-      }
+  if (status == FEATURE_BLOCKED_DRIVER_VERSION && suggestedDriverVersion) {
+      aSuggestedDriverVersion.AppendPrintf("%lld.%lld.%lld.%lld",
+                                           (suggestedDriverVersion & 0xffff000000000000) >> 48,
+                                           (suggestedDriverVersion & 0x0000ffff00000000) >> 32,
+                                           (suggestedDriverVersion & 0x00000000ffff0000) >> 16,
+                                           (suggestedDriverVersion & 0x000000000000ffff));
   }
   
   return NS_OK;
 }
 
 #ifdef DEBUG
 
 // Implement nsIGfxInfoDebug
--- a/widget/src/xpwidgets/GfxDriverInfo.cpp
+++ b/widget/src/xpwidgets/GfxDriverInfo.cpp
@@ -48,48 +48,44 @@ GfxDriverInfo::GfxDriverInfo()
   : mOperatingSystem(DRIVER_OS_UNKNOWN),
     mAdapterVendor(allAdapterVendors),
     mDevices(allDevices),
     mDeleteDevices(false),
     mFeature(allFeatures),
     mFeatureStatus(nsIGfxInfo::FEATURE_NO_INFO),
     mComparisonOp(DRIVER_UNKNOWN_COMPARISON),
     mDriverVersion(0),
-    mDriverVersionMax(0),
-    mSuggestedVersion(nsnull)
+    mDriverVersionMax(0)
 {}
 
 GfxDriverInfo::GfxDriverInfo(OperatingSystem os, PRUint32 vendor,
                              GfxDeviceFamily devices,
                              PRInt32 feature, PRInt32 featureStatus,
                              VersionComparisonOp op,
                              PRUint64 driverVersion,
-                             const char *suggestedVersion /* = nsnull */,
                              bool ownDevices /* = false */)
   : mOperatingSystem(os),
     mAdapterVendor(vendor),
     mDevices(devices),
     mDeleteDevices(ownDevices),
     mFeature(feature),
     mFeatureStatus(featureStatus),
     mComparisonOp(op),
     mDriverVersion(driverVersion),
-    mDriverVersionMax(0),
-    mSuggestedVersion(suggestedVersion)
+    mDriverVersionMax(0)
 {}
 
 GfxDriverInfo::GfxDriverInfo(const GfxDriverInfo& aOrig)
   : mOperatingSystem(aOrig.mOperatingSystem),
     mAdapterVendor(aOrig.mAdapterVendor),
     mFeature(aOrig.mFeature),
     mFeatureStatus(aOrig.mFeatureStatus),
     mComparisonOp(aOrig.mComparisonOp),
     mDriverVersion(aOrig.mDriverVersion),
-    mDriverVersionMax(aOrig.mDriverVersionMax),
-    mSuggestedVersion(aOrig.mSuggestedVersion)
+    mDriverVersionMax(aOrig.mDriverVersionMax)
 {
   // If we're managing the lifetime of the devices array, we have to make a
   // copy of the original's array.
   if (aOrig.mDeleteDevices) {
     PRUint32 count = 0;
     const PRUint32 *device = aOrig.mDevices;
     while (*device) {
       count++;
--- a/widget/src/xpwidgets/GfxDriverInfo.h
+++ b/widget/src/xpwidgets/GfxDriverInfo.h
@@ -74,18 +74,17 @@ enum VersionComparisonOp {
 typedef PRUint32 *GfxDeviceFamily;
 
 struct GfxDriverInfo
 {
   // If |ownDevices| is true, you are transferring ownership of the devices
   // array, and it will be deleted when this GfxDriverInfo is destroyed.
   GfxDriverInfo(OperatingSystem os, PRUint32 vendor, GfxDeviceFamily devices,
                 PRInt32 feature, PRInt32 featureStatus, VersionComparisonOp op,
-                PRUint64 driverVersion, const char *suggestedVersion = nsnull,
-                bool ownDevices = false);
+                PRUint64 driverVersion, bool ownDevices = false);
 
   GfxDriverInfo();
   GfxDriverInfo(const GfxDriverInfo&);
   ~GfxDriverInfo();
 
   OperatingSystem mOperatingSystem;
 
   PRUint32 mAdapterVendor;
@@ -105,18 +104,16 @@ struct GfxDriverInfo
   /* A feature status from nsIGfxInfo */
   PRInt32 mFeatureStatus;
 
   VersionComparisonOp mComparisonOp;
 
   /* versions are assumed to be A.B.C.D packed as 0xAAAABBBBCCCCDDDD */
   PRUint64 mDriverVersion;
   PRUint64 mDriverVersionMax;
-
-  const char *mSuggestedVersion;
 };
 
 #define GFX_DRIVER_VERSION(a,b,c,d) \
   ((PRUint64(a)<<48) | (PRUint64(b)<<32) | (PRUint64(c)<<16) | PRUint64(d))
 
 inline bool
 ParseDriverVersion(nsAString& aVersion, PRUint64 *aNumericVersion)
 {