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 -->
This commit is contained in:
bors-servo 2019-10-08 11:56:11 -04:00 committed by GitHub
commit a7d48dca80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 394 additions and 88 deletions

View file

@ -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);

View file

@ -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 {
};