Backout 779a5cfb5395 for burning

This commit is contained in:
Jeff Gilbert 2013-05-28 16:41:10 -07:00
parent d4bd2253ba
commit bce7314c4b

View File

@ -949,15 +949,10 @@ bool WebGLContext::IsExtensionSupported(JSContext *cx, WebGLExtensionID ext) con
switch (ext) {
case OES_element_index_uint:
if (!gl->IsGLES2())
return true;
return gl->IsExtensionSupported(GLContext::OES_element_index_uint);
return !gl->IsGLES2() || gl->IsExtensionSupported(GLContext::OES_element_index_uint);
case OES_standard_derivatives:
if (!gl->IsGLES2())
return true;
return gl->IsExtensionSupported(GLContext::OES_standard_derivatives);
case WEBGL_lose_context:
// We always support this extension.
// We always support these extensions.
return true;
case OES_texture_float:
return gl->IsExtensionSupported(gl->IsGLES2() ? GLContext::OES_texture_float
@ -969,12 +964,15 @@ bool WebGLContext::IsExtensionSupported(JSContext *cx, WebGLExtensionID ext) con
return true;
}
else if (gl->IsExtensionSupported(GLContext::EXT_texture_compression_dxt1) &&
gl->IsExtensionSupported(GLContext::ANGLE_texture_compression_dxt3) &&
gl->IsExtensionSupported(GLContext::ANGLE_texture_compression_dxt5))
gl->IsExtensionSupported(GLContext::ANGLE_texture_compression_dxt3) &&
gl->IsExtensionSupported(GLContext::ANGLE_texture_compression_dxt5))
{
return true;
}
return false;
else
{
return false;
}
case WEBGL_compressed_texture_atc:
return gl->IsExtensionSupported(GLContext::AMD_compressed_ATC_texture);
case WEBGL_compressed_texture_pvrtc:
@ -991,12 +989,17 @@ bool WebGLContext::IsExtensionSupported(JSContext *cx, WebGLExtensionID ext) con
{
return true;
}
return false;
else
{
return false;
}
case WEBGL_debug_renderer_info:
return xpc::AccessCheck::isChrome(js::GetContextCompartment(cx));
default:
MOZ_ASSERT(false, "should not get there.");
}
MOZ_NOT_REACHED("Query for unknown extension.");
MOZ_ASSERT(false, "should not get there.");
return false;
}