From 7a17ae833ff79a8ee45bfedabfbbe61514058ad7 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 3 Apr 2021 20:08:57 -0700 Subject: [PATCH] macos: add logging around NSOpenGLPixelFormat This just makes it easier to see when this is slowing things down. refs: https://github.com/wez/wezterm/issues/452 --- window/src/os/macos/window.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/window/src/os/macos/window.rs b/window/src/os/macos/window.rs index a2fd2383f..61e87a5b7 100644 --- a/window/src/os/macos/window.rs +++ b/window/src/os/macos/window.rs @@ -200,6 +200,7 @@ mod cglbits { impl GlState { pub fn create(view: id) -> anyhow::Result { + log::trace!("Calling NSOpenGLPixelFormat::initWithAttributes"); let pixel_format = unsafe { StrongPtr::new(NSOpenGLPixelFormat::alloc(nil).initWithAttributes_(&[ appkit::NSOpenGLPFAOpenGLProfile as u32, @@ -219,6 +220,7 @@ mod cglbits { 0, ])) }; + log::trace!("NSOpenGLPixelFormat::initWithAttributes returned"); ensure!( !pixel_format.is_null(), "failed to create NSOpenGLPixelFormat"