Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_undo.c
| Show First 20 Lines • Show All 536 Lines • ▼ Show 20 Lines | const UndoMesh *um_ref = um_arraystore.local_links.last ? | ||||
| NULL; | NULL; | ||||
| /* add oursrlves */ | /* add oursrlves */ | ||||
| BLI_addtail(&um_arraystore.local_links, BLI_genericNodeN(um)); | BLI_addtail(&um_arraystore.local_links, BLI_genericNodeN(um)); | ||||
| # ifdef USE_ARRAY_STORE_THREAD | # ifdef USE_ARRAY_STORE_THREAD | ||||
| if (um_arraystore.task_pool == NULL) { | if (um_arraystore.task_pool == NULL) { | ||||
| TaskScheduler *scheduler = BLI_task_scheduler_get(); | TaskScheduler *scheduler = BLI_task_scheduler_get(); | ||||
| um_arraystore.task_pool = BLI_task_pool_create_background(scheduler, NULL); | um_arraystore.task_pool = BLI_task_pool_create_background( | ||||
| scheduler, NULL, TASK_PRIORITY_LOW); | |||||
| } | } | ||||
| struct UMArrayData *um_data = MEM_mallocN(sizeof(*um_data), __func__); | struct UMArrayData *um_data = MEM_mallocN(sizeof(*um_data), __func__); | ||||
| um_data->um = um; | um_data->um = um; | ||||
| um_data->um_ref = um_ref; | um_data->um_ref = um_ref; | ||||
| BLI_task_pool_push( | BLI_task_pool_push(um_arraystore.task_pool, um_arraystore_compact_cb, um_data, true, NULL); | ||||
| um_arraystore.task_pool, um_arraystore_compact_cb, um_data, true, TASK_PRIORITY_LOW); | |||||
| # else | # else | ||||
| um_arraystore_compact_with_info(um, um_ref); | um_arraystore_compact_with_info(um, um_ref); | ||||
| # endif | # endif | ||||
| } | } | ||||
| #endif | #endif | ||||
| return um; | return um; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 261 Lines • Show Last 20 Lines | |||||