aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webgl2renderingcontext.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-03-06 09:48:56 -0500
committerGitHub <noreply@github.com>2018-03-06 09:48:56 -0500
commitf5037cf6219cafbc86bfaf6483b81b4ffb3496fa (patch)
tree22d5cbf1464bac93e3f5221d0dadabbb9e1d2036 /components/script/dom/webgl2renderingcontext.rs
parent226d9a5b0e69185b95c62e79b81044beba477654 (diff)
parent288ef50fb79aaab771b93e4e06d077656500ebb9 (diff)
downloadservo-f5037cf6219cafbc86bfaf6483b81b4ffb3496fa.tar.gz
servo-f5037cf6219cafbc86bfaf6483b81b4ffb3496fa.zip
Auto merge of #20144 - mkollaro:gettexparameter, r=jdm
Add WebGL function glGetTexParameter <!-- Please describe your changes on the following line: --> Add WebGL function glGetTexParameter --- <!-- 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 - [x] These changes fix part of #10209 <!-- 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/20144) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webgl2renderingcontext.rs')
-rw-r--r--components/script/dom/webgl2renderingcontext.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs
index 9bf016f9631..2a25c450b08 100644
--- a/components/script/dom/webgl2renderingcontext.rs
+++ b/components/script/dom/webgl2renderingcontext.rs
@@ -115,6 +115,12 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
self.base.GetParameter(cx, parameter)
}
+ #[allow(unsafe_code)]
+ /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
+ unsafe fn GetTexParameter(&self, cx: *mut JSContext, target: u32, pname: u32) -> JSVal {
+ self.base.GetTexParameter(cx, target, pname)
+ }
+
/// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
fn GetError(&self) -> u32 {
self.base.GetError()