diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-08-23 19:28:55 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-08-23 19:44:31 +0300 |
commit | be1891e895c012b36ca574a90b5d90fc1433152e (patch) | |
tree | 793eaf2cb310b91156e8ebf778d1aae8279a248b /source/blender/draw/intern/draw_cache_extract_mesh.cc | |
parent | cbe4036406ed21d5659b266dddbbe03a1a945721 (diff) |
Cleanup: move the buffer list to 'MeshBufferCache'
The cache is used to fill the buffer list.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract_mesh.cc')
-rw-r--r-- | source/blender/draw/intern/draw_cache_extract_mesh.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.cc b/source/blender/draw/intern/draw_cache_extract_mesh.cc index 5bdcf615e22..06c449fe590 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh.cc +++ b/source/blender/draw/intern/draw_cache_extract_mesh.cc @@ -565,8 +565,7 @@ static struct TaskNode *mesh_extract_render_data_node_create(struct TaskGraph *t static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, MeshBatchCache *cache, - MeshBufferList *mbuflist, - MeshBufferCache *extraction_cache, + MeshBufferCache *mbc, Mesh *me, const bool is_editmode, @@ -617,6 +616,8 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, /* Create an array containing all the extractors that needs to be executed. */ ExtractorRunDatas extractors; + MeshBufferList *mbuflist = &mbc->buff; + #define EXTRACT_ADD_REQUESTED(type, name) \ do { \ if (DRW_##type##_requested(mbuflist->type.name)) { \ @@ -705,7 +706,7 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, eMRDataType data_flag = extractors.data_types(); struct TaskNode *task_node_mesh_render_data = mesh_extract_render_data_node_create( - task_graph, mr, extraction_cache, iter_type, data_flag); + task_graph, mr, mbc, iter_type, data_flag); /* Simple heuristic. */ const bool use_thread = (mr->loop_len + mr->loop_loose_len) > MIN_RANGE_LEN; @@ -779,8 +780,7 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, extern "C" { void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, MeshBatchCache *cache, - MeshBufferList *mbuflist, - MeshBufferCache *extraction_cache, + MeshBufferCache *mbc, Mesh *me, const bool is_editmode, @@ -796,8 +796,7 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, { blender::draw::mesh_buffer_cache_create_requested(task_graph, cache, - mbuflist, - extraction_cache, + mbc, me, is_editmode, is_paint_mode, |