aboutsummaryrefslogtreecommitdiffstats
path: root/components/webvr/webvr_thread.rs
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2019-02-25 11:44:26 -0600
committerAlan Jeffrey <ajeffrey@mozilla.com>2019-02-26 11:07:42 -0600
commitc9087013b1bce87302ff49de9c2753262008c59b (patch)
treeb8027f8e4a56b07ab276c067fa783a86d50cc238 /components/webvr/webvr_thread.rs
parenta28e15e4ea34ed068cc4a49a0625c54f370cd9e8 (diff)
downloadservo-c9087013b1bce87302ff49de9c2753262008c59b.tar.gz
servo-c9087013b1bce87302ff49de9c2753262008c59b.zip
Use webvr future_frame_data to avoid blocking the WebGL thread
Diffstat (limited to 'components/webvr/webvr_thread.rs')
-rw-r--r--components/webvr/webvr_thread.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/components/webvr/webvr_thread.rs b/components/webvr/webvr_thread.rs
index 0528afe5be4..6019ca00e2b 100644
--- a/components/webvr/webvr_thread.rs
+++ b/components/webvr/webvr_thread.rs
@@ -382,11 +382,8 @@ impl webgl::WebVRRenderHandler for WebVRCompositorHandler {
},
webgl::WebVRCommand::SyncPoses(compositor_id, near, far, sender) => {
if let Some(compositor) = self.compositors.get(&compositor_id) {
- let pose = unsafe {
- (*compositor.0).sync_poses();
- (*compositor.0).synced_frame_data(near, far).to_bytes()
- };
- let _ = sender.send(Ok(pose.into()));
+ let pose = unsafe { (*compositor.0).future_frame_data(near, far) };
+ let _ = sender.send(Ok(pose));
} else {
let _ = sender.send(Err(()));
}