diff options
author | Martin Robinson <mrobinson@igalia.com> | 2017-07-06 19:21:22 +0200 |
---|---|---|
committer | Glenn Watson <github@intuitionlibrary.com> | 2017-07-13 07:44:08 +1000 |
commit | e58e8ab42e832604cc71b01a25ca1e199323d7c6 (patch) | |
tree | 780698cde4d2f3400f75ce3cdac6c4b5bab18d50 /components/webvr | |
parent | 4b6e79337ef975e3ec752513b76ae6a6284c1199 (diff) | |
download | servo-e58e8ab42e832604cc71b01a25ca1e199323d7c6.tar.gz servo-e58e8ab42e832604cc71b01a25ca1e199323d7c6.zip |
Upgrade to the latest version of WebRender
Diffstat (limited to 'components/webvr')
-rw-r--r-- | components/webvr/Cargo.toml | 2 | ||||
-rw-r--r-- | components/webvr/lib.rs | 2 | ||||
-rw-r--r-- | components/webvr/webvr_thread.rs | 20 |
3 files changed, 12 insertions, 12 deletions
diff --git a/components/webvr/Cargo.toml b/components/webvr/Cargo.toml index a35c9335f1d..f7edd95d6d8 100644 --- a/components/webvr/Cargo.toml +++ b/components/webvr/Cargo.toml @@ -16,4 +16,4 @@ msg = {path = "../msg"} script_traits = {path = "../script_traits"} servo_config = {path = "../config"} webvr_traits = {path = "../webvr_traits" } -webrender_traits = {git = "https://github.com/servo/webrender", features = ["ipc"]} +webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} diff --git a/components/webvr/lib.rs b/components/webvr/lib.rs index bd0c0544a52..62f3e992fdc 100644 --- a/components/webvr/lib.rs +++ b/components/webvr/lib.rs @@ -10,7 +10,7 @@ extern crate log; extern crate msg; extern crate script_traits; extern crate servo_config; -extern crate webrender_traits; +extern crate webrender_api; extern crate webvr_traits; mod webvr_thread; diff --git a/components/webvr/webvr_thread.rs b/components/webvr/webvr_thread.rs index 3f268ab3cbb..ec550153870 100644 --- a/components/webvr/webvr_thread.rs +++ b/components/webvr/webvr_thread.rs @@ -11,8 +11,8 @@ use std::{thread, time}; use std::collections::{HashMap, HashSet}; use std::sync::mpsc; use std::sync::mpsc::{Receiver, Sender}; -use webrender_traits; -use webrender_traits::DeviceIntSize; +use webrender_api; +use webrender_api::DeviceIntSize; use webvr_traits::{WebVRMsg, WebVRResult}; use webvr_traits::webvr::*; @@ -305,7 +305,7 @@ impl WebVRThread { pub struct WebVRCompositor(*mut VRDisplay); pub struct WebVRCompositorHandler { - compositors: HashMap<webrender_traits::VRCompositorId, WebVRCompositor>, + compositors: HashMap<webrender_api::VRCompositorId, WebVRCompositor>, webvr_thread_receiver: Receiver<Option<WebVRCompositor>>, webvr_thread_sender: Option<IpcSender<WebVRMsg>> } @@ -328,14 +328,14 @@ impl WebVRCompositorHandler { } } -impl webrender_traits::VRCompositorHandler for WebVRCompositorHandler { +impl webrender_api::VRCompositorHandler for WebVRCompositorHandler { #[allow(unsafe_code)] - fn handle(&mut self, cmd: webrender_traits::VRCompositorCommand, texture: Option<(u32, DeviceIntSize)>) { + fn handle(&mut self, cmd: webrender_api::VRCompositorCommand, texture: Option<(u32, DeviceIntSize)>) { match cmd { - webrender_traits::VRCompositorCommand::Create(compositor_id) => { + webrender_api::VRCompositorCommand::Create(compositor_id) => { self.create_compositor(compositor_id); } - webrender_traits::VRCompositorCommand::SyncPoses(compositor_id, near, far, sender) => { + webrender_api::VRCompositorCommand::SyncPoses(compositor_id, near, far, sender) => { if let Some(compositor) = self.compositors.get(&compositor_id) { let pose = unsafe { (*compositor.0).sync_poses(); @@ -346,7 +346,7 @@ impl webrender_traits::VRCompositorHandler for WebVRCompositorHandler { let _ = sender.send(Err(())); } } - webrender_traits::VRCompositorCommand::SubmitFrame(compositor_id, left_bounds, right_bounds) => { + webrender_api::VRCompositorCommand::SubmitFrame(compositor_id, left_bounds, right_bounds) => { if let Some(compositor) = self.compositors.get(&compositor_id) { if let Some((texture_id, size)) = texture { let layer = VRLayer { @@ -361,7 +361,7 @@ impl webrender_traits::VRCompositorHandler for WebVRCompositorHandler { } } } - webrender_traits::VRCompositorCommand::Release(compositor_id) => { + webrender_api::VRCompositorCommand::Release(compositor_id) => { self.compositors.remove(&compositor_id); } } @@ -370,7 +370,7 @@ impl webrender_traits::VRCompositorHandler for WebVRCompositorHandler { impl WebVRCompositorHandler { #[allow(unsafe_code)] - fn create_compositor(&mut self, display_id: webrender_traits::VRCompositorId) { + fn create_compositor(&mut self, display_id: webrender_api::VRCompositorId) { let sender = match self.webvr_thread_sender { Some(ref s) => s, None => return, |