Bug 776001 - WebGL: support EXT_texture_filter_anisotropic without prefix; warn on using the MOZ_ prefix - r=jgilbert

This commit is contained in:
Benoit Jacob 2012-07-25 12:13:44 -04:00
Родитель 3ed23376d4
Коммит 7e9bf6ab92
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -933,9 +933,17 @@ WebGLContext::GetExtension(const nsAString& aName)
if (IsExtensionSupported(OES_standard_derivatives))
ext = OES_standard_derivatives;
}
else if (aName.Equals(NS_LITERAL_STRING("EXT_texture_filter_anisotropic"),
nsCaseInsensitiveStringComparator()))
{
if (IsExtensionSupported(EXT_texture_filter_anisotropic))
ext = EXT_texture_filter_anisotropic;
}
else if (aName.Equals(NS_LITERAL_STRING("MOZ_EXT_texture_filter_anisotropic"),
nsCaseInsensitiveStringComparator()))
{
GenerateWarning("MOZ_EXT_texture_filter_anisotropic has been renamed to EXT_texture_filter_anisotropic. "
"Support for the MOZ_-prefixed string will be removed very soon.");
if (IsExtensionSupported(EXT_texture_filter_anisotropic))
ext = EXT_texture_filter_anisotropic;
}
@ -1538,8 +1546,10 @@ WebGLContext::GetSupportedExtensions(Nullable< nsTArray<nsString> > &retval)
arr.AppendElement(NS_LITERAL_STRING("OES_texture_float"));
if (IsExtensionSupported(OES_standard_derivatives))
arr.AppendElement(NS_LITERAL_STRING("OES_standard_derivatives"));
if (IsExtensionSupported(EXT_texture_filter_anisotropic))
if (IsExtensionSupported(EXT_texture_filter_anisotropic)) {
arr.AppendElement(NS_LITERAL_STRING("EXT_texture_filter_anisotropic"));
arr.AppendElement(NS_LITERAL_STRING("MOZ_EXT_texture_filter_anisotropic"));
}
if (IsExtensionSupported(WEBGL_lose_context))
arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_lose_context"));
if (IsExtensionSupported(WEBGL_compressed_texture_s3tc))