aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls
diff options
context:
space:
mode:
authorMátyás Mustoha <matyas.mustoha@h-lab.eu>2019-09-09 11:21:46 +0200
committerMátyás Mustoha <matyas.mustoha@h-lab.eu>2019-10-01 12:30:24 +0200
commitf2e2b3d34b5ed1afa2b937eedee4908cd5d07a05 (patch)
tree58c6677d4c3541ad5cb5e95d9b1d308c3cf2f6c1 /components/script/dom/webidls
parent402db83b2b19f33240b0db4cf07e0c9d056b1786 (diff)
downloadservo-f2e2b3d34b5ed1afa2b937eedee4908cd5d07a05.tar.gz
servo-f2e2b3d34b5ed1afa2b937eedee4908cd5d07a05.zip
Initial implementation of WebGLQueries
This patch adds initial support for WeGLQueries. Most related WebGL functions and objects are implemented [1]. What's still missing is the `EXT_disjoint_timer_query_webgl2` support. [1]: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.12
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r--components/script/dom/webidls/WebGL2RenderingContext.webidl9
-rw-r--r--components/script/dom/webidls/WebGLQuery.webidl11
2 files changed, 14 insertions, 6 deletions
diff --git a/components/script/dom/webidls/WebGL2RenderingContext.webidl b/components/script/dom/webidls/WebGL2RenderingContext.webidl
index 49c8066990d..8f071630462 100644
--- a/components/script/dom/webidls/WebGL2RenderingContext.webidl
+++ b/components/script/dom/webidls/WebGL2RenderingContext.webidl
@@ -12,9 +12,6 @@ typedef long long GLint64;
typedef unsigned long long GLuint64;
-// interface WebGLQuery : WebGLObject {
-// };
-
// interface WebGLSampler : WebGLObject {
// };
@@ -528,13 +525,13 @@ interface WebGL2RenderingContextBase
// void clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
/* Query Objects */
- /*WebGLQuery? createQuery();
+ WebGLQuery? createQuery();
void deleteQuery(WebGLQuery? query);
- [WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? query);
+ /*[WebGLHandlesContextLoss]*/ GLboolean isQuery(WebGLQuery? query);
void beginQuery(GLenum target, WebGLQuery query);
void endQuery(GLenum target);
WebGLQuery? getQuery(GLenum target, GLenum pname);
- any getQueryParameter(WebGLQuery query, GLenum pname);*/
+ any getQueryParameter(WebGLQuery query, GLenum pname);
/* Sampler Objects */
/*WebGLSampler? createSampler();
diff --git a/components/script/dom/webidls/WebGLQuery.webidl b/components/script/dom/webidls/WebGLQuery.webidl
new file mode 100644
index 00000000000..04b3711dd86
--- /dev/null
+++ b/components/script/dom/webidls/WebGLQuery.webidl
@@ -0,0 +1,11 @@
+/* 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 https://mozilla.org/MPL/2.0/. */
+//
+// WebGL IDL definitions scraped from the Khronos specification:
+// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.8
+//
+
+[Exposed=Window, Pref="dom.webgl2.enabled"]
+interface WebGLQuery : WebGLObject {
+};