mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-24 02:01:18 +07:00
Fix presentation feedback panic with zero presentation time
This commit is contained in:
+9
-8
@@ -956,16 +956,17 @@ impl Tty {
|
|||||||
.unwrap_or(Duration::ZERO);
|
.unwrap_or(Duration::ZERO);
|
||||||
// FIXME: ideally should be monotonically increasing for a surface.
|
// FIXME: ideally should be monotonically increasing for a surface.
|
||||||
let seq = meta.sequence as u64;
|
let seq = meta.sequence as u64;
|
||||||
let flags = wp_presentation_feedback::Kind::Vsync
|
let mut flags = wp_presentation_feedback::Kind::Vsync
|
||||||
| wp_presentation_feedback::Kind::HwClock
|
|
||||||
| wp_presentation_feedback::Kind::HwCompletion;
|
| wp_presentation_feedback::Kind::HwCompletion;
|
||||||
|
|
||||||
feedback.presented::<_, smithay::utils::Monotonic>(
|
let time = if presentation_time.is_zero() {
|
||||||
presentation_time,
|
now
|
||||||
refresh,
|
} else {
|
||||||
seq,
|
flags.insert(wp_presentation_feedback::Kind::HwClock);
|
||||||
flags,
|
presentation_time
|
||||||
);
|
};
|
||||||
|
|
||||||
|
feedback.presented::<_, smithay::utils::Monotonic>(time, refresh, seq, flags);
|
||||||
|
|
||||||
if !presentation_time.is_zero() {
|
if !presentation_time.is_zero() {
|
||||||
let misprediction_s =
|
let misprediction_s =
|
||||||
|
|||||||
Reference in New Issue
Block a user