aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-10-08 11:56:11 -0400
committerGitHub <noreply@github.com>2019-10-08 11:56:11 -0400
commita7d48dca80497083e8ad6db059536fc1f3b96701 (patch)
tree05f59c87f05a835237acb51b590f87c126a5a172 /components/script/dom/webidls
parent26e5281bfc9c5f91ec75fde8c39480bda993a83f (diff)
parent26df1962c38421251a998b8acc7d6652116d4866 (diff)
downloadservo-a7d48dca80497083e8ad6db059536fc1f3b96701.tar.gz
servo-a7d48dca80497083e8ad6db059536fc1f3b96701.zip
Auto merge of #24333 - mmatyas:webgl_fns_samplers, r=jdm
Add WebGLSampler support Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.13 <!-- Please describe your changes on the following line: --> cc @jdm @zakorgy --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24333) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r--components/script/dom/webidls/WebGL2RenderingContext.webidl4
-rw-r--r--components/script/dom/webidls/WebGLSampler.webidl11
2 files changed, 13 insertions, 2 deletions
diff --git a/components/script/dom/webidls/WebGL2RenderingContext.webidl b/components/script/dom/webidls/WebGL2RenderingContext.webidl
index 9162b71a230..edc26bb4ef6 100644
--- a/components/script/dom/webidls/WebGL2RenderingContext.webidl
+++ b/components/script/dom/webidls/WebGL2RenderingContext.webidl
@@ -530,13 +530,13 @@ interface mixin WebGL2RenderingContextBase
any getQueryParameter(WebGLQuery query, GLenum pname);
/* Sampler Objects */
- /*WebGLSampler? createSampler();
+ WebGLSampler? createSampler();
void deleteSampler(WebGLSampler? sampler);
[WebGLHandlesContextLoss] GLboolean isSampler(WebGLSampler? sampler);
void bindSampler(GLuint unit, WebGLSampler? sampler);
void samplerParameteri(WebGLSampler sampler, GLenum pname, GLint param);
void samplerParameterf(WebGLSampler sampler, GLenum pname, GLfloat param);
- any getSamplerParameter(WebGLSampler sampler, GLenum pname);*/
+ any getSamplerParameter(WebGLSampler sampler, GLenum pname);
/* Sync objects */
WebGLSync? fenceSync(GLenum condition, GLbitfield flags);
diff --git a/components/script/dom/webidls/WebGLSampler.webidl b/components/script/dom/webidls/WebGLSampler.webidl
new file mode 100644
index 00000000000..90c66b65a1d
--- /dev/null
+++ b/components/script/dom/webidls/WebGLSampler.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 WebGLSampler : WebGLObject {
+};