Bug 1388565 - Use GLFeature::draw_buffers for WEBGL_draw_buffers IsSupported. - r=daoshengmu
MozReview-Commit-ID: 7HU2YHtjehs
--- a/dom/canvas/WebGLExtensionDrawBuffers.cpp
+++ b/dom/canvas/WebGLExtensionDrawBuffers.cpp
@@ -43,21 +43,18 @@ WebGLExtensionDrawBuffers::DrawBuffersWE
mContext->DrawBuffers(buffers);
}
bool
WebGLExtensionDrawBuffers::IsSupported(const WebGLContext* webgl)
{
gl::GLContext* gl = webgl->GL();
- if (!gl->IsExtensionSupported(gl::GLContext::ARB_draw_buffers) &&
- !gl->IsExtensionSupported(gl::GLContext::EXT_draw_buffers))
- {
+ if (!gl->IsSupported(gl::GLFeature::draw_buffers))
return false;
- }
// WEBGL_draw_buffers requires at least 4 color attachments.
if (webgl->mGLMaxDrawBuffers < webgl->kMinMaxDrawBuffers ||
webgl->mGLMaxColorAttachments < webgl->kMinMaxColorAttachments)
{
return false;
}