back out 49b8bec6d175 / Bug 706739 to allow backing out 8c075fee9be4 / Bug 704710
authorBenoit Jacob <bjacob@mozilla.com>
Thu, 08 Mar 2012 18:02:26 -0500
changeset 85551 2fccf5e774a79d3783d726975c4946551f969057
parent 85550 544f5bc26164d05d42c708f05f716d278a94c569
child 85552 08e1dd305b6bf6fe5204af3ef0ea71f1e2c6264f
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
bugs706739, 704710
milestone11.0
backs out49b8bec6d175ac0256502d4e1aed40665c1fcaf3
back out 49b8bec6d175 / Bug 706739 to allow backing out 8c075fee9be4 / Bug 704710
widget/src/android/GfxInfo.cpp
widget/src/cocoa/GfxInfo.mm
widget/src/windows/GfxInfo.cpp
widget/src/xpwidgets/GfxInfoX11.cpp
--- a/widget/src/android/GfxInfo.cpp
+++ b/widget/src/android/GfxInfo.cpp
@@ -296,41 +296,41 @@ GfxInfo::GetGfxDriverInfo()
 
 nsresult
 GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, 
                               PRInt32 *aStatus, 
                               nsAString & aSuggestedDriverVersion,
                               const nsTArray<GfxDriverInfo>& aDriverInfo, 
                               OperatingSystem* aOS /* = nsnull */)
 {
-  NS_ENSURE_ARG_POINTER(aStatus);
+  PRInt32 status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
+
   aSuggestedDriverVersion.SetIsVoid(true);
-  *aStatus = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
+
   OperatingSystem os = DRIVER_OS_ANDROID;
+
+  if (aFeature == FEATURE_OPENGL_LAYERS) {
+    if (!mSetCrashReportAnnotations) {
+      AddOpenGLCrashReportAnnotations();
+      mSetCrashReportAnnotations = true;
+    }
+
+    /* The following code is an old way to whitelist devices when we're ready.
+     * It is staying here for reference. The best way to do this now is to add
+     * an entry in the list above. There is a dummy entry which will whitelist a
+     * device when uncommented and device/vendor IDs are inserted. It is
+     * preferred that we stop whitelisting and instead go to blocklisting, where
+     * everything is assumed to be okay as long as it's not in the blocklist. */
+    // nsAutoString str;
+    // /* Whitelist Galaxy S phones */
+    // if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", str)) {
+    //   if (str != NS_LITERAL_STRING("smdkc110")) {
+    //     status = FEATURE_BLOCKED_DEVICE;
+    //   }
+    // }
+  }
+
+  *aStatus = status;
   if (aOS)
     *aOS = os;
 
-  // Don't evaluate special cases when evaluating the downlaoded blocklist.
-  if (!aDriverInfo.Length()) {
-    if (aFeature == FEATURE_OPENGL_LAYERS) {
-      if (!mSetCrashReportAnnotations) {
-        AddOpenGLCrashReportAnnotations();
-        mSetCrashReportAnnotations = true;
-      }
-
-      /* The following code is an old way to whitelist devices when we're ready.
-       * It is staying here for reference. The best way to do this now is to add
-       * an entry in the list above. There is a dummy entry which will whitelist a
-       * device when uncommented and device/vendor IDs are inserted. It is
-       * preferred that we stop whitelisting and instead go to blocklisting, where
-       * everything is assumed to be okay as long as it's not in the blocklist. */
-      // nsAutoString str;
-      // /* Whitelist Galaxy S phones */
-      // if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", str)) {
-      //   if (str != NS_LITERAL_STRING("smdkc110")) {
-      //     status = FEATURE_BLOCKED_DEVICE;
-      //   }
-      // }
-    }
-  }
-
   return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os);
 }
--- a/widget/src/cocoa/GfxInfo.mm
+++ b/widget/src/cocoa/GfxInfo.mm
@@ -382,77 +382,79 @@ OSXVersionToOperatingSystem(PRUint32 aOS
 nsresult
 GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, 
                               PRInt32* aStatus,
                               nsAString& aSuggestedDriverVersion,
                               const nsTArray<GfxDriverInfo>& aDriverInfo,
                               OperatingSystem* aOS /* = nsnull */)
 {
   NS_ENSURE_ARG_POINTER(aStatus);
+
   aSuggestedDriverVersion.SetIsVoid(true);
-  *aStatus = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
+
+  PRInt32 status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
+
   OperatingSystem os = OSXVersionToOperatingSystem(nsToolkit::OSXVersion());
-  if (aOS)
-    *aOS = os;
 
-  // Don't evaluate special cases when we're evaluating the downloaded blocklist.
-  if (!aDriverInfo.Length()) {
-    // Many WebGL issues on 10.5, especially:
-    //   * bug 631258: WebGL shader paints using textures belonging to other processes on Mac OS 10.5
-    //   * bug 618848: Post process shaders and texture mapping crash OS X 10.5
-    if (aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL &&
-        !nsToolkit::OnSnowLeopardOrLater()) {
-      *aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
-      return NS_OK;
-    }
+  // Many WebGL issues on 10.5, especially:
+  //   * bug 631258: WebGL shader paints using textures belonging to other processes on Mac OS 10.5
+  //   * bug 618848: Post process shaders and texture mapping crash OS X 10.5
+  if (aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL &&
+      !nsToolkit::OnSnowLeopardOrLater())
+  {
+    status = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
+  }
 
-    // The code around the following has been moved into the global blocklist.
+  // The code around the following has been moved into the global blocklist.
 #if 0
-      // CGL reports a list of renderers, some renderers are slow (e.g. software)
-      // and AFAIK we can't decide which one will be used among them, so let's implement this by returning NO_INFO
-      // if any not-known-to-be-bad renderer is found.
-      // The assumption that we make here is that the system will spontaneously use the best/fastest renderer in the list.
-      // Note that the presence of software renderer fallbacks means that slow software rendering may be automatically
-      // used, which seems to be the case in bug 611292 where the user had a Intel GMA 945 card (non programmable hardware).
-      // Therefore we need to explicitly blacklist non-OpenGL2 hardware, which could result in a software renderer
-      // being used.
+    // CGL reports a list of renderers, some renderers are slow (e.g. software)
+    // and AFAIK we can't decide which one will be used among them, so let's implement this by returning NO_INFO
+    // if any not-known-to-be-bad renderer is found.
+    // The assumption that we make here is that the system will spontaneously use the best/fastest renderer in the list.
+    // Note that the presence of software renderer fallbacks means that slow software rendering may be automatically
+    // used, which seems to be the case in bug 611292 where the user had a Intel GMA 945 card (non programmable hardware).
+    // Therefore we need to explicitly blacklist non-OpenGL2 hardware, which could result in a software renderer
+    // being used.
 
-      for (PRUint32 i = 0; i < ArrayLength(mRendererIDs); ++i) {
-        switch (mRendererIDs[i]) {
-          case kCGLRendererATIRage128ID: // non-programmable
-          case kCGLRendererATIRadeonID: // non-programmable
-          case kCGLRendererATIRageProID: // non-programmable
-          case kCGLRendererATIRadeon8500ID: // no OpenGL 2 support, http://en.wikipedia.org/wiki/Radeon_R200
-          case kCGLRendererATIRadeon9700ID: // no OpenGL 2 support, http://en.wikipedia.org/wiki/Radeon_R200
-          case kCGLRendererATIRadeonX1000ID: // can't render to non-power-of-two texture backed framebuffers
-          case kCGLRendererIntel900ID: // non-programmable
-          case kCGLRendererGeForce2MXID: // non-programmable
-          case kCGLRendererGeForce3ID: // no OpenGL 2 support,
-                                       // http://en.wikipedia.org/wiki/Comparison_of_Nvidia_graphics_processing_units
-          case kCGLRendererGeForceFXID: // incomplete OpenGL 2 support with software fallbacks,
-                                        // http://en.wikipedia.org/wiki/Comparison_of_Nvidia_graphics_processing_units
-          case kCGLRendererVTBladeXP2ID: // Trident DX8 chip, assuming it's not GL2 capable
-          case kCGLRendererMesa3DFXID: // non-programmable
-          case kCGLRendererGenericFloatID: // software renderer
-          case kCGLRendererGenericID: // software renderer
-          case kCGLRendererAppleSWID: // software renderer
-            break;
-          default:
-            if (mRendererIDs[i])
-              foundGoodDevice = true;
-        }
+    for (PRUint32 i = 0; i < ArrayLength(mRendererIDs); ++i) {
+      switch (mRendererIDs[i]) {
+        case kCGLRendererATIRage128ID: // non-programmable
+        case kCGLRendererATIRadeonID: // non-programmable
+        case kCGLRendererATIRageProID: // non-programmable
+        case kCGLRendererATIRadeon8500ID: // no OpenGL 2 support, http://en.wikipedia.org/wiki/Radeon_R200
+        case kCGLRendererATIRadeon9700ID: // no OpenGL 2 support, http://en.wikipedia.org/wiki/Radeon_R200
+        case kCGLRendererATIRadeonX1000ID: // can't render to non-power-of-two texture backed framebuffers
+        case kCGLRendererIntel900ID: // non-programmable
+        case kCGLRendererGeForce2MXID: // non-programmable
+        case kCGLRendererGeForce3ID: // no OpenGL 2 support,
+                                     // http://en.wikipedia.org/wiki/Comparison_of_Nvidia_graphics_processing_units
+        case kCGLRendererGeForceFXID: // incomplete OpenGL 2 support with software fallbacks,
+                                      // http://en.wikipedia.org/wiki/Comparison_of_Nvidia_graphics_processing_units
+        case kCGLRendererVTBladeXP2ID: // Trident DX8 chip, assuming it's not GL2 capable
+        case kCGLRendererMesa3DFXID: // non-programmable
+        case kCGLRendererGenericFloatID: // software renderer
+        case kCGLRendererGenericID: // software renderer
+        case kCGLRendererAppleSWID: // software renderer
+          break;
+        default:
+          if (mRendererIDs[i])
+            foundGoodDevice = true;
       }
+    }
 #endif
 
-    if (aFeature == nsIGfxInfo::FEATURE_WEBGL_MSAA) {
-      // Blacklist all ATI cards on OSX, except for
-      // 0x6760 and 0x9488
-      if (mAdapterVendorID == GfxDriverInfo::GetDeviceVendor(VendorATI) && 
-          (mAdapterDeviceID.LowerCaseEqualsLiteral("0x6760") ||
-           mAdapterDeviceID.LowerCaseEqualsLiteral("0x9488"))) {
-        *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
-        return NS_OK;
-      }
+  if (aFeature == nsIGfxInfo::FEATURE_WEBGL_MSAA) {
+    // Blacklist all ATI cards on OSX, except for
+    // 0x6760 and 0x9488
+    if (mAdapterVendorID == GfxDriverInfo::GetDeviceVendor(VendorATI) && 
+        (mAdapterDeviceID.LowerCaseEqualsLiteral("0x6760") ||
+         mAdapterDeviceID.LowerCaseEqualsLiteral("0x9488"))) {
+      *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
+      return NS_OK;
     }
   }
 
+  if (aOS)
+    *aOS = os;
+  *aStatus = status;
+
   return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os);
 }
--- a/widget/src/windows/GfxInfo.cpp
+++ b/widget/src/windows/GfxInfo.cpp
@@ -939,99 +939,99 @@ GfxInfo::GetGfxDriverInfo()
 
 nsresult
 GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature,
                               PRInt32 *aStatus, 
                               nsAString & aSuggestedDriverVersion, 
                               const nsTArray<GfxDriverInfo>& aDriverInfo,
                               OperatingSystem* aOS /* = nsnull */)
 {
-  NS_ENSURE_ARG_POINTER(aStatus);
   aSuggestedDriverVersion.SetIsVoid(true);
-  OperatingSystem os = WindowsVersionToOperatingSystem(mWindowsVersion);
-  *aStatus = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
-  if (aOS)
-    *aOS = os;
+
+  PRInt32 status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
+
+  nsAutoString adapterVendorID;
+  nsAutoString adapterDeviceID;
+  nsAutoString adapterDriverVersionString;
+  if (NS_FAILED(GetAdapterVendorID(adapterVendorID)) ||
+      NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) ||
+      NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString)))
+  {
+    return NS_ERROR_FAILURE;
+  }
+
+  if (adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorIntel) &&
+      adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorNVIDIA) &&
+      adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorAMD) &&
+      adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorATI) &&
+      // FIXME - these special hex values are currently used in xpcshell tests introduced by
+      // bug 625160 patch 8/8. Maybe these tests need to be adjusted now that we're only whitelisting
+      // intel/ati/nvidia.
+      !adapterVendorID.LowerCaseEqualsLiteral("0xabcd") &&
+      !adapterVendorID.LowerCaseEqualsLiteral("0xdcba") &&
+      !adapterVendorID.LowerCaseEqualsLiteral("0xabab") &&
+      !adapterVendorID.LowerCaseEqualsLiteral("0xdcdc"))
+  {
+    *aStatus = FEATURE_BLOCKED_DEVICE;
+    return NS_OK;
+  }
+
+  PRUint64 driverVersion;
+  if (!ParseDriverVersion(adapterDriverVersionString, &driverVersion)) {
+    return NS_ERROR_FAILURE;
+  }
 
-  // Don't evaluate special cases if we're checking the downloaded blocklist.
-  if (!aDriverInfo.Length()) {
-    nsAutoString adapterVendorID;
-    nsAutoString adapterDeviceID;
-    nsAutoString adapterDriverVersionString;
-    if (NS_FAILED(GetAdapterVendorID(adapterVendorID)) ||
-        NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) ||
-        NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString)))
+  // special-case the WinXP test slaves: they have out-of-date drivers, but we still want to
+  // whitelist them, actually we do know that this combination of device and driver version
+  // works well.
+  if (mWindowsVersion == gfxWindowsPlatform::kWindowsXP &&
+      adapterVendorID == GfxDriverInfo::GetDeviceVendor(VendorNVIDIA) &&
+      adapterDeviceID.LowerCaseEqualsLiteral("0x0861") && // GeForce 9400
+      driverVersion == V(6,14,11,7756))
+  {
+    *aStatus = FEATURE_NO_INFO;
+    return NS_OK;
+  }
+
+  if (aFeature == FEATURE_DIRECT3D_9_LAYERS &&
+      mWindowsVersion < gfxWindowsPlatform::kWindowsXP)
+  {
+    *aStatus = FEATURE_BLOCKED_OS_VERSION;
+    return NS_OK;
+  }
+
+  // ANGLE currently uses D3D10 <-> D3D9 interop, which crashes on Optimus
+  // machines.
+  if (aFeature == FEATURE_WEBGL_ANGLE &&
+      gfxWindowsPlatform::IsOptimus())
+  {
+    *aStatus = FEATURE_BLOCKED_DEVICE;
+    return NS_OK;
+  }
+
+  OperatingSystem os = WindowsVersionToOperatingSystem(mWindowsVersion);
+
+  // Windows Server 2003 should be just like Windows XP for present purpose, but still has a different version number.
+  // OTOH Windows Server 2008 R1 and R2 already have the same version numbers as Vista and Seven respectively
+  if (os == DRIVER_OS_WINDOWS_SERVER_2003)
+    os = DRIVER_OS_WINDOWS_XP;
+
+  if (mHasDriverVersionMismatch) {
+    if (aFeature == nsIGfxInfo::FEATURE_DIRECT3D_10_LAYERS ||
+        aFeature == nsIGfxInfo::FEATURE_DIRECT3D_10_1_LAYERS ||
+        aFeature == nsIGfxInfo::FEATURE_DIRECT2D)
     {
-      return NS_ERROR_FAILURE;
-    }
-
-    if (adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorIntel) &&
-        adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorNVIDIA) &&
-        adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorAMD) &&
-        adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorATI) &&
-        // FIXME - these special hex values are currently used in xpcshell tests introduced by
-        // bug 625160 patch 8/8. Maybe these tests need to be adjusted now that we're only whitelisting
-        // intel/ati/nvidia.
-        !adapterVendorID.LowerCaseEqualsLiteral("0xabcd") &&
-        !adapterVendorID.LowerCaseEqualsLiteral("0xdcba") &&
-        !adapterVendorID.LowerCaseEqualsLiteral("0xabab") &&
-        !adapterVendorID.LowerCaseEqualsLiteral("0xdcdc"))
-    {
-      *aStatus = FEATURE_BLOCKED_DEVICE;
+      *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
       return NS_OK;
     }
-
-    PRUint64 driverVersion;
-    if (!ParseDriverVersion(adapterDriverVersionString, &driverVersion)) {
-      return NS_ERROR_FAILURE;
-    }
-
-    // special-case the WinXP test slaves: they have out-of-date drivers, but we still want to
-    // whitelist them, actually we do know that this combination of device and driver version
-    // works well.
-    if (mWindowsVersion == gfxWindowsPlatform::kWindowsXP &&
-        adapterVendorID == GfxDriverInfo::GetDeviceVendor(VendorNVIDIA) &&
-        adapterDeviceID.LowerCaseEqualsLiteral("0x0861") && // GeForce 9400
-        driverVersion == V(6,14,11,7756))
-    {
-      *aStatus = FEATURE_NO_INFO;
-      return NS_OK;
-    }
-
-    if (aFeature == FEATURE_DIRECT3D_9_LAYERS &&
-        mWindowsVersion < gfxWindowsPlatform::kWindowsXP)
-    {
-      *aStatus = FEATURE_BLOCKED_OS_VERSION;
-      return NS_OK;
-    }
+  }
 
-    // ANGLE currently uses D3D10 <-> D3D9 interop, which crashes on Optimus
-    // machines.
-    if (aFeature == FEATURE_WEBGL_ANGLE &&
-        gfxWindowsPlatform::IsOptimus())
-    {
-      *aStatus = FEATURE_BLOCKED_DEVICE;
-      return NS_OK;
-    }
-
-    // Windows Server 2003 should be just like Windows XP for present purpose, but still has a different version number.
-    // OTOH Windows Server 2008 R1 and R2 already have the same version numbers as Vista and Seven respectively
-    if (os == DRIVER_OS_WINDOWS_SERVER_2003)
-      os = DRIVER_OS_WINDOWS_XP;
-
-    if (mHasDriverVersionMismatch) {
-      if (aFeature == nsIGfxInfo::FEATURE_DIRECT3D_10_LAYERS ||
-          aFeature == nsIGfxInfo::FEATURE_DIRECT3D_10_1_LAYERS ||
-          aFeature == nsIGfxInfo::FEATURE_DIRECT2D)
-      {
-        *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
-        return NS_OK;
-      }
-    }
-  }
+  *aStatus = status;
+  if (aOS)
+    *aOS = os;
 
   return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os);
 }
 
 #ifdef DEBUG
 
 // Implement nsIGfxInfoDebug
 
--- a/widget/src/xpwidgets/GfxInfoX11.cpp
+++ b/widget/src/xpwidgets/GfxInfoX11.cpp
@@ -259,75 +259,72 @@ GfxInfo::GetGfxDriverInfo()
 nsresult
 GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, 
                               PRInt32 *aStatus, 
                               nsAString & aSuggestedDriverVersion, 
                               const nsTArray<GfxDriverInfo>& aDriverInfo, 
                               OperatingSystem* aOS /* = nsnull */)
 
 {
-  NS_ENSURE_ARG_POINTER(aStatus);
-  *aStatus = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
-  aSuggestedDriverVersion.SetIsVoid(true);
-  OperatingSystem os = DRIVER_OS_LINUX;
-  if (aOS)
-    *aOS = os;
+    GetData();
+    *aStatus = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
+    aSuggestedDriverVersion.SetIsVoid(true);
 
 #ifdef MOZ_PLATFORM_MAEMO
-  *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
-  // on Maemo, the glxtest probe doesn't build, and we don't really need GfxInfo anyway
-  return NS_OK;
+    *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
+    // on Maemo, the glxtest probe doesn't build, and we don't really need GfxInfo anyway
+    return NS_OK;
 #endif
 
-  // Don't evaluate any special cases if we're checking the downloaded blocklist.
-  if (!aDriverInfo.Length()) {
-    GetData();
+    OperatingSystem os = DRIVER_OS_LINUX;
 
     // Disable OpenGL layers when we don't have texture_from_pixmap because it regresses performance. 
     if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS && !mHasTextureFromPixmap) {
-      *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
-      aSuggestedDriverVersion.AssignLiteral("<Anything with EXT_texture_from_pixmap support>");
-      return NS_OK;
+        *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
+        aSuggestedDriverVersion.AssignLiteral("<Anything with EXT_texture_from_pixmap support>");
+        return NS_OK;
     }
 
     // whitelist the linux test slaves' current configuration.
     // this is necessary as they're still using the slightly outdated 190.42 driver.
     // this isn't a huge risk, as at least this is the exact setting in which we do continuous testing,
     // and this only affects GeForce 9400 cards on linux on this precise driver version, which is very few users.
     // We do the same thing on Windows XP, see in widget/src/windows/GfxInfo.cpp
     if (mIsNVIDIA &&
         !strcmp(mRenderer.get(), "GeForce 9400/PCI/SSE2") &&
         !strcmp(mVersion.get(), "3.2.0 NVIDIA 190.42"))
     {
-      *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
-      return NS_OK;
+        *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
+        return NS_OK;
     }
 
     if (mIsMesa) {
-      if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(7,10,3)) {
-        *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
-        aSuggestedDriverVersion.AssignLiteral("Mesa 7.10.3");
-      }
+        if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(7,10,3)) {
+            *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
+            aSuggestedDriverVersion.AssignLiteral("Mesa 7.10.3");
+        }
     } else if (mIsNVIDIA) {
-      if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(257,21)) {
-        *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
-        aSuggestedDriverVersion.AssignLiteral("NVIDIA 257.21");
-      }
+        if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(257,21)) {
+            *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
+            aSuggestedDriverVersion.AssignLiteral("NVIDIA 257.21");
+        }
     } else if (mIsFGLRX) {
-      // FGLRX does not report a driver version number, so we have the OpenGL version instead.
-      // by requiring OpenGL 3, we effectively require recent drivers.
-      if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(3, 0)) {
-        *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
-      }
+        // FGLRX does not report a driver version number, so we have the OpenGL version instead.
+        // by requiring OpenGL 3, we effectively require recent drivers.
+        if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(3, 0)) {
+            *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
+        }
     } else {
-      // like on windows, let's block unknown vendors. Think of virtual machines.
-      // Also, this case is hit whenever the GLXtest probe failed to get driver info or crashed.
-      *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
+        // like on windows, let's block unknown vendors. Think of virtual machines.
+        // Also, this case is hit whenever the GLXtest probe failed to get driver info or crashed.
+        *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
     }
-  }
+
+  if (aOS)
+    *aOS = os;
 
   return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os);
 }
 
 
 NS_IMETHODIMP
 GfxInfo::GetD2DEnabled(bool *aEnabled)
 {