Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/canvas/WebGLVertexArrayObject.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#include "WebGLVertexArrayObject.h"
8
9
#include "GLContext.h"
10
#include "mozilla/dom/WebGL2RenderingContextBinding.h"
11
#include "WebGLContext.h"
12
13
namespace mozilla {
14
namespace dom {
15
16
WebGLVertexArray*
17
WebGLVertexArrayObject::Create(WebGLContext* webgl)
18
0
{
19
0
  // WebGL 2: This is core in GL ES 3. If support is missing something
20
0
  // is very wrong.
21
0
  bool vaoSupport = webgl->GL()->IsSupported(gl::GLFeature::vertex_array_object);
22
0
  MOZ_RELEASE_ASSERT(vaoSupport, "GFX: Vertex Array Objects aren't supported.");
23
0
  if (vaoSupport)
24
0
    return new WebGLVertexArrayObject(webgl);
25
0
26
0
  return nullptr;
27
0
}
28
29
JSObject*
30
WebGLVertexArrayObject::WrapObject(JSContext* cx,
31
                                   JS::Handle<JSObject*> givenProto)
32
0
{
33
0
  return dom::WebGLVertexArrayObject_Binding::Wrap(cx, this, givenProto);
34
0
}
35
36
} // namespace dom
37
} // namespace mozilla