Bug 1175931 - TexImageFromVideoElement uses GL_HALF_FLOAT if it does not support GL_HALF_FLOAT_OES which would be the case on non-ANGLE systems. Using GL_HALF_FLOAT_OES on a non OES system would result in an error when using TexImage2D. r=jgilbert

This commit is contained in:
Kyle 2015-07-24 13:55:46 -04:00
parent 305daeee69
commit d0be04cef9

View File

@ -1825,6 +1825,12 @@ WebGLContext::TexImageFromVideoElement(const TexImageTarget texImageTarget,
GLenum format, GLenum type,
mozilla::dom::Element& elt)
{
if (type == LOCAL_GL_HALF_FLOAT_OES &&
!gl->IsExtensionSupported(gl::GLContext::OES_texture_half_float))
{
type = LOCAL_GL_HALF_FLOAT;
}
if (!ValidateTexImageFormatAndType(format, type,
WebGLTexImageFunc::TexImage,
WebGLTexDimensions::Tex2D))