Own main workers and narrow Apple render hooks
This commit is contained in:
@@ -183,6 +183,30 @@ void AppleDocumentPlatformServices::set_cursor_visible(bool visible) const
|
||||
#endif
|
||||
}
|
||||
|
||||
void AppleDocumentPlatformServices::acquire_render_context() const
|
||||
{
|
||||
if (bridge_.acquire_render_context)
|
||||
bridge_.acquire_render_context();
|
||||
}
|
||||
|
||||
void AppleDocumentPlatformServices::release_render_context() const
|
||||
{
|
||||
if (bridge_.release_render_context)
|
||||
bridge_.release_render_context();
|
||||
}
|
||||
|
||||
void AppleDocumentPlatformServices::present_render_context() const
|
||||
{
|
||||
if (bridge_.present_render_context)
|
||||
bridge_.present_render_context();
|
||||
}
|
||||
|
||||
void AppleDocumentPlatformServices::bind_main_render_target() const
|
||||
{
|
||||
if (bridge_.bind_main_render_target)
|
||||
bridge_.bind_main_render_target();
|
||||
}
|
||||
|
||||
void AppleDocumentPlatformServices::save_prepared_file(
|
||||
std::string_view path,
|
||||
std::string_view suggested_name,
|
||||
|
||||
@@ -22,6 +22,10 @@ struct AppleDocumentPickerBridge {
|
||||
std::function<void(std::string path)> display_file;
|
||||
std::function<void(std::string path)> share_file;
|
||||
std::function<void(bool visible)> set_cursor_visible;
|
||||
std::function<void()> acquire_render_context;
|
||||
std::function<void()> release_render_context;
|
||||
std::function<void()> present_render_context;
|
||||
std::function<void()> bind_main_render_target;
|
||||
std::function<void(std::string path, std::string suggested_name, PreparedFileCallback callback)> save_prepared_file;
|
||||
std::function<void()> save_ui_state;
|
||||
};
|
||||
@@ -49,6 +53,10 @@ public:
|
||||
void display_file(std::string_view path) const;
|
||||
void share_file(std::string_view path) const;
|
||||
void set_cursor_visible(bool visible) const;
|
||||
void acquire_render_context() const;
|
||||
void release_render_context() const;
|
||||
void present_render_context() const;
|
||||
void bind_main_render_target() const;
|
||||
void save_prepared_file(
|
||||
std::string_view path,
|
||||
std::string_view suggested_name,
|
||||
|
||||
Reference in New Issue
Block a user