Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_manager.c
| Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Threading | /** \name Threading | ||||
| * \{ */ | * \{ */ | ||||
| static void drw_task_graph_init(void) | static void drw_task_graph_init(void) | ||||
| { | { | ||||
| BLI_assert(DST.task_graph == NULL); | BLI_assert(DST.task_graph == NULL); | ||||
| DST.task_graph = BLI_task_graph_create(); | DST.task_graph = BLI_task_graph_create(); | ||||
| DST.delayed_extraction = BLI_gset_ptr_new(__func__); | DST.delayed_extraction = BLI_gset_ptr_new(__func__); | ||||
| DST.delayed_preparation_extraction = BLI_gset_ptr_new(__func__); | |||||
| } | } | ||||
| static void drw_task_graph_deinit(void) | static void drw_task_graph_deinit(void) | ||||
| { | { | ||||
| BLI_task_graph_work_and_wait(DST.task_graph); | BLI_task_graph_work_and_wait(DST.task_graph); | ||||
| BLI_gset_free(DST.delayed_extraction, (void (*)(void *key))drw_batch_cache_generate_requested); | BLI_gset_free(DST.delayed_extraction, | ||||
| (void (*)(void *key))drw_batch_cache_generate_requested_delayed); | |||||
| DST.delayed_extraction = NULL; | DST.delayed_extraction = NULL; | ||||
| BLI_task_graph_work_and_wait(DST.task_graph); | BLI_task_graph_work_and_wait(DST.task_graph); | ||||
| BLI_gset_free(DST.delayed_preparation_extraction, | |||||
| (void (*)(void *key))drw_batch_cache_prepare_and_generate_requested_delayed); | |||||
| DST.delayed_preparation_extraction = NULL; | |||||
| BLI_task_graph_work_and_wait(DST.task_graph); | |||||
| BLI_task_graph_free(DST.task_graph); | BLI_task_graph_free(DST.task_graph); | ||||
| DST.task_graph = NULL; | DST.task_graph = NULL; | ||||
| } | } | ||||
| /* \} */ | /* \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Settings | /** \name Settings | ||||
| * \{ */ | * \{ */ | ||||
| ▲ Show 20 Lines • Show All 2,785 Lines • Show Last 20 Lines | |||||