diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2019-02-25 11:44:26 -0600 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2019-02-26 11:07:42 -0600 |
commit | c9087013b1bce87302ff49de9c2753262008c59b (patch) | |
tree | b8027f8e4a56b07ab276c067fa783a86d50cc238 /components/canvas_traits/webgl.rs | |
parent | a28e15e4ea34ed068cc4a49a0625c54f370cd9e8 (diff) | |
download | servo-c9087013b1bce87302ff49de9c2753262008c59b.tar.gz servo-c9087013b1bce87302ff49de9c2753262008c59b.zip |
Use webvr future_frame_data to avoid blocking the WebGL thread
Diffstat (limited to 'components/canvas_traits/webgl.rs')
-rw-r--r-- | components/canvas_traits/webgl.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs index 6b34965ae61..cfa885daa0b 100644 --- a/components/canvas_traits/webgl.rs +++ b/components/canvas_traits/webgl.rs @@ -7,12 +7,12 @@ use gleam::gl; use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender, IpcSharedMemory}; use offscreen_gl_context::{GLContextAttributes, GLLimits}; use pixels::PixelFormat; -use serde_bytes::ByteBuf; use std::borrow::Cow; use std::fmt; use std::num::NonZeroU32; use std::ops::Deref; use webrender_api::{DocumentId, ImageKey, PipelineId}; +use webvr_traits::WebVRFutureFrameData; /// Helper function that creates a WebGL channel (WebGLSender, WebGLReceiver) to be used in WebGLCommands. pub use crate::webgl_channel::webgl_channel; @@ -506,7 +506,12 @@ pub enum WebVRCommand { /// Start presenting to a VR device. Create(WebVRDeviceId), /// Synchronize the pose information to be used in the frame. - SyncPoses(WebVRDeviceId, f64, f64, WebGLSender<Result<ByteBuf, ()>>), + SyncPoses( + WebVRDeviceId, + f64, + f64, + WebGLSender<Result<WebVRFutureFrameData, ()>>, + ), /// Submit the frame to a VR device using the specified texture coordinates. SubmitFrame(WebVRDeviceId, [f32; 4], [f32; 4]), /// Stop presenting to a VR device |