restore multithreading on iOS and use DisplayLink to decouple rendering from the main loop
This commit is contained in:
@@ -1176,10 +1176,6 @@ void Canvas::clear_context()
|
||||
|
||||
void Canvas::import_equirectangular(std::string file_path)
|
||||
{
|
||||
#if __IOS__
|
||||
import_equirectangular_thread(file_path);
|
||||
return;
|
||||
#endif
|
||||
std::thread t(&Canvas::import_equirectangular_thread, this, file_path);
|
||||
t.detach();
|
||||
}
|
||||
@@ -1253,12 +1249,6 @@ void Canvas::export_equirectangular(std::string file_path, std::function<void()>
|
||||
{
|
||||
if (App::I.check_license())
|
||||
{
|
||||
#if __IOS__
|
||||
export_equirectangular_thread(file_path);
|
||||
if (on_complete)
|
||||
on_complete();
|
||||
return;
|
||||
#endif
|
||||
std::thread t([=] {
|
||||
export_equirectangular_thread(file_path);
|
||||
if (on_complete)
|
||||
@@ -1563,12 +1553,6 @@ void Canvas::export_layers(std::string file_name, std::function<void()> on_compl
|
||||
{
|
||||
if (App::I.check_license())
|
||||
{
|
||||
#if __IOS__
|
||||
export_layers_thread(file_name);
|
||||
if (on_complete)
|
||||
on_complete();
|
||||
return;
|
||||
#endif
|
||||
std::thread t([=] {
|
||||
export_layers_thread(file_name);
|
||||
if (on_complete)
|
||||
@@ -1824,12 +1808,6 @@ void Canvas::project_save(std::function<void(bool)> on_complete)
|
||||
{
|
||||
if (App::I.check_license())
|
||||
{
|
||||
#if __IOS__
|
||||
bool ret = project_save_thread(App::I.doc_path);
|
||||
if (on_complete)
|
||||
on_complete(ret);
|
||||
return;
|
||||
#endif
|
||||
std::thread t([=] {
|
||||
bool ret = project_save_thread(App::I.doc_path);
|
||||
if (on_complete)
|
||||
@@ -1844,12 +1822,6 @@ void Canvas::project_save(std::string file_path, std::function<void(bool)> on_co
|
||||
LOG("saving %s", file_path.c_str());
|
||||
if (App::I.check_license())
|
||||
{
|
||||
#if __IOS__
|
||||
bool ret = project_save_thread(file_path);
|
||||
if (on_complete)
|
||||
on_complete(ret);
|
||||
return;
|
||||
#endif
|
||||
std::thread t([=] {
|
||||
bool ret = project_save_thread(file_path);
|
||||
if (on_complete)
|
||||
@@ -2046,12 +2018,6 @@ bool Canvas::project_save_thread(std::string file_path)
|
||||
|
||||
void Canvas::project_open(std::string file_path, std::function<void(bool)> on_complete)
|
||||
{
|
||||
#if __IOS__
|
||||
bool ret = project_open_thread(file_path);
|
||||
if (on_complete)
|
||||
on_complete(ret);
|
||||
return;
|
||||
#endif
|
||||
std::thread t([=] {
|
||||
bool result = project_open_thread(file_path);
|
||||
if (on_complete)
|
||||
|
||||
Reference in New Issue
Block a user