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