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/script/dom/webglrenderingcontext.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/script/dom/webglrenderingcontext.rs')
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index d687b17cc98..21712563e40 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -4,7 +4,7 @@ use byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use canvas_traits::canvas::{byte_swap, multiply_u8_pixel}; -use canvas_traits::webgl::{WebGLContextShareMode, WebGLCommand, WebGLError, WebGLVersion}; +use canvas_traits::webgl::{WebGLContextShareMode, WebGLCommand, WebGLError, WebGLVersion, WebGLSLVersion}; use canvas_traits::webgl::{WebGLFramebufferBindingRequest, WebGLMsg, WebGLMsgSender, WebGLParameter, WebVRCommand}; use canvas_traits::webgl::DOMToTextureCommand; use canvas_traits::webgl::WebGLError::*; @@ -187,6 +187,7 @@ pub struct WebGLRenderingContext { webrender_image: Cell<Option<webrender_api::ImageKey>>, share_mode: WebGLContextShareMode, webgl_version: WebGLVersion, + glsl_version: WebGLSLVersion, #[ignore_malloc_size_of = "Defined in offscreen_gl_context"] limits: GLLimits, canvas: Dom<HTMLCanvasElement>, @@ -236,6 +237,7 @@ impl WebGLRenderingContext { webrender_image: Cell::new(None), share_mode: ctx_data.share_mode, webgl_version, + glsl_version: ctx_data.glsl_version, limits: ctx_data.limits, canvas: Dom::from_ref(canvas), last_error: Cell::new(None), @@ -1914,7 +1916,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 fn CompileShader(&self, shader: Option<&WebGLShader>) { if let Some(shader) = shader { - shader.compile(self.webgl_version, &self.extension_manager) + shader.compile(self.webgl_version, self.glsl_version, &self.extension_manager) } } |