2018-11-30 19:52:05 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2013-07-16 14:32:24 +00: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/. */
|
|
|
|
|
2014-11-10 23:16:50 +00:00
|
|
|
#ifndef WEBGL_1_CONTEXT_H_
|
|
|
|
#define WEBGL_1_CONTEXT_H_
|
2013-07-16 14:32:24 +00:00
|
|
|
|
|
|
|
#include "WebGLContext.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
class WebGL1Context : public WebGLContext {
|
|
|
|
public:
|
2014-11-10 23:16:50 +00:00
|
|
|
static WebGL1Context* Create();
|
2013-07-16 14:32:24 +00:00
|
|
|
|
2014-11-10 23:16:50 +00:00
|
|
|
private:
|
2013-07-16 14:32:24 +00:00
|
|
|
WebGL1Context();
|
2015-11-25 04:15:29 +00:00
|
|
|
|
|
|
|
virtual UniquePtr<webgl::FormatUsageAuthority> CreateFormatUsage(
|
|
|
|
gl::GLContext* gl) const override;
|
2013-07-16 14:32:24 +00:00
|
|
|
|
2014-11-10 23:16:50 +00:00
|
|
|
public:
|
|
|
|
virtual ~WebGL1Context();
|
2013-07-17 13:58:09 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool IsWebGL2() const override { return false; }
|
2013-07-17 13:58:09 +00:00
|
|
|
|
2014-11-10 23:16:50 +00:00
|
|
|
// nsWrapperCache
|
2015-07-15 00:37:28 +00:00
|
|
|
virtual JSObject* WrapObject(JSContext* cx,
|
|
|
|
JS::Handle<JSObject*> givenProto) override;
|
2013-07-16 14:32:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2014-11-10 23:16:50 +00:00
|
|
|
#endif // WEBGL_1_CONTEXT_H_
|