mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
Add more Tracy spans to initialization
This commit is contained in:
@@ -56,6 +56,7 @@ impl OutputId {
|
||||
|
||||
impl Backend {
|
||||
pub fn init(&mut self, niri: &mut Niri) {
|
||||
let _span = tracy_client::span!("Backend::init");
|
||||
match self {
|
||||
Backend::Tty(tty) => tty.init(niri),
|
||||
Backend::Winit(winit) => winit.init(niri),
|
||||
|
||||
@@ -269,6 +269,8 @@ impl Tty {
|
||||
config: Rc<RefCell<Config>>,
|
||||
event_loop: LoopHandle<'static, State>,
|
||||
) -> anyhow::Result<Self> {
|
||||
let _span = tracy_client::span!("Tty::new");
|
||||
|
||||
let (session, notifier) = LibSeatSession::new().context(
|
||||
"Error creating a session. This might mean that you're trying to run niri on a TTY \
|
||||
that is already busy, for example if you're running this inside tmux that had been \
|
||||
@@ -559,6 +561,8 @@ impl Tty {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let _span = tracy_client::span!("Tty::device_added");
|
||||
|
||||
let open_flags = OFlags::RDWR | OFlags::CLOEXEC | OFlags::NOCTTY | OFlags::NONBLOCK;
|
||||
let fd = self.session.open(path, open_flags)?;
|
||||
let device_fd = DrmDeviceFd::new(DeviceFd::from(fd));
|
||||
|
||||
@@ -36,6 +36,8 @@ impl Winit {
|
||||
config: Rc<RefCell<Config>>,
|
||||
event_loop: LoopHandle<State>,
|
||||
) -> Result<Self, winit::Error> {
|
||||
let _span = tracy_client::span!("Winit::new");
|
||||
|
||||
let builder = Window::default_attributes()
|
||||
.with_inner_size(LogicalSize::new(1280.0, 800.0))
|
||||
// .with_resizable(false)
|
||||
|
||||
Reference in New Issue
Block a user