mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
Update Smithay (presentation-time v2)
This commit is contained in:
Generated
+8
-8
@@ -1337,9 +1337,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gbm"
|
||||
version = "0.16.0"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c724107aa10444b1d2709aae4727c18a33c16b3e15ea8a46cc4ae226c084c88a"
|
||||
checksum = "ce852e998d3ca5e4a97014fb31c940dc5ef344ec7d364984525fd11e8a547e6a"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"drm",
|
||||
@@ -1352,9 +1352,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gbm-sys"
|
||||
version = "0.3.1"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9cc2f64de9fa707b5c6b2d2f10d7a7e49e845018a9f5685891eb40d3bab2538"
|
||||
checksum = "c13a5f2acc785d8fb6bf6b7ab6bfb0ef5dad4f4d97e8e70bb8e470722312f76f"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
@@ -3093,9 +3093,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pixman"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d24a24da0bec14f4e43a495c1837a3c358b87532e7fe66bd75c348b89f0451b6"
|
||||
checksum = "459d9be014c5e9725153de54b1cacd6f5bbe258aba7daae10e76ca2cda0ad8c2"
|
||||
dependencies = [
|
||||
"drm-fourcc",
|
||||
"paste",
|
||||
@@ -3727,7 +3727,7 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
|
||||
[[package]]
|
||||
name = "smithay"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/Smithay/smithay.git#b8292400ea7d137946099e941bf3985ade3ecf91"
|
||||
source = "git+https://github.com/Smithay/smithay.git#c3f3ac8dc0776d47bc50f9a1911b613a56e6e04b"
|
||||
dependencies = [
|
||||
"appendlist",
|
||||
"bitflags 2.6.0",
|
||||
@@ -3799,7 +3799,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "smithay-drm-extras"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/Smithay/smithay.git#b8292400ea7d137946099e941bf3985ade3ecf91"
|
||||
source = "git+https://github.com/Smithay/smithay.git#c3f3ac8dc0776d47bc50f9a1911b613a56e6e04b"
|
||||
dependencies = [
|
||||
"drm",
|
||||
"libdisplay-info",
|
||||
|
||||
@@ -13,6 +13,7 @@ use smithay::backend::renderer::gles::GlesRenderer;
|
||||
use smithay::output::{Mode, Output, PhysicalProperties, Subpixel};
|
||||
use smithay::reexports::wayland_protocols::wp::presentation_time::server::wp_presentation_feedback;
|
||||
use smithay::utils::Size;
|
||||
use smithay::wayland::presentation::Refresh;
|
||||
|
||||
use super::{IpcOutputMap, OutputId, RenderResult};
|
||||
use crate::niri::{Niri, RedrawState};
|
||||
@@ -102,7 +103,7 @@ impl Headless {
|
||||
let mut presentation_feedbacks = niri.take_presentation_feedbacks(output, &states);
|
||||
presentation_feedbacks.presented::<_, smithay::utils::Monotonic>(
|
||||
get_monotonic_time(),
|
||||
std::time::Duration::ZERO,
|
||||
Refresh::Unknown,
|
||||
0,
|
||||
wp_presentation_feedback::Kind::empty(),
|
||||
);
|
||||
|
||||
+12
-4
@@ -50,6 +50,7 @@ use smithay::wayland::dmabuf::{DmabufFeedback, DmabufFeedbackBuilder, DmabufGlob
|
||||
use smithay::wayland::drm_lease::{
|
||||
DrmLease, DrmLeaseBuilder, DrmLeaseRequest, DrmLeaseState, LeaseRejected,
|
||||
};
|
||||
use smithay::wayland::presentation::Refresh;
|
||||
use smithay_drm_extras::drm_scanner::{DrmScanEvent, DrmScanner};
|
||||
use wayland_protocols::wp::linux_dmabuf::zv1::server::zwp_linux_dmabuf_feedback_v1::TrancheFlags;
|
||||
use wayland_protocols::wp::presentation_time::server::wp_presentation_feedback;
|
||||
@@ -1233,10 +1234,17 @@ impl Tty {
|
||||
// Mark the last frame as submitted.
|
||||
match surface.compositor.frame_submitted() {
|
||||
Ok(Some((mut feedback, target_presentation_time))) => {
|
||||
let refresh = output_state
|
||||
.frame_clock
|
||||
.refresh_interval()
|
||||
.unwrap_or(Duration::ZERO);
|
||||
let refresh = match output_state.frame_clock.refresh_interval() {
|
||||
Some(refresh) => {
|
||||
if output_state.frame_clock.vrr() {
|
||||
Refresh::Variable(refresh)
|
||||
} else {
|
||||
Refresh::Fixed(refresh)
|
||||
}
|
||||
}
|
||||
None => Refresh::Unknown,
|
||||
};
|
||||
|
||||
// FIXME: ideally should be monotonically increasing for a surface.
|
||||
let seq = meta.sequence as u64;
|
||||
let mut flags = wp_presentation_feedback::Kind::Vsync
|
||||
|
||||
@@ -3,7 +3,6 @@ use std::collections::HashMap;
|
||||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::Duration;
|
||||
|
||||
use niri_config::{Config, OutputName};
|
||||
use smithay::backend::allocator::dmabuf::Dmabuf;
|
||||
@@ -16,6 +15,7 @@ use smithay::reexports::calloop::LoopHandle;
|
||||
use smithay::reexports::wayland_protocols::wp::presentation_time::server::wp_presentation_feedback;
|
||||
use smithay::reexports::winit::dpi::LogicalSize;
|
||||
use smithay::reexports::winit::window::Window;
|
||||
use smithay::wayland::presentation::Refresh;
|
||||
|
||||
use super::{IpcOutputMap, OutputId, RenderResult};
|
||||
use crate::niri::{Niri, RedrawState, State};
|
||||
@@ -216,11 +216,9 @@ impl Winit {
|
||||
self.backend.submit(Some(damage)).unwrap();
|
||||
|
||||
let mut presentation_feedbacks = niri.take_presentation_feedbacks(output, &res.states);
|
||||
let mode = output.current_mode().unwrap();
|
||||
let refresh = Duration::from_secs_f64(1_000f64 / mode.refresh as f64);
|
||||
presentation_feedbacks.presented::<_, smithay::utils::Monotonic>(
|
||||
get_monotonic_time(),
|
||||
refresh,
|
||||
Refresh::Unknown,
|
||||
0,
|
||||
wp_presentation_feedback::Kind::empty(),
|
||||
);
|
||||
|
||||
+1
-1
@@ -1027,7 +1027,7 @@ fn allocate_buffer(
|
||||
.create_buffer_object_with_modifiers2::<()>(w, h, fourcc, modifiers, flags)
|
||||
.context("error creating GBM buffer object")?;
|
||||
|
||||
let modifier = bo.modifier().unwrap();
|
||||
let modifier = bo.modifier();
|
||||
let buffer = GbmBuffer::from_bo(bo, false);
|
||||
Ok((buffer, modifier))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user