mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Add profiling for WebXR
This commit is contained in:
parent
52c9cce4c4
commit
f3e1aba4e3
12 changed files with 93 additions and 9 deletions
|
@ -2530,11 +2530,17 @@ impl Document {
|
|||
return;
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
let mut time = 0;
|
||||
#[cfg(feature = "xr-profile")]
|
||||
{
|
||||
time = time::precise_time_ns();
|
||||
}
|
||||
let (sender, receiver) = webgl::webgl_channel().unwrap();
|
||||
self.window
|
||||
.webgl_chan()
|
||||
.expect("Where's the WebGL channel?")
|
||||
.send(WebGLMsg::SwapBuffers(dirty_context_ids, sender))
|
||||
.send(WebGLMsg::SwapBuffers(dirty_context_ids, sender, time))
|
||||
.unwrap();
|
||||
receiver.recv().unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue