Bug 1700051: part 26) Correct typo in comment of `mozInlineSpellWordUtil::BuildSoftTe...
[gecko.git] / dom / canvas / WebGLExtensionInstancedArrays.cpp
blob4a4811d82fab0f20ad87fdbcc8140e97fe828c5f
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "WebGLExtensions.h"
8 #include "GLContext.h"
9 #include "mozilla/dom/WebGLRenderingContextBinding.h"
10 #include "WebGLContext.h"
12 namespace mozilla {
14 WebGLExtensionInstancedArrays::WebGLExtensionInstancedArrays(
15 WebGLContext* webgl)
16 : WebGLExtensionBase(webgl) {
17 MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
20 bool WebGLExtensionInstancedArrays::IsSupported(const WebGLContext* webgl) {
21 if (webgl->IsWebGL2()) return false;
23 gl::GLContext* gl = webgl->GL();
24 return gl->IsSupported(gl::GLFeature::draw_instanced) &&
25 gl->IsSupported(gl::GLFeature::instanced_arrays);
28 } // namespace mozilla