compositing: Remove IOCompositor::zoom_time and IOCompositor::zoom_action (#36509)

It seems that these two members are completely unused.

Testing: These changes are untested as they simply removed dead code.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-04-14 12:09:43 +02:00 committed by GitHub
parent d1c4b1be76
commit fbe1f0ef6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -150,12 +150,6 @@ pub struct IOCompositor {
/// Tracks whether or not the view needs to be repainted.
needs_repaint: Cell<RepaintReason>,
/// Tracks whether the zoom action has happened recently.
zoom_action: bool,
/// The time of the last zoom action has started.
zoom_time: f64,
/// Used by the logic that determines when it is safe to output an
/// image for the reftest framework.
ready_to_save_state: ReadyState,
@ -448,8 +442,6 @@ impl IOCompositor {
viewport_zoom: PinchZoomFactor::new(1.0),
min_viewport_zoom: Some(PinchZoomFactor::new(1.0)),
max_viewport_zoom: None,
zoom_action: false,
zoom_time: 0f64,
ready_to_save_state: ReadyState::Unknown,
webrender: Some(state.webrender),
rendering_context: state.rendering_context,
@ -1668,15 +1660,6 @@ impl IOCompositor {
return false;
}
let now = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap_or_default()
.as_secs() as f64;
// If a pinch-zoom happened recently, ask for tiles at the new resolution
if self.zoom_action && now - self.zoom_time > 0.3 {
self.zoom_action = false;
}
#[cfg(feature = "webxr")]
// Run the WebXR main thread
self.global.borrow_mut().webxr_main_thread.run_one_frame();