From 9fbd2bcf5ef3c14e9bcac810ad8b4c2988f493ff Mon Sep 17 00:00:00 2001 From: Makro <4398091+xmakro@users.noreply.github.com> Date: Sun, 20 Sep 2026 23:13:11 -0700 Subject: [PATCH] Fix burst of extra repaints before request_repaint_after deadlines (#8595) --- crates/egui/src/context.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 5513646f..ca785b9e 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -130,7 +130,7 @@ impl ContextImpl { fn request_repaint_after( &mut self, - mut delay: Duration, + delay: Duration, viewport_id: ViewportId, cause: RepaintCause, ) { @@ -147,11 +147,6 @@ impl ContextImpl { // Hovering a tooltip is a good example of a case where we want to repaint after a delay. } - if let Ok(predicted_frame_time) = Duration::try_from_secs_f32(viewport.input.predicted_dt) { - // Make it less likely we over-shoot the target: - delay = delay.saturating_sub(predicted_frame_time); - } - viewport.repaint.causes.push(cause); // We save some CPU time by only calling the callback if we need to.