Bug 1388565 - Use GLFeature::draw_buffers for WEBGL_draw_buffers IsSupported. - r=daoshengmu draft
authorJeff Gilbert <jgilbert@mozilla.com>
Tue, 08 Aug 2017 16:28:40 -0700
changeset 646994 ebf908c719198941b733c87f7a66c4a19661c2bd
parent 646993 257e603d1e40d542e434a04e475ffef3c2a195ba
child 646995 f5d9ff7c3c8ff96d1c2bebb2d4721d3e2d22fd77
push id74278
push userbmo:jgilbert@mozilla.com
push dateTue, 15 Aug 2017 23:11:38 +0000
reviewersdaoshengmu
bugs1388565
milestone57.0a1
Bug 1388565 - Use GLFeature::draw_buffers for WEBGL_draw_buffers IsSupported. - r=daoshengmu MozReview-Commit-ID: 7HU2YHtjehs
dom/canvas/WebGLExtensionDrawBuffers.cpp
--- 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;
     }