From 725493a9dffdcee6db3f3f9511bebd3a625dcd4e Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 5 Jul 2012 10:13:04 -0400 Subject: [PATCH] Bug 766251 - 5/5 - update Adreno WebGL blacklisting - r=jrmuizel --- content/canvas/src/WebGLContextValidate.cpp | 14 -------------- widget/android/GfxInfo.cpp | 12 ++++++++++++ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/content/canvas/src/WebGLContextValidate.cpp b/content/canvas/src/WebGLContextValidate.cpp index 6c9bee6fb294..598dba528812 100644 --- a/content/canvas/src/WebGLContextValidate.cpp +++ b/content/canvas/src/WebGLContextValidate.cpp @@ -607,20 +607,6 @@ WebGLContext::InitAndValidateGL() return false; } -#ifdef MOZ_JAVA_COMPOSITOR - // bug 736123, blacklist WebGL on Adreno - bool forceEnabled = Preferences::GetBool("webgl.force-enabled", false); - if (!forceEnabled) { - int renderer = gl->Renderer(); - if (renderer == gl::GLContext::RendererAdreno200 || - renderer == gl::GLContext::RendererAdreno205) - { - GenerateWarning("WebGL blocked on this Adreno driver!"); - return false; - } - } -#endif - mMinCapability = Preferences::GetBool("webgl.min_capability_mode", false); mDisableExtensions = Preferences::GetBool("webgl.disable-extensions", false); diff --git a/widget/android/GfxInfo.cpp b/widget/android/GfxInfo.cpp index 522a9368b4d3..2525b6ff373e 100644 --- a/widget/android/GfxInfo.cpp +++ b/widget/android/GfxInfo.cpp @@ -327,6 +327,18 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, return NS_OK; } + // Don't evaluate special cases when evaluating the downloaded blocklist. + if (aDriverInfo.IsEmpty()) { + if (aFeature == FEATURE_WEBGL_OPENGL) { + if (mRenderer.Find("Adreno 200") != -1 || + mRenderer.Find("Adreno 205") != -1) + { + *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + return NS_OK; + } + } + } + return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os); }