Bug 585832 - Graphics feature tests are too strict - r+a=joe
authorBenoit Jacob <bjacob@mozilla.com>
Mon, 20 Sep 2010 13:20:45 -0400
changeset 54360 901fd772c4da647b68670b28aed1510c1bc76dc2
parent 54359 f9728160d6e41da28e4312748bf7d146bb38edb0
child 54361 08b85c0937234b028e8d3a4888851a0ea0f13dec
push id15866
push userbjacob@mozilla.com
push dateMon, 20 Sep 2010 17:26:44 +0000
treeherdermozilla-central@901fd772c4da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs585832
milestone2.0b7pre
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
Bug 585832 - Graphics feature tests are too strict - r+a=joe
content/canvas/src/WebGLContext.cpp
--- a/content/canvas/src/WebGLContext.cpp
+++ b/content/canvas/src/WebGLContext.cpp
@@ -313,33 +313,33 @@ WebGLContext::SetDimensions(PRInt32 widt
     PRBool forceOSMesa = PR_FALSE;
     prefService->GetBoolPref("webgl.force_osmesa", &forceOSMesa);
 
     if (!forceOSMesa) {
 
     PRBool useOpenGL = PR_TRUE;
     PRBool useANGLE = PR_TRUE;
 
-    nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
-    if (gfxInfo) {
-        PRInt32 status;
-        if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBGL_OPENGL, &status))) {
-            if (status != nsIGfxInfo::FEATURE_STATUS_UNKNOWN &&
-                status != nsIGfxInfo::FEATURE_AVAILABLE)
-            {
-                useOpenGL = PR_FALSE;
-            }
-        }
-        if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBGL_ANGLE, &status))) {
-            if (status != nsIGfxInfo::FEATURE_STATUS_UNKNOWN &&
-                status != nsIGfxInfo::FEATURE_AVAILABLE)
-            {
-                useANGLE = PR_FALSE;
-            }
-        }
+    nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
+    if (gfxInfo) {
+        PRInt32 status;
+        if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBGL_OPENGL, &status))) {
+            if (status == nsIGfxInfo::FEATURE_BLOCKED ||
+                status == nsIGfxInfo::FEATURE_NOT_AVAILABLE)
+            {
+                useOpenGL = PR_FALSE;
+            }
+        }
+        if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBGL_ANGLE, &status))) {
+            if (status == nsIGfxInfo::FEATURE_BLOCKED ||
+                status == nsIGfxInfo::FEATURE_NOT_AVAILABLE)
+            {
+                useANGLE = PR_FALSE;
+            }
+        }
     }
 
     #ifdef XP_WIN
         // On Windows, we may have a choice of backends, including straight
         // OpenGL, D3D through ANGLE via EGL, or straight EGL/GLES2.
         // We don't differentiate the latter two yet, but we allow for
         // a env var to try EGL first, instead of last.
         bool preferEGL = PR_GetEnv("MOZ_WEBGL_PREFER_EGL") != nsnull;