From d8bb5481f519aa29c5344518243377720a417a57 Mon Sep 17 00:00:00 2001 From: peter chang Date: Mon, 11 Jan 2016 19:56:00 +0100 Subject: [PATCH] Bug 1236395 - [WebGL2] pass getFramebufferAttachmentParameter in gl-object-get-calls.html, r=jgilbert --HG-- extra : rebase_source : 5cab2380be2efc8e6eae0b71183646443f654a5f --- dom/canvas/WebGLContextGL.cpp | 6 +++--- dom/canvas/WebGLRenderbuffer.cpp | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dom/canvas/WebGLContextGL.cpp b/dom/canvas/WebGLContextGL.cpp index 2c26b353b6f3..91cbdaee163a 100644 --- a/dom/canvas/WebGLContextGL.cpp +++ b/dom/canvas/WebGLContextGL.cpp @@ -736,7 +736,7 @@ WebGLContext::GetFramebufferAttachmentParameter(JSContext* cx, } switch (attachment) { - case LOCAL_GL_COLOR: + case LOCAL_GL_BACK: case LOCAL_GL_DEPTH: case LOCAL_GL_STENCIL: break; @@ -760,12 +760,12 @@ WebGLContext::GetFramebufferAttachmentParameter(JSContext* cx, case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: - if (attachment == LOCAL_GL_COLOR) + if (attachment == LOCAL_GL_BACK) return JS::NumberValue(8); return JS::NumberValue(0); case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: - if (attachment == LOCAL_GL_COLOR) + if (attachment == LOCAL_GL_BACK) return JS::NumberValue(mOptions.alpha ? 8 : 0); return JS::NumberValue(0); diff --git a/dom/canvas/WebGLRenderbuffer.cpp b/dom/canvas/WebGLRenderbuffer.cpp index a555d4498490..dda39dd4b2ba 100644 --- a/dom/canvas/WebGLRenderbuffer.cpp +++ b/dom/canvas/WebGLRenderbuffer.cpp @@ -27,8 +27,7 @@ DepthStencilDepthFormat(gl::GLContext* gl) static bool SupportsDepthStencil(gl::GLContext* gl) { - return gl->IsExtensionSupported(gl::GLContext::EXT_packed_depth_stencil) || - gl->IsExtensionSupported(gl::GLContext::OES_packed_depth_stencil); + return gl->IsSupported(gl::GLFeature::packed_depth_stencil); } static bool