diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-03-22 12:28:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 12:28:30 -0400 |
commit | 4aaac61a87f4e45e46d0591be73ce108e562c33f (patch) | |
tree | e8786e5026db056b14393adeb61e63011f619bf4 /components/script/dom/webgl2renderingcontext.rs | |
parent | 2de89377db63ec03ae3b1256486c4c32b33f5fce (diff) | |
parent | ee5bdbbd8b99b58eda19c117b1a06e4a90a61bb1 (diff) | |
download | servo-4aaac61a87f4e45e46d0591be73ce108e562c33f.tar.gz servo-4aaac61a87f4e45e46d0591be73ce108e562c33f.zip |
Auto merge of #20317 - gootorov:webgl-getFramebufferAttachmentParameter, r=jdm
Implement WebGL getFrameBufferAttachmentParameter API
<!-- Please describe your changes on the following line: -->
Implementation of `getFramebufferAttachmentParameter` as in WebGL1 specification.
Part of https://github.com/servo/servo/issues/10209.
r? emilio or jdm.
---
<!-- 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
<!-- 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/20317)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webgl2renderingcontext.rs')
-rw-r--r-- | components/script/dom/webgl2renderingcontext.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs index 2a25c450b08..2d1186c0dcc 100644 --- a/components/script/dom/webgl2renderingcontext.rs +++ b/components/script/dom/webgl2renderingcontext.rs @@ -142,6 +142,18 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { self.base.GetExtension(cx, name) } + #[allow(unsafe_code)] + /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4 + unsafe fn GetFramebufferAttachmentParameter( + &self, + cx: *mut JSContext, + target: u32, + attachment: u32, + pname: u32 + ) -> JSVal { + self.base.GetFramebufferAttachmentParameter(cx, target, attachment, pname) + } + /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3 fn ActiveTexture(&self, texture: u32) { self.base.ActiveTexture(texture) |