aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/vrdisplay.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/vrdisplay.rs')
-rw-r--r--components/script/dom/vrdisplay.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/components/script/dom/vrdisplay.rs b/components/script/dom/vrdisplay.rs
index 72b8e29a15c..481f10c30b5 100644
--- a/components/script/dom/vrdisplay.rs
+++ b/components/script/dom/vrdisplay.rs
@@ -31,7 +31,8 @@ use dom::vrpose::VRPose;
use dom::vrstageparameters::VRStageParameters;
use dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
-use ipc_channel::ipc::{self, IpcSender};
+use ipc_channel::ipc::IpcSender;
+use profile_traits::ipc;
use script_runtime::CommonScriptMsg;
use script_runtime::ScriptThreadEventCategory::WebVREvent;
use std::cell::Cell;
@@ -191,7 +192,7 @@ impl VRDisplayMethods for VRDisplay {
}
// If not presenting we fetch inmediante VRFrameData
- let (sender, receiver) = ipc::channel().unwrap();
+ let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap();
self.webvr_thread().send(WebVRMsg::GetFrameData(self.global().pipeline_id(),
self.DisplayId(),
self.depth_near.get(),
@@ -216,7 +217,7 @@ impl VRDisplayMethods for VRDisplay {
// https://w3c.github.io/webvr/#dom-vrdisplay-resetpose
fn ResetPose(&self) {
- let (sender, receiver) = ipc::channel().unwrap();
+ let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap();
self.webvr_thread().send(WebVRMsg::ResetPose(self.global().pipeline_id(),
self.DisplayId(),
sender)).unwrap();
@@ -324,7 +325,7 @@ impl VRDisplayMethods for VRDisplay {
}
// Request Present
- let (sender, receiver) = ipc::channel().unwrap();
+ let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap();
self.webvr_thread().send(WebVRMsg::RequestPresent(self.global().pipeline_id(),
self.display.borrow().display_id,
sender))
@@ -357,7 +358,7 @@ impl VRDisplayMethods for VRDisplay {
}
// Exit present
- let (sender, receiver) = ipc::channel().unwrap();
+ let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap();
self.webvr_thread().send(WebVRMsg::ExitPresent(self.global().pipeline_id(),
self.display.borrow().display_id,
Some(sender)))