/src/mozilla-central/dom/canvas/WebGLShaderPrecisionFormat.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
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/. */ |
5 | | |
6 | | #ifndef WEBGL_SHADER_PRECISION_FORMAT_H_ |
7 | | #define WEBGL_SHADER_PRECISION_FORMAT_H_ |
8 | | |
9 | | #include "WebGLObjectModel.h" |
10 | | |
11 | | namespace mozilla { |
12 | | |
13 | | class WebGLShaderPrecisionFormat final |
14 | | : public WebGLContextBoundObject |
15 | | { |
16 | | public: |
17 | | WebGLShaderPrecisionFormat(WebGLContext* context, GLint rangeMin, |
18 | | GLint rangeMax, GLint precision) |
19 | | : WebGLContextBoundObject(context) |
20 | | , mRangeMin(rangeMin) |
21 | | , mRangeMax(rangeMax) |
22 | | , mPrecision(precision) |
23 | 0 | { } |
24 | | |
25 | | bool WrapObject(JSContext* cx, JS::Handle<JSObject*> givenProto, JS::MutableHandle<JSObject*> reflector); |
26 | | |
27 | | // WebIDL WebGLShaderPrecisionFormat API |
28 | 0 | GLint RangeMin() const { |
29 | 0 | return mRangeMin; |
30 | 0 | } |
31 | | |
32 | 0 | GLint RangeMax() const { |
33 | 0 | return mRangeMax; |
34 | 0 | } |
35 | | |
36 | 0 | GLint Precision() const { |
37 | 0 | return mPrecision; |
38 | 0 | } |
39 | | |
40 | | NS_INLINE_DECL_REFCOUNTING(WebGLShaderPrecisionFormat) |
41 | | |
42 | | private: |
43 | | // Private destructor, to discourage deletion outside of Release(): |
44 | 0 | ~WebGLShaderPrecisionFormat() { } |
45 | | |
46 | | GLint mRangeMin; |
47 | | GLint mRangeMax; |
48 | | GLint mPrecision; |
49 | | }; |
50 | | |
51 | | } // namespace mozilla |
52 | | |
53 | | #endif // WEBGL_SHADER_PRECISION_FORMAT_H_ |