1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 02:25:28 +03:00

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
This commit is contained in:
Wez Furlong 2021-04-03 20:08:57 -07:00
parent 2c7e5196ac
commit 7a17ae833f

View File

@ -200,6 +200,7 @@ mod cglbits {
impl GlState {
pub fn create(view: id) -> anyhow::Result<Self> {
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"