From f7448b5d6121339508a5cbc31e1da2db704da371 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Fri, 26 Jul 2024 15:53:34 +0200 Subject: Remove the WebXR dependency on ancient `time@0.1` crate (#32862) `webxr` depends on a very old verison of `time`, which allowed serializing monotonic clock output. This isn't possible on all platforms, so newer versions of `time` do not allow this. In order to stop using the old 0.1 versions of `time` we have to stop relying on times passed from `webxr` to Servo. This change does that, at the cost of removing the XR profiling feature. It has to be rewritten in another way in the `webxr` crate. Signed-off-by: Martin Robinson --- components/canvas/webgl_thread.rs | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'components/canvas/webgl_thread.rs') diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index c6ecb4b6d90..f0dd3da3705 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -51,11 +51,6 @@ use webxr_api::{ use crate::webgl_limits::GLLimitsDetect; -#[cfg(feature = "xr-profile")] -fn to_ms(ns: u64) -> f64 { - ns as f64 / 1_000_000. -} - struct GLContextData { ctx: Context, gl: Rc, @@ -831,14 +826,6 @@ impl WebGLThread { #[allow(unused)] let mut end_swap = 0; - #[cfg(feature = "xr-profile")] - { - end_swap = time::precise_time_ns(); - println!( - "WEBXR PROFILING [swap buffer]:\t{}ms", - to_ms(end_swap - start_swap) - ); - } completed_sender.send(end_swap).unwrap(); } -- cgit v1.2.3