Bug 678053 - blacklist geforce <= 7 for WebGL on Mac - r=jrmuizel
authorBenoit Jacob <bjacob@mozilla.com>
Thu, 11 Aug 2011 18:17:50 -0400
changeset 74255 cffe69e9357ef154a41e7452bbf71feee7a3e49c
parent 74254 ffb2a6be641a6adf0b462666925d65ff84420433
child 74256 16a79c640966f43de4eb5ebdae43b0c45ce2510f
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersjrmuizel
bugs678053
milestone8.0a1
Bug 678053 - blacklist geforce <= 7 for WebGL on Mac - r=jrmuizel
widget/src/cocoa/GfxInfo.mm
--- a/widget/src/cocoa/GfxInfo.mm
+++ b/widget/src/cocoa/GfxInfo.mm
@@ -260,11 +260,31 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
         default:
           if (mRendererIDs[i])
             foundGoodDevice = PR_TRUE;
       }
     }
     if (!foundGoodDevice)
       status = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
   }
+
+  if (aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL) {
+    // same comment as above for FEATURE_OPENGL_LAYERS.
+    bool foundGoodDevice = false;
+
+    for (PRUint32 i = 0; i < NS_ARRAY_LENGTH(mRendererIDs); ++i) {
+      switch (mRendererIDs[i]) {
+        case kCGLRendererGeForceFXID: // bug 678053. We must blacklist Geforce 7300 GT. This family
+                                      // covers all Geforce FX, 6, 7 series. Need bug 678330 for finer
+                                      // blacklisting.
+          break;
+        default:
+          if (mRendererIDs[i])
+            foundGoodDevice = true;
+      }
+    }
+    if (!foundGoodDevice)
+      status = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
+  }
+
   *aStatus = status;
   return NS_OK;
 }