Bumping manifests a=b2g-bump
[gecko.git] / dom / canvas / WebGLExtensionColorBufferFloat.cpp
blob6258d13ed05ed8b07031c283255fb798953d6b6d
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "WebGLExtensions.h"
7 #include "GLContext.h"
8 #include "mozilla/dom/WebGLRenderingContextBinding.h"
9 #include "WebGLContext.h"
11 namespace mozilla {
13 WebGLExtensionColorBufferFloat::WebGLExtensionColorBufferFloat(WebGLContext* webgl)
14 : WebGLExtensionBase(webgl)
16 MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
19 WebGLExtensionColorBufferFloat::~WebGLExtensionColorBufferFloat()
23 bool
24 WebGLExtensionColorBufferFloat::IsSupported(const WebGLContext* webgl)
26 gl::GLContext* gl = webgl->GL();
28 // ANGLE supports this, but doesn't have a way to advertize its support,
29 // since it's compliant with WEBGL_color_buffer_float's clamping, but not
30 // EXT_color_buffer_float.
31 return gl->IsSupported(gl::GLFeature::renderbuffer_color_float) ||
32 gl->IsANGLE();
35 IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionColorBufferFloat)
37 } // namespace mozilla