MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ create_layer()

std::pair< std::shared_ptr< Layer >, std::shared_ptr< Context > > MayaFlux::Portal::Forma::internal::Atelier::create_layer ( const std::shared_ptr< Core::Window > &  window,
std::string  name 
)

Construct a Layer and a Context wired to window.

The Context is stored so its event coroutines outlive the call.

Definition at line 136 of file Atelier.cpp.

137{
138 auto layer = std::make_shared<Layer>();
139 auto ctx = std::make_shared<Context>(layer, window, *m_event_manager, std::move(name));
140
141 MayaFlux::store(ctx);
142
143 return { std::move(layer), std::move(ctx) };
144}
std::string name
Definition VKDevice.cpp:143
std::shared_ptr< Vruta::EventManager > m_event_manager
Definition Atelier.hpp:217
std::shared_ptr< T > store(std::shared_ptr< T > obj)
Transfer ownership of an existing object to the persistent store for process lifetime.
Definition Persist.hpp:28

References m_event_manager, name, and MayaFlux::store().

Referenced by MayaFlux::Portal::Forma::create_layer(), and create_surface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: