Skip to content

Commit

Permalink
调整buffer大小
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow3aaa committed Dec 2, 2023
1 parent d802094 commit f42e1e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fas-rs-fw/src/scheduler/looper/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use log::debug;
use super::window::FrameWindow;
use crate::config::TargetFps;

const BUFFER_MAX: usize = 30;
const BUFFER_MAX: usize = 60;

#[derive(Debug)]
pub struct Buffer {
Expand Down
4 changes: 2 additions & 2 deletions fas-rs-fw/src/scheduler/looper/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ impl<P: PerformanceController> Looper<P> {
return Ok(Event::None);
}

if let Some(stamp) = buffer.last_limit {
/* if let Some(stamp) = buffer.last_limit {
let normalized_last_limit = stamp.elapsed() * target_fps;
if normalized_last_limit < Duration::from_secs(3) {
return Ok(Event::None);
}
} // one jank is allow in 3 frames at least
} // one jank is allow in 3 frames at least */

buffer.last_limit = Some(Instant::now());
buffer.limit_acc = buffer.limit_acc.saturating_sub(Duration::from_millis(100));
Expand Down

0 comments on commit f42e1e3

Please sign in to comment.