diff options
author | YimingWu <xp8110@outlook.com> | 2021-12-27 09:21:12 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-12-27 09:22:09 +0300 |
commit | 52585b39a13ec9c1bff4857f241baa255ce2b449 (patch) | |
tree | d15f82d62b8732823dd0ebcb49e4147a23127048 /source/blender/gpencil_modifiers/intern | |
parent | 20b438d523c9c2fb8577602c053b4f51267300b6 (diff) |
LineArt: Remove duplicated edge-boundbox linking.
The edge is linked twice from differen calls during line art calculation
Probably caused by a merge and both calls stayed for some reason.
This would lead to edge link overflowing its limit of 2^16 items.
Diffstat (limited to 'source/blender/gpencil_modifiers/intern')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index d9a32711833..f0ab7f3ee31 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -2930,15 +2930,7 @@ static LineartEdge *lineart_triangle_intersect(LineartRenderBuffer *rb, result->intersection_mask = (tri->intersection_mask | testing->intersection_mask); lineart_prepend_edge_direct(&rb->intersection.first, result); - int r1, r2, c1, c2, row, col; - if (lineart_get_edge_bounding_areas(rb, result, &r1, &r2, &c1, &c2)) { - for (row = r1; row != r2 + 1; row++) { - for (col = c1; col != c2 + 1; col++) { - lineart_bounding_area_link_edge( - rb, &rb->initial_bounding_areas[row * LRT_BA_ROWS + col], result); - } - } - } + return result; } @@ -3409,7 +3401,6 @@ static void lineart_bounding_area_split(LineartRenderBuffer *rb, LineartBoundingArea *ba = lineart_mem_acquire(&rb->render_data_pool, sizeof(LineartBoundingArea) * 4); LineartTriangle *tri; - LineartEdge *e; ba[0].l = root->cx; ba[0].r = root->r; @@ -3475,11 +3466,6 @@ static void lineart_bounding_area_split(LineartRenderBuffer *rb, } } - for (int i = 0; i < root->line_count; i++) { - e = root->linked_lines[i]; - lineart_bounding_area_link_edge(rb, root, e); - } - rb->bounding_area_count += 3; } |