diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-11-13 11:50:44 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 11:50:44 -0600 |
commit | f1cf41da00b7973194104aa147f73fe55b0ad3db (patch) | |
tree | 1446ee673f55500c52a604d7b30009aa96b18536 /components/canvas_traits/webgl.rs | |
parent | c261ff38c76c584fc93a4cded2ffe0d724d318fd (diff) | |
parent | c22674481b04a017576174376b4258edde1c4127 (diff) | |
download | servo-f1cf41da00b7973194104aa147f73fe55b0ad3db.tar.gz servo-f1cf41da00b7973194104aa147f73fe55b0ad3db.zip |
Auto merge of #19192 - MortimerGoro:webgl2_glsl, r=jdm
Set the correct Angle GLSL output when using WebGL 2
Set the correct Angle GLSL output when using WebGL 2
<!-- Please describe your changes on the following line: -->
---
<!-- 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/19192)
<!-- Reviewable:end -->
Diffstat (limited to 'components/canvas_traits/webgl.rs')
-rw-r--r-- | components/canvas_traits/webgl.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs index a6082209c69..84a8fe49006 100644 --- a/components/canvas_traits/webgl.rs +++ b/components/canvas_traits/webgl.rs @@ -63,6 +63,8 @@ pub struct WebGLCreateContextResult { pub limits: GLLimits, /// How the WebGLContext is shared with WebRender. pub share_mode: WebGLContextShareMode, + /// The GLSL version supported by the context. + pub glsl_version: WebGLSLVersion } #[derive(Clone, Copy, Deserialize, MallocSizeOf, Serialize)] @@ -84,6 +86,15 @@ pub enum WebGLVersion { WebGL2, } +/// Defines the GLSL version supported by the WebGL backend contexts. +#[derive(Clone, Copy, Deserialize, Eq, MallocSizeOf, PartialEq, Serialize)] +pub struct WebGLSLVersion { + /// Major GLSL version + pub major: u32, + /// Minor GLSL version + pub minor: u32, +} + /// Helper struct to send WebGLCommands to a specific WebGLContext. #[derive(Clone, Deserialize, MallocSizeOf, Serialize)] pub struct WebGLMsgSender { |