aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_mode
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-02-27 12:01:41 -0500
committerGitHub <noreply@github.com>2019-02-27 12:01:41 -0500
commit3d32efad2a804403dc0b953cb0c42ce3d40367c1 (patch)
tree5d1fa26dfe121c85d7f473f046029304086a66b6 /components/canvas/webgl_mode
parent2fb00d1d5abc04888f8d6ece5236899066b05a6b (diff)
parent8ddde7eacc6739db6d9e12086b03228460db67d4 (diff)
downloadservo-3d32efad2a804403dc0b953cb0c42ce3d40367c1.tar.gz
servo-3d32efad2a804403dc0b953cb0c42ce3d40367c1.zip
Auto merge of #22939 - asajeffrey:vrdisplay-gets-gl-bindings, r=jdm
Pass the GL context to the VRDisplay when rendering <!-- Please describe your changes on the following line: --> Allow the VRDisplay access to the WebGL thread's GL bindings. --- <!-- 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 do not require tests because it's behind-the-scenes plumbing <!-- 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/22939) <!-- Reviewable:end -->
Diffstat (limited to 'components/canvas/webgl_mode')
-rw-r--r--components/canvas/webgl_mode/inprocess.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/canvas/webgl_mode/inprocess.rs b/components/canvas/webgl_mode/inprocess.rs
index 6111851e58e..2ee1db72971 100644
--- a/components/canvas/webgl_mode/inprocess.rs
+++ b/components/canvas/webgl_mode/inprocess.rs
@@ -11,6 +11,7 @@ use canvas_traits::webgl::{WebGLSender, WebVRCommand, WebVRRenderHandler};
use euclid::Size2D;
use fnv::FnvHashMap;
use gleam::gl;
+use gleam::gl::Gl;
use servo_config::prefs::PREFS;
use std::rc::Rc;
@@ -112,8 +113,8 @@ impl WebGLExternalImageApi for WebGLExternalImages {
struct WebVRRenderWrapper(Box<dyn WebVRRenderHandler>);
impl WebVRRenderHandler for WebVRRenderWrapper {
- fn handle(&mut self, command: WebVRCommand, texture: Option<(u32, Size2D<i32>)>) {
- self.0.handle(command, texture);
+ fn handle(&mut self, gl: &dyn Gl, command: WebVRCommand, texture: Option<(u32, Size2D<i32>)>) {
+ self.0.handle(gl, command, texture);
}
}