aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_thread.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-07-26 15:53:34 +0200
committerGitHub <noreply@github.com>2024-07-26 13:53:34 +0000
commitf7448b5d6121339508a5cbc31e1da2db704da371 (patch)
tree06ba1edd7d134fbb9c2679f363fc4d0201e8a9b6 /components/canvas/webgl_thread.rs
parenteac54183c154ca044f98e9d74aa51892f73c0085 (diff)
downloadservo-f7448b5d6121339508a5cbc31e1da2db704da371.tar.gz
servo-f7448b5d6121339508a5cbc31e1da2db704da371.zip
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 <mrobinson@igalia.com>
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r--components/canvas/webgl_thread.rs13
1 files changed, 0 insertions, 13 deletions
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<Gl>,
@@ -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();
}