mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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:
parent
d1c4b1be76
commit
fbe1f0ef6d
1 changed files with 0 additions and 17 deletions
|
@ -150,12 +150,6 @@ pub struct IOCompositor {
|
||||||
/// Tracks whether or not the view needs to be repainted.
|
/// Tracks whether or not the view needs to be repainted.
|
||||||
needs_repaint: Cell<RepaintReason>,
|
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
|
/// Used by the logic that determines when it is safe to output an
|
||||||
/// image for the reftest framework.
|
/// image for the reftest framework.
|
||||||
ready_to_save_state: ReadyState,
|
ready_to_save_state: ReadyState,
|
||||||
|
@ -448,8 +442,6 @@ impl IOCompositor {
|
||||||
viewport_zoom: PinchZoomFactor::new(1.0),
|
viewport_zoom: PinchZoomFactor::new(1.0),
|
||||||
min_viewport_zoom: Some(PinchZoomFactor::new(1.0)),
|
min_viewport_zoom: Some(PinchZoomFactor::new(1.0)),
|
||||||
max_viewport_zoom: None,
|
max_viewport_zoom: None,
|
||||||
zoom_action: false,
|
|
||||||
zoom_time: 0f64,
|
|
||||||
ready_to_save_state: ReadyState::Unknown,
|
ready_to_save_state: ReadyState::Unknown,
|
||||||
webrender: Some(state.webrender),
|
webrender: Some(state.webrender),
|
||||||
rendering_context: state.rendering_context,
|
rendering_context: state.rendering_context,
|
||||||
|
@ -1668,15 +1660,6 @@ impl IOCompositor {
|
||||||
return false;
|
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")]
|
#[cfg(feature = "webxr")]
|
||||||
// Run the WebXR main thread
|
// Run the WebXR main thread
|
||||||
self.global.borrow_mut().webxr_main_thread.run_one_frame();
|
self.global.borrow_mut().webxr_main_thread.run_one_frame();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue