65 handle_(
nullptr, &DestroyWindowHandle),
66 data_(std::make_unique<Data>()),
67 concurrent_loop_(fml::ConcurrentMessageLoop::Create()),
68 is_gpu_disabled_sync_switch_(
new fml::SyncSwitch(
false)) {
69 ::glfwDefaultWindowHints();
70 ::glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
71 ::glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
72 auto window = ::glfwCreateWindow(1, 1,
"Test",
nullptr,
nullptr);
80 switches.enable_wide_gamut
86 NSWindow* cocoa_window = ::glfwGetCocoaWindow(window);
87 if (cocoa_window == nil) {
90 data_->metal_layer = [CAMetalLayer layer];
92 data_->metal_layer.pixelFormat =
94 data_->metal_layer.framebufferOnly = NO;
95 cocoa_window.contentView.layer = data_->metal_layer;
96 cocoa_window.contentView.wantsLayer = YES;
98 handle_.reset(window);
99 context_ = std::move(context);