diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-11-24 09:21:56 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-11-24 09:21:56 +0400 |
| commit | c082e2a618464f4acd30388c90f347f6d4a4effa (patch) | |
| tree | 30c1d6afec3cf61436e6ef96445dcd53102073c1 /src | |
| parent | 42bb79d7c3c4c9c006226c53167976ec78ae2c94 (diff) | |
| download | niri-c082e2a618464f4acd30388c90f347f6d4a4effa.tar.gz niri-c082e2a618464f4acd30388c90f347f6d4a4effa.tar.bz2 niri-c082e2a618464f4acd30388c90f347f6d4a4effa.zip | |
niri: Rename presentation_time to target_presentation_time
Makes it clearer that this is a prediction.
Diffstat (limited to 'src')
| -rw-r--r-- | src/niri.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/niri.rs b/src/niri.rs index cabca83f..4f588abf 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -1564,10 +1564,10 @@ impl Niri { }; let state = self.output_state.get_mut(output).unwrap(); - let presentation_time = state.frame_clock.next_presentation_time(); + let target_presentation_time = state.frame_clock.next_presentation_time(); // Update from the config and advance the animations. - self.layout.advance_animations(presentation_time); + self.layout.advance_animations(target_presentation_time); state.unfinished_animations_remain = self .layout .monitor_for_output(output) @@ -1583,7 +1583,7 @@ impl Niri { let elements = self.render(renderer, output, true); // Hand it over to the backend. - let res = backend.render(self, output, &elements, presentation_time); + let res = backend.render(self, output, &elements, target_presentation_time); // Update the lock render state on successful render. let is_locked = self.is_locked(); @@ -1645,7 +1645,7 @@ impl Niri { let renderer = backend .renderer() .expect("renderer must not have disappeared"); - self.send_for_screen_cast(renderer, output, &elements, presentation_time); + self.send_for_screen_cast(renderer, output, &elements, target_presentation_time); } } @@ -1929,7 +1929,7 @@ impl Niri { renderer: &mut GlesRenderer, output: &Output, elements: &[OutputRenderElements<GlesRenderer>], - presentation_time: Duration, + target_presentation_time: Duration, ) { let _span = tracy_client::span!("Niri::send_for_screen_cast"); @@ -1947,11 +1947,11 @@ impl Niri { let last = cast.last_frame_time; let min = cast.min_time_between_frames.get(); - if !last.is_zero() && presentation_time - last < min { + if !last.is_zero() && target_presentation_time - last < min { trace!( "skipping frame because it is too soon \ - last={last:?} now={presentation_time:?} diff={:?} < min={min:?}", - presentation_time - last, + last={last:?} now={target_presentation_time:?} diff={:?} < min={min:?}", + target_presentation_time - last, ); continue; } @@ -1981,7 +1981,7 @@ impl Niri { *chunk.stride_mut() = maxsize as i32 / size.h; } - cast.last_frame_time = presentation_time; + cast.last_frame_time = target_presentation_time; } } |
