2018-11-30 22:52:05 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2013-07-16 18:32:24 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "WebGL1Context.h"
|
|
|
|
|
2014-11-11 02:16:50 +03:00
|
|
|
#include "mozilla/dom/WebGLRenderingContextBinding.h"
|
2013-07-16 18:32:24 +04:00
|
|
|
#include "mozilla/Telemetry.h"
|
2015-07-11 02:34:45 +03:00
|
|
|
#include "WebGLFormats.h"
|
2013-07-16 18:32:24 +04:00
|
|
|
|
2014-11-11 02:16:50 +03:00
|
|
|
namespace mozilla {
|
2013-07-16 18:32:24 +04:00
|
|
|
|
2014-11-11 02:16:50 +03:00
|
|
|
/*static*/ WebGL1Context* WebGL1Context::Create() {
|
|
|
|
return new WebGL1Context();
|
|
|
|
}
|
2013-07-16 18:32:24 +04:00
|
|
|
|
|
|
|
WebGL1Context::WebGL1Context() : WebGLContext() {}
|
|
|
|
|
|
|
|
WebGL1Context::~WebGL1Context() {}
|
|
|
|
|
2015-08-04 06:39:47 +03:00
|
|
|
UniquePtr<webgl::FormatUsageAuthority> WebGL1Context::CreateFormatUsage(
|
2015-11-25 07:15:29 +03:00
|
|
|
gl::GLContext* gl) const {
|
|
|
|
return webgl::FormatUsageAuthority::CreateForWebGL1(gl);
|
2015-08-04 06:39:47 +03:00
|
|
|
}
|
|
|
|
|
2015-07-15 03:37:28 +03:00
|
|
|
JSObject* WebGL1Context::WrapObject(JSContext* cx,
|
|
|
|
JS::Handle<JSObject*> givenProto) {
|
2018-06-26 00:20:54 +03:00
|
|
|
return dom::WebGLRenderingContext_Binding::Wrap(cx, this, givenProto);
|
2013-07-16 18:32:24 +04:00
|
|
|
}
|
|
|
|
|
2014-11-11 02:16:50 +03:00
|
|
|
} // namespace mozilla
|