#include <playground_impl_mtl.h>
Definition at line 19 of file playground_impl_mtl.h.
◆ PlaygroundImplMTL()
Definition at line 64 of file playground_impl_mtl.mm.
66 handle_(
nullptr, &DestroyWindowHandle),
67 data_(std::make_unique<Data>()),
69 is_gpu_disabled_sync_switch_(
new fml::SyncSwitch(
false)) {
70 ::glfwDefaultWindowHints();
71 ::glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
72 ::glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
73 auto window = ::glfwCreateWindow(1, 1,
"Test",
nullptr,
nullptr);
81 switches.enable_wide_gamut
87 NSWindow* cocoa_window = ::glfwGetCocoaWindow(window);
88 if (cocoa_window == nil) {
91 data_->metal_layer = [CAMetalLayer layer];
93 data_->metal_layer.pixelFormat =
95 data_->metal_layer.framebufferOnly = NO;
96 cocoa_window.contentView.layer = data_->metal_layer;
97 cocoa_window.contentView.wantsLayer = YES;
99 handle_.reset(window);
100 context_ = std::move(context);
◆ ~PlaygroundImplMTL()
| impeller::PlaygroundImplMTL::~PlaygroundImplMTL |
( |
| ) |
|
|
default |
◆ SetCapabilities()
| fml::Status impeller::PlaygroundImplMTL::SetCapabilities |
( |
const std::shared_ptr< Capabilities > & |
capabilities | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files:
static std::shared_ptr< ContextMTL > Create(const std::vector< std::string > &shader_library_paths, std::shared_ptr< const fml::SyncSwitch > is_gpu_disabled_sync_switch)
id< MTLDevice > GetMTLDevice() const